in reply to Re: cron script best practices
in thread cron script best practices
reports@clarkkent/home/reports(7): crontab -l 00 06 * * * /home/reports/ftp/SMSC0/loadData.pl 00 06 * * * /home/reports/ftp/MMSC1/loadData.pl 20,35,50,05 * * * * /home/reports/ftp/YTSMSC50/loadData.pl 20,35,50,05 * * * * /home/reports/ftp/FDSMSC/loadData.pl 00 06 * * * /home/reports/ftp/proptima/ftp.pl
loadData.pl is the script I'm checking on ("ps -ef|grep loadData|wc -l"). The first two should be running once a day at 6am and the second two every fifteen minutes... which is 96 times each per 24 hour period. I'm assuming the issue is with the second two, which are the same but for different boxes.
These scripts digest a log file that is a series of reports from about 12 nodes, each one has between 50 and 225 key and value pairs, one per line. I loop through the nodes, building a hash of the key/value, then build a huge insert based from them... with upto 225 columns, the insert is built dynamically.
I have filled /usr a couple times, once recently. I thought things would recover, but I end up with all these processes and mysqld running at 60-70% of cpu.
I guess the real thing is I'm resource strapped and perl inexperienced and getting a bit overwhelmed by the amount of data being chucked at me and was hoping to find someone who had documented what it took to write mature cron/logging scripts :) With Perl and JDBC for JSP, I find all kinds of simplest case stuff on the web, but not a lot on what I would think would be typical useage patterns.
Thanks,
Jimbus
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: cron script best practices
by anthski (Scribe) on Aug 10, 2005 at 23:09 UTC | |
|
Re^3: cron script best practices
by polettix (Vicar) on Aug 11, 2005 at 11:37 UTC | |
|
Re^3: cron script best practices
by Anonymous Monk on Aug 11, 2005 at 13:02 UTC |