Uname : Linux svr.eworld.co.in 5.14.0-427.18.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 28 06:27:02 EDT 2024 x86_64
Soft : Apache
Ip : 92.204.41.43
Port : 443
~
/
lib64
/
sa
[ HOME ]
Exec
Submit
File Name : sa2
#!/usr/bin/sh # /usr/lib64/sa/sa2 # (C) 1999-2021 Sebastien Godard (sysstat <at> orange.fr) # #@(#) sysstat-12.5.4 #@(#) sa2: Write a daily report # S_TIME_FORMAT=ISO ; export S_TIME_FORMAT prefix=/usr exec_prefix=/usr SA_DIR=/var/log/sa SYSCONFIG_DIR=/etc/sysconfig SYSCONFIG_FILE=sysstat HISTORY=28 COMPRESSAFTER=31 ZIP="xz" UMASK=0022 ENDIR= DELAY_RANGE=0 # Read configuration file, overriding variables set above [ -r ${SYSCONFIG_DIR}/${SYSCONFIG_FILE} ] && . ${SYSCONFIG_DIR}/${SYSCONFIG_FILE} umask ${UMASK} # Wait for a random delay if requested if [ ${DELAY_RANGE} -gt 0 ] then RANDOM=$$ DELAY=$((${RANDOM}%${DELAY_RANGE})) sleep ${DELAY} fi [ -d ${SA_DIR} ] || SA_DIR=/var/log/sa # if YESTERDAY=no then today's summary is generated if [ x$YESTERDAY = xno ] then DATE_OPTS= else DATE_OPTS="--date=yesterday" fi if [ ${HISTORY} -gt 28 ] then DATE=`date ${DATE_OPTS} +%Y%m%d` else DATE=`date ${DATE_OPTS} +%d` fi CURRENTFILE=sa${DATE} CURRENTRPT=sar${DATE} RPT=${SA_DIR}/${CURRENTRPT} DFILE=${SA_DIR}/${CURRENTFILE} if [ -z "${ENDIR}" ]; then ENDIR=/usr/bin fi [ -f "${DFILE}" ] || exit 0 cd ${ENDIR} if [ x${REPORTS} != xfalse ] then ${ENDIR}/sar $* -f ${DFILE} > ${RPT} fi SAFILES_REGEX='/sar?[0-9]{2,8}(\.(Z|gz|bz2|xz|lz|lzo))?$' find "${SA_DIR}" -type f -mtime +${HISTORY} \ | egrep "${SAFILES_REGEX}" \ | xargs rm -f UNCOMPRESSED_SAFILES_REGEX='/sar?[0-9]{2,8}$' find "${SA_DIR}" -type f -mtime +${COMPRESSAFTER} \ | egrep "${UNCOMPRESSED_SAFILES_REGEX}" \ | xargs -r "${ZIP}" > /dev/null exit 0
Back
Folder Name
Submit
File Name
File Content
Submit
Name
Type
Size
Permission
Last Modified
Actions
.
dir
-
0755
2024-06-10 03:14:05
..
dir
-
0555
2024-10-28 05:32:38
sa1
text/plain
1.69 KB
0755
2023-09-27 07:26:36
sa2
text/plain
1.5 KB
0755
2023-09-27 07:26:36
sadc
application/x-pie-executable
87.09 KB
0755
2023-09-27 07:26:42