#!/bin/sh # # Harry Hoffman # # **************************************************************************** # Service definition section. # **************************************************************************** service="System Activity Reporter (SAR)" servfil="enable-sar.vfy" SYSCTAB="${JASS_ROOT_DIR}/var/spool/cron/crontabs/sys" SADIR="${JASS_ROOT_DIR}/var/adm/sa" #----------------------------------------------------------------------------- servhdr_txt=" Description of Service or Function: Sar provides reporting on system resource usage. Rationale for Verification Check: This script checks to see if sar is enabled and running on the system. Determination of Compliance: This check will indicate a failure if the following conditions are not met. A crontab for sys with proper entries to run sar. A directory in which to keep the sar information. " # **************************************************************************** # Check processing section. # **************************************************************************** start_verify "${servfil}" "${service}" "${servhdr_txt}" if check_fileExists ${SYSCTAB} 1 ; then if check_fileContentsExist "${SYSCTAB}" "^0,5,10,.* /usr/lib/sa/sa1" 1 ; then logSuccess "sys crontab is configured to run sar." else logFailure "sys crontab is not configured to run sar" adjustScore 1 fi else logFailure "Sys crontab does not exist" adjustScore 1 fi if [ -d ${SADIR} ]; then logSuccess "sa directory exists." else logFailure "sa directory does not exist." adjustScore 1 fi finish_verify