catsafiles -
Author
Called By
Description
Documented Version
Exit Status
Options
Permissions
Rcs Information
Rcs.sh Version
See Also
Synopsis
Warning(s)
1.3 - 2012/09/14 18:42:58
catsafiles [-d day] [-x]* [-X]*
Given a modified (see below) /usr/lib/sa/sa1 file that will write hourly sar data to
/var/log/sa/sa<mm><HH> this script will cat the hourly files together
into a single (and expected by sar) daily file. This is necessary because
the Mac OS X sadc data collector will truncate the daily file every time
it is run (instead of appending to it as is normal in Solaris). While data could
be collected on a daily basis, the problem is that the rest of a days data collection
will be lost due to a crash or restart of the machine, as opposed to just the rest
of the current hours data.
Note:
The following change was made to /usr/lib/sa/sa1:
diff sa1.orig sa1
26c26
< DATE=/bin/date +%d
---
> DATE=/bin/date +%d%HThe following change was made to /usr/lib/sa/sa2 (plus a change to keep the files longer):
diff sa2 sa2.orig
26c26
< DATE=/bin/date +%d%h
---
> DATE=/bin/date +%d
33c33
< /usr/bin/find /var/log/sa \( -name sar?? -o -name sa?? \) -mtime +27 -exec /bin/rm -f {} \;
---
> /usr/bin/find /var/log/sa \( -name sar?? -o -name sa?? \) -mtime +7 -exec /bin/rm -f {} \;
-d day specify an alternative day instead of today (2 digits) (default=date +%d) -x does set -x (may be used in functions and external script calls) (see DIAGNOSTICS below) -X sets debugging level--the number of times -X is specified" (see DIAGNOSTICS below)
00010
$Id: catsafiles,v 1.3 2012/09/14 18:42:58 earneson Exp $
$Author: earneson $
$Date: 2012/09/14 18:42:58 $
$Revision: 1.3 $
$Source: /Users/cvs/scripts/all/Users/earneson/bin/catsafiles,v $
$State: Exp $
rwxr-xr-x userUID staff
40 - The localize script could not be found. Global machine settings can not be set.
51 - An unknown option was passed to the script, or syntax of the parameters is wrong.
51 - Unknown option >$errflag<
56 - The USAGE was requested using -z or -?.
roots crontab file: 59 * * * * /Users/earneson/bin/catsafiles
sa1(8), sa2(8), sadc(8)
Edwin Arneson
\\$4 | catsafiles (1) | EJA UTILITY |