]> granicus.if.org Git - sysstat/blob - sa1.in
SVG: Add SVG output for NFS client statistics
[sysstat] / sa1.in
1 #!/bin/sh
2 # @SA_LIB_DIR@/sa1
3 # (C) 1999-2016 Sebastien Godard (sysstat <at> orange.fr)
4 #
5 #@(#) @PACKAGE_NAME@-@PACKAGE_VERSION@
6 #@(#) sa1: Collect and store binary data in system activity data file.
7 #
8
9 # Set default value for some variables.
10 # Used only if ${SYSCONFIG_DIR}/sysstat doesn't exist!
11 HISTORY=0
12 SADC_OPTIONS=""
13 SA_DIR=@SA_DIR@
14 SYSCONFIG_DIR=@SYSCONFIG_DIR@
15 umask 0022
16
17 [ -r ${SYSCONFIG_DIR}/sysstat ] && . ${SYSCONFIG_DIR}/sysstat
18 [ -d ${SA_DIR} ] || SA_DIR=@SA_DIR@
19
20 if [ ${HISTORY} -gt 28 ]
21 then
22         SADC_OPTIONS="${SADC_OPTIONS} -D"
23 fi
24
25 ENDIR=@SA_LIB_DIR@
26 cd ${ENDIR}
27 [ "$1" = "--boot" ] && shift && BOOT=y || BOOT=n
28 if [ $# = 0 ] && [ "${BOOT}" = "n" ]
29 then
30 # Note: Stats are written at the end of previous file *and* at the
31 # beginning of the new one (when there is a file rotation) only if
32 # outfile has been specified as '-' on the command line...
33         exec ${ENDIR}/sadc -F -L ${SADC_OPTIONS} 1 1 ${SA_DIR}
34 else
35         exec ${ENDIR}/sadc -F -L ${SADC_OPTIONS} $* ${SA_DIR}
36 fi