httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Lee" <jeffleeismyh...@hotmail.com>
Subject [users@httpd] Server stats script
Date Tue, 12 Aug 2003 07:39:46 GMT
I am trying to write a script that will email me every hour and let me know
the status of my server.
Currently all I really care about is if httpd is running, if CommuniGate Pro
mail server is running, and if my ifconfig entries still exist. For some
reason I cannot get the ifconfig entries to stay after a reboot so I wrote a
script to enter them when the server starts.

Below is what I am using now but for some reason after the first mail is
sent from the crontabs first run the rest of the mails have 0kb attachments.
If I run the script myself the files will be fine. There is a better way to
do this I know but I am new at this so ...

ifconfig > serverstats1
service httpd status > serverstats2
mutt -a /root/serverstats1 -s "Server Stats 1" jeffleeismyhero@hotmail.com <
/dev/null
mutt -a /root/serverstats2 -s "Server Stats 2" jeffleeismyhero@hotmail.com <
/dev/null
rm -rf serverstats1
rm -rf serverstats2

If anyone can help me out here I would appreciate it. For some reason the
server likes to give me trouble. So any advice would be helpful in making
the server "easy to use"

Thanks,
Jeff

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message