Manual Reference Pages  - catsafiles (1)


NAME

catsafiles -

CONTENTS

Author
Called By
Description
Documented Version
Exit Status
Options
Permissions
Rcs Information
Rcs.sh Version
See Also
Synopsis
Warning(s)

DOCUMENTED VERSION

1.3 - 2012/09/14 18:42:58

SYNOPSIS

catsafiles [-d day] [-x]* [-X]*

DESCRIPTION

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 day’s data collection
will be lost due to a crash or restart of the machine, as opposed to just the rest
of the current hour’s 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%H‘

The 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 {} \;

OPTIONS

-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)

RCS.SH VERSION

00010

RCS INFORMATION

$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 $

PERMISSIONS

rwxr-xr-x userUID staff

WARNING(S)

40 - The localize script could not be found. Global machine settings can not be set.

EXIT STATUS

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 -?.

CALLED BY

    root’s crontab file: 59 * * * * /Users/earneson/bin/catsafiles

SEE ALSO

    sa1(8), sa2(8), sadc(8)

AUTHOR

Edwin Arneson


\\$4  catsafiles (1) EJA UTILITY
Generated by manServer 1.07 from catsafiles.1 using man macros. With tweaks by Edwin Arneson.