/dev/null 2>&1
-LogWatch
http://www2.logwatch.org:81/tabs/download/
からダウンロード。
[root@example src]# rpm -ivh logwatch-7.3.6-1.noarch.rpm
[root@example src]# vi /usr/share/logwatch/default.conf/logwatch.conf
# If set to 'Yes', the report will be sent to stdout instead of being
# mailed to above person.
#Print = Yes
Print = No
-Cron
[root@example root]$ vi /etc/crontab
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root <<<<====確認
HOME=/
# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly
~
-Server Living Confirmation
[root@example root]# vi /etc/cron.hourly/songduanxin.sh
#!/bin/sh
echo '' | mail -s 'Living confirmation 1' root@[192.168.1.1]
※サーバの番号(srv_cd)を確認してください。
[root@example root]# chmod 755 /etc/cron.hourly/songduanxin.sh
[使用方法]
-ログインしてください。
Username:servermanager
Password:servermanager
※社内LANでの使用を想定して作っています。
ID、パスワードに有効期限設定などの機能はありません。
メールアドレスを設定する際は、特に注意してください。
設定を間違えると迷惑メールの温床になります。
※ご自由にお使いください。
EOD;
//HTMLエスケープ
print htmlspecialchars($buff);
?>
[ ソースダウンロード ]
server_manager_standard.zip