[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
- <!--x-content-type: text/plain -->
- <!--x-date: Thu Feb 24 08:24:31 2005 -->
- <!--x-from-r13: wxvaarl ng ybpnyargfbyhgvbaf.pbz (Xnzrf B. Yvaarl WWW) -->
- <!--x-message-id: [email protected] -->
- <!--x-reference: [email protected] -->
- <!--x-reference: 1109247434.13314.11.camel@blue --> "http://www.w3.org/TR/html4/loose.dtd">
- <!--x-subject: [ale] Any Perl Gurus Out There? -->
- <li><em>date</em>: Thu Feb 24 08:24:31 2005</li>
- <li><em>from</em>: jkinney at localnetsolutions.com (James P. Kinney III)</li>
- <li><em>in-reply-to</em>: <1109247434.13314.11.camel@blue></li>
- <li><em>references</em>: <<a href="msg00902.html">[email protected]</a>> <1109247434.13314.11.camel@blue></li>
- <li><em>subject</em>: [ale] Any Perl Gurus Out There?</li>
For that matter, tee the logfile writer to also dump to a local socket.
Have the perl process accept input from the socket and process it that
way.
If the log writer is not readily ammenable to a tee, use
tail -f <logfile> | socket
I guess it really matters most on the granularity of the timing you need
on the reporting.
On Thu, 2005-02-24 at 07:17 -0500, Jim Popovitch wrote:
> The linux kernel will clean up defunct processes when it has time (low
> priority). Most likely your loop is "too tight" and injecting some
> latency periods will help. Try adding a "sleep 2;" at the bottom of
> your loop.
>
> -Jim P.
>
> On Thu, 2005-02-24 at 06:43 -0500, Jonathan Glass wrote:
> > I've written a little Perl script to monitor a log file and alert (in
> > this case, insert the flagged data into a DB) on a certain pattern. The
> > parent process sits in an infinite loop watching the file, and whenever
> > the pattern is matched, a child process is forked to do the DB
> > insertion. Anyone know the proper way to handle the death of all these
> > child processes? If I run a 'ps -aef' on the box while the script is
> > running, I see dozens of '<defunct>' processes.
> >
> > TIA
> >
> > Jonathan Glass
> > _______________________________________________
> > Ale mailing list
> > Ale at ale.org
> > <a rel="nofollow" href="http://www.ale.org/mailman/listinfo/ale">http://www.ale.org/mailman/listinfo/ale</a>
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> <a rel="nofollow" href="http://www.ale.org/mailman/listinfo/ale">http://www.ale.org/mailman/listinfo/ale</a>
--
James P. Kinney III \Changing the mobile computing world/
CEO & Director of Engineering \ one Linux user /
Local Net Solutions,LLC \ at a time. /
770-493-8244 \.___________________________./
<a rel="nofollow" href="http://www.localnetsolutions.com">http://www.localnetsolutions.com</a>
GPG ID: 829C6CA7 James P. Kinney III (M.S. Physics)
<jkinney at localnetsolutions.com>
Fingerprint = 3C9E 6366 54FC A3FE BA4D 0659 6190 ADC3 829C 6CA7
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<!--X-Follow-Ups-End-->
<!--X-References-->
<ul><li><strong>References</strong>:
<ul>
<li><strong><a name="00902" href="msg00902.html">[ale] Any Perl Gurus Out There?</a></strong>
<ul><li><em>From:</em> jonathan.glass at oit.gatech.edu (Jonathan Glass)</li></ul></li>
<li><strong><a name="00903" href="msg00903.html">[ale] Any Perl Gurus Out There?</a></strong>
<ul><li><em>From:</em> jimpop at yahoo.com (Jim Popovitch)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00904.html">[ale] Westell DSL Router</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00906.html">[ale] Any Perl Gurus Out There?</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00903.html">[ale] Any Perl Gurus Out There?</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00907.html">[ale] Any Perl Gurus Out There?</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00905"><strong>Date</strong></a></li>
<li><a href="threads.html#00905"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>
<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>