From: Ranga Nathan <[EMAIL PROTECTED]>
Date: Sun, 19 Feb 2006 23:31:02 -0800
I have a perl script that is in the start-up. Currently the startup uses
"nohup <myscript> &". But that causes the script to swap out when there is
no activity for a while.
No, the "&" just causes the script to run in the background. It's the
inactivity that causes it to swap out, which is normal. (With modern
shells, you shouldn't need an explicit "nohup", though, should you?)
I am thinking of using "damon" command to daemonize it. The script
simply tails xfer log and takes action on files being deposited. It
is not a server.
Why bother to turn it into a daemon, then? This won't affect it's
swapping behavior, if that's what you wanted.
On the other hand, doing "nice -n-1 <myscript> &" would run it at a
slightly higher-than-default priority, which might allow it to swap in
more quickly when the workload picked up. This would work best if the
actions were fairly lightweight, as <myscript> will hog the CPU while
it's running. (I Haven't tried this recipe myself, though.)
-- Bob Rogers
http://rgrjr.dyndns.org/
_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm