Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
While I can't go into too much detail about what they do, I run several Perl programs as daemons because they must react near immediately. They process FTP upload traffic, email, pages, logs, interact with databases, watch for weirdness, etc. They've been running since Sept 2003. One has processed 45K transactions, another 365K, from just January thru June.

Four out of the five below haven't grown a bit. The fifth has grown about 1.5MB since September, and that's called a bug. There are tools to help with bugs like that.

(Highly boiled down 'ps' output to not mess up web pages)

  PID  PPID   VSZ   STARTED                  COMMAND
 2743     1   4200  Thu Sep 11 17:51:08 2003 budgdmon.pl
      budgdmon: waiting
 2803     1   5044  Thu Sep 11 17:51:09 2003 budgftpd.pl
      budgftpd: waiting
 2850     1   4308  Thu Sep 11 17:51:12 2003 pageqrdr.pl
      pageqrdr: waiting
 5810  5807   7040  Thu Sep 11 18:11:31 2003 perl
      perl -w /opt/budgie/admin/xflogger/xfsuck.pl -v -d 
            --database test --table XferlogX 
            --fromtail /var/log/xferlog
 6815  6814   4420  Thu Sep 11 18:17:03 2003 perl
      perl ModemMonitor.pl
Now not all the processing takes place within the daemons. They do spawn off tasks for lengthy and/or nasty processing, so that probably contributes to the lack of problems _within_ the daemons.

My take - Perl is "very fine" for writing daemons.

--
I'm a pessimist about probabilities; I'm an optimist about possibilities.
Lewis Mumford


In reply to Re: Perl Daemons by shenme
in thread Perl Daemons by pbeckingham

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (2)
As of 2024-04-26 06:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found