5 Star 14 Fork 0

Gitee 极速下载/sysstat

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/sysstat/sysstat/releases
克隆/下载
sa1.in 1.39 KB
一键复制 编辑 原始数据 按行查看 历史
#!/bin/sh
# @SA_LIB_DIR@/sa1
# (C) 1999-2020 Sebastien Godard (sysstat <at> orange.fr)
#
#@(#) @PACKAGE_NAME@-@PACKAGE_VERSION@
#@(#) sa1: Collect and store binary data in system activity data file.
#
# Set default value for some variables.
# Used only if ${SYSCONFIG_DIR}/${SYSCONFIG_FILE} doesn't exist!
HISTORY=0
SADC_OPTIONS=""
SA_DIR=@SA_DIR@
SYSCONFIG_DIR=@SYSCONFIG_DIR@
SYSCONFIG_FILE=@SYSCONFIG_FILE@
UMASK=0022
[ -r ${SYSCONFIG_DIR}/${SYSCONFIG_FILE} ] && . ${SYSCONFIG_DIR}/${SYSCONFIG_FILE}
umask ${UMASK}
# If the user-supplied value for SA_DIR in sysconfig file is not a directory
# then fall back on default directory. Create this default directory if it doesn't exist.
[ -d ${SA_DIR} ] || SA_DIR=@SA_DIR@
[ -d @SA_DIR@ ] || mkdir @SA_DIR@
if [ ${HISTORY} -gt 28 ]
then
SADC_OPTIONS="${SADC_OPTIONS} -D"
fi
ENDIR=@SA_LIB_DIR@
cd ${ENDIR}
[ "$1" = "--boot" ] && shift && BOOT=y || BOOT=n
[ "$1" = "--sleep" ] && shift && SLEEP=y || SLEEP=n
if [ "${SLEEP}" = "y" ]
then
exec ${ENDIR}/sadc -F -L ${SADC_OPTIONS} -C "LINUX SLEEP MODE ($*)" ${SA_DIR}
elif [ $# = 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 ${SA_DIR}
else
exec ${ENDIR}/sadc -F -L ${SADC_OPTIONS} $* ${SA_DIR}
fi
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors/sysstat.git
git@gitee.com:mirrors/sysstat.git
mirrors
sysstat
sysstat
master

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385