芝麻web文件管理V1.00
编辑当前文件:/home/mgatv524/public_html/avenida/views/sa.zip
PK 5-rYSZ Z sa2nu ȯ #!/bin/sh # /usr/lib64/sa/sa2 # (C) 1999-2012 Sebastien Godard (sysstat
orange.fr) # #@(#) sysstat-10.1.5 #@(#) sa2: Write a daily report # S_TIME_FORMAT=ISO ; export S_TIME_FORMAT umask 0022 prefix=/usr exec_prefix=/usr # Add a trailing slash so that 'find' can go through this directory if it's a symlink DDIR=/var/log/sa/ SYSCONFIG_DIR=/etc/sysconfig YESTERDAY= DATE=`date ${YESTERDAY} +%d` CURRENTFILE=sa${DATE} CURRENTRPT=sar${DATE} HISTORY=28 COMPRESSAFTER=31 ZIP="bzip2" [ -r ${SYSCONFIG_DIR}/sysstat ] && . ${SYSCONFIG_DIR}/sysstat if [ ${HISTORY} -gt 28 ] then CURRENTDIR=`date ${YESTERDAY} +%Y%m` cd ${DDIR} || exit 1 [ -d ${CURRENTDIR} ] || mkdir -p ${CURRENTDIR} # Check if ${CURRENTFILE} is the correct file created at ${DATE} # Note: using `-ge' instead of `=' since the file could have # the next day time stamp because of the file rotating feature of sadc [ -f ${CURRENTFILE} ] && [ "`date +%Y%m%d -r ${CURRENTFILE}`" -ge "${CURRENTDIR}${DATE}" ] || exit 0 # If the file is a regular file, then move it to ${CURRENTDIR} [ ! -L ${CURRENTFILE} ] && mv -f ${CURRENTFILE} ${CURRENTDIR}/${CURRENTFILE} && ln -s ${CURRENTDIR}/${CURRENTFILE} ${CURRENTFILE} touch ${CURRENTDIR}/${CURRENTRPT} # Remove the "compatibility" link and recreate it to point to # the (new) current file rm -f ${CURRENTRPT} ln -s ${CURRENTDIR}/${CURRENTRPT} ${CURRENTRPT} CURRENTDIR=${DDIR}/${CURRENTDIR} else CURRENTDIR=${DDIR} fi RPT=${CURRENTDIR}/${CURRENTRPT} ENDIR=/usr/bin DFILE=${CURRENTDIR}/${CURRENTFILE} [ -f "$DFILE" ] || exit 0 cd ${ENDIR} [ -L ${RPT} ] && rm -f ${RPT} ${ENDIR}/sar $* -f ${DFILE} > ${RPT} find ${DDIR} \( -name 'sar??' -o -name 'sa??' -o -name 'sar??.xz' -o -name 'sa??.xz' -o -name 'sar??.gz' -o -name 'sa??.gz' -o -name 'sar??.bz2' -o -name 'sa??.bz2' \) \ -mtime +"${HISTORY}" -exec rm -f {} \; find ${DDIR} \( -name 'sar??' -o -name 'sa??' \) -type f -mtime +"${COMPRESSAFTER}" \ -exec ${ZIP} {} \; > /dev/null 2>&1 # Remove broken links for f in `find ${DDIR} \( -name 'sar??' -o -name 'sa??' \) -type l`; do [ -e $f ] || rm -f $f done cd ${DDIR} rmdir [0-9]????? > /dev/null 2>&1 exit 0 PK 5-rY{ sa1nu ȯ #!/bin/sh # /usr/lib64/sa/sa1 # (C) 1999-2012 Sebastien Godard (sysstat
orange.fr) # #@(#) sysstat-10.1.5 #@(#) sa1: Collect and store binary data in system activity data file. # # Set default value for some variables. # Used only if ${SYSCONFIG_DIR}/sysstat doesn't exist! HISTORY=0 SADC_OPTIONS="" DDIR=/var/log/sa DATE=`date +%d` CURRENTFILE=sa${DATE} CURRENTDIR=`date +%Y%m` SYSCONFIG_DIR=/etc/sysconfig umask 0022 [ -r ${SYSCONFIG_DIR}/sysstat ] && . ${SYSCONFIG_DIR}/sysstat if [ ${HISTORY} -gt 28 ] then cd ${DDIR} || exit 1 [ -d ${CURRENTDIR} ] || mkdir -p ${CURRENTDIR} # If ${CURRENTFILE} exists and is a regular file, then make sure # the file was modified this day (and not e.g. month ago) # and move it to ${CURRENTDIR} [ ! -L ${CURRENTFILE} ] && [ -f ${CURRENTFILE} ] && [ "`date +%Y%m%d -r ${CURRENTFILE}`" = "${CURRENTDIR}${DATE}" ] && mv -f ${CURRENTFILE} ${CURRENTDIR}/${CURRENTFILE} touch ${CURRENTDIR}/${CURRENTFILE} # Remove the "compatibility" link and recreate it to point to # the (new) current file rm -f ${CURRENTFILE} ln -s ${CURRENTDIR}/${CURRENTFILE} ${CURRENTFILE} else # If ${CURRENTFILE} exists, is a regular file and is from a previous # month then delete it so that it is recreated by sadc afresh [ -f ${CURRENTFILE} ] && [ "`date +%Y%m -r ${CURRENTFILE}`" -lt "${CURRENTDIR}" ] && rm -f ${CURRENTFILE} fi ENDIR=/usr/lib64/sa cd ${ENDIR} [ "$1" = "--boot" ] && shift && BOOT=y || BOOT=n if [ $# = 0 ] && [ "${BOOT}" = "n" ] then # Note: Stats are written at the end of previous file *and* at the # beginning of the new one (when there is a file rotation) only if # outfile has been specified as '-' on the command line... exec ${ENDIR}/sadc -F -L ${SADC_OPTIONS} 1 1 - else exec ${ENDIR}/sadc -F -L ${SADC_OPTIONS} $* - fi PK 5-rY~Z O O sadcnu ȯ ELF > ""@ @ G @ 8 @ @ @ @ @ @ 8 8@ 8@ @ @ a a b a a T T@ T@ D D Ptd t t@ t@ < < Qtd Rtd a a /lib64/ld-linux-x86-64.so.2 GNU GNU ܈8{~@*J W W Y (8h9 : } n T \ ` ( g B g $ A a 5 y - C K N G W P ; z I 1 <