?? alarm.sh
字號:
#! /bin/sh# alarm.sh - Sample script for use with sntop's alarm/log mode# rml, 20001022# sntop supports two-modes, alarm and log, set via:# -a <file>, --alarm=file# -l <file>, --log=file# In alarm mode, whenever a site goes DOWN <file> is executed# In log mode, <file> is executed on any change in status# <file> is given three arguments: the display hostname, the# actual hostname or IP address, and the new status (UP or DOWN)# This script will log to OUTFILE the time and date, the display# name, and the status of the passed host. If the host is DOWN# (always the case in alarm mode), an e-mail is sent to rootOUTFILE=sntop.logif [ $3 = "DOWN" ]; then echo "sntop detected at `date` that $1 [$2] went $3" | mail -s "[sntop] Host Down!" rootfiecho "sntop: `date`: $1 went $3" >> ${OUTFILE}# EOF
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -