Send myself a snapshot of the server load ?
top stats, uptime, and cpu and memory load ?
how would one do that ?
#!/usr/bin/perl
$uptimeoutput = `/usr/bin/uptime`;
$topoutput = `/usr/bin/top -b -n1`;
open (MAIL,"/usr/sbin/sendmail -t");
print MAIL "From: email@mydomain.comn";
print MAIL "To: email@mydomain.comn";
print MAIL "Subject: Server Statsnn";
print MAIL "$uptimeoutputn";
print MAIL "$topoutputnn";
close (MAIL);
then chmod it to 700
then create a cronfile named mycronfile
and put in it
0 * * * * /mymailstat
in telnet as root
crontab mycronfile
and it all works nicely :D
You might wanna add that to your signature-list ;)
for your linux newbie needs? :D
so you
pico cronfile
and put in the file
0 * * * * /mymailstat
then you issue the command
crontab cronfile to start the timer
http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/
Nice one :)
You might wanna add that to your signature-list ;) done LOL :)
Is this how I do it:
log in as a super user by entering:
su -
so that I get into root. After that, I'm supposed to create a file called mymailstat, so I
pico mymailstat
but what do you mean by
then create a cronfile named mycronfile
and put in it
0 * * * * /mymailstat
in telnet as root
crontab mycronfile
What command do I use to chmode it to 700? I've always used ftp for this purpose.
chmod 700 cronfile
#If you have any other info about this subject , Please add it free.# |
Posted on January 7th, 2009 by anonym
Filed under: enemystercode.com | edit
