⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 alarm.sh

📁 sntop是一个基于curses的控制台工具
💻 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 + -