httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Lee" <>
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" <
mutt -a /root/serverstats2 -s "Server Stats 2" <
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"


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message