Thanks to Bugs and Judith Reed for thier feedback. I used Bugs' instructions (below), but with my own collect flags and in ksh instead of csh.
-----------------
I have to do the same thing
The new collect log file is started every nite with this:
========================
# Script to start collect by cron at 1 minute after midnite
set hour = `date +%H`
set today = `date | awk '{print $1 $2 $3}'`
/usr/sbin/collect -s pmdnc -R 23h50m -i 30 -f /local/logs/collect/collect_${today}_${hour}
========================
If a reboot during the day occurs, this is run at startup to continue
writting the file - never had a problem...
/sbin/rc3.d/S99collect
========================
#!/bin/csh
set hour = `date +%H`
set minute = `date +%M`
_at_ tot_minutes = $hour * 60 + $minute
_at_ duration = 1430 - $tot_minutes
echo $tot_minutes dur = $duration
set today = `date | awk '{print $1 $2 $3}'`
/usr/sbin/collect -s pmdnc -R ${duration}m -o f -i 30 -f /local/logs/collect/collect_${today}_$hour &
========================
What this script does is count the minutes remaining until 23:50,
and runs with a new duration...
Bugs
__________________________________________________________________
McAfee VirusScan Online from the Netscape Network.
Comprehensive protection for your entire computer. Get your free trial today!
http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397
Get AOL Instant Messenger 5.1 free of charge. Download Now!
http://aim.aol.com/aimnew/Aim/register.adp?promo=380455
Received on Wed Oct 29 2003 - 17:44:22 NZDT