tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* SUMMARY:collect in historical mode
@ 2003-10-29 17:43 Rich Glazier
  0 siblings, 0 replies; only message in thread
From: Rich Glazier @ 2003-10-29 17:43 UTC (permalink / raw)


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`

@ tot_minutes = $hour * 60 + $minute
@ 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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-10-29 17:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-29 17:43 SUMMARY:collect in historical mode Rich Glazier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox