Thanks all for the responses.... While talking to my son he pointed out that tailing xferlog would be a problem when the log is being rotated. I would be looking at an old inode that has no activity. I looked at the system and found that the logs are rotated at 4AM every sunday. So, I need to change my approach.
I found a number of modules like File::Tail and File::Tail::App. Looks like these modules will have the same issue. I will have to re-start the script after every log rotation! I wish I could do this programmatically. Perhaps another script to monitor the log file and notice the sudden change in size or inode. Ideas welcome :-) __________________________________________ Ranga Nathan / CSG Systems Programmer - Specialist; Technical Services; BAX Global Inc. Irvine-California Tel: 714-442-7591 Fax: 714-442-2840 "Ben Tilly" <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 02/20/2006 06:01 PM To "Bob Rogers" <[EMAIL PROTECTED]> cc [email protected], Ranga Nathan <[EMAIL PROTECTED]> Subject Re: [Boston.pm] daemonizing a perl script On 2/20/06, Bob Rogers <[EMAIL PROTECTED]> wrote: > From: Ranga Nathan <[EMAIL PROTECTED]> [...] > 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.) The problem with a script swapping out is that it takes I/0 to swap it back in. Changing the priority just gives it better access to the CPU, which doesn't help one bit in how quickly I/O lets it get swapped back in. There many two solutions for getting swapped back out. The best is to add RAM. Secondly you can regularly guarantee that the script wakes up regularly and does something. Third, if you're using Linux 2.6 or later, play around with the swappiness parameter. You can control this either by echo 60 > /proc/sys/vm/swappiness or by adding vm.swappiness =60 to /etc/sysctl.conf. Cheers, Ben _______________________________________________ Boston-pm mailing list [email protected] http://mail.pm.org/mailman/listinfo/boston-pm _______________________________________________ Boston-pm mailing list [email protected] http://mail.pm.org/mailman/listinfo/boston-pm

