代码拉取完成,页面将自动刷新
#!/bin/sh
if [ "$1" = "autoconf" ]; then
echo 'yes'
exit 0
fi
if [ "$1" = "config" ]; then
cat <<EOF
graph_title SMF Services
graph_category processes
graph_scale no
graph_vlabel services
graph_args --base 1000 -l 0
graph_info Number of SMF services per state
online.label online
disabled.label disabled
maintenance.label maintenance
maintenance.warning 0
degraded.label degraded
degraded.warning 0
offline.label offline
legacy_run.label legacy_run
uninitialized.label uninitialized
EOF
exit 0
fi
svcs -a -o state,nstate | awk '
NR > 1 {
a[$1]++
}
BEGIN {
a["degraded"] = 0
a["disabled"] = 0
a["maintenance"] = 0
a["offline"] = 0
a["online"] = 0
a["uninitialized"] = 0
a["legacy_run"] = 0
}
END {
for(k in a) {
print k ".value", a[k]
}
}'
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。