|
Programming C, bash, Python, Perl, PHP, Java, you name it. |
|
Thread Tools | Display Modes |
|
|||
Script to mail me resources usage?
Hi guys,
How can I make a script that will pretty much run "top" (or any other commands that show resource usage) and then get the output from that command and email me the output every four hours? I know that this may seem like a simple script, but I just don't know yet how to get the output from "top" and then mail that. Thanks in advance! |
|
||||
http://en.wikipedia.org/wiki/Cron
I would also suggest setting the PATH and MAILTO (if needed) variables accordingly within the cronjob.
__________________
My Journal Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''. |
|
|||
Quote:
|
|
||||
This may also be of interest:
http://www.freebsdforums.org/forums/...ad.php?t=31072
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things. |
|
|||
Maybe it would be more beneficial using
rp.statd - host status monitoring daemon rup - remote status display
__________________
"No, that's wrong, Cartman. But don't worry, there are no stupid answers, just stupid people." -- Mr. Garrison Forum Netiquette |
|
|||
Thanks for all the replies guys!
I'll definitely try those options to see which one will work best for me. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
matts: a shell script to mail attachments from the command line | J65nko | Guides | 7 | 3rd August 2022 03:13 AM |
Forum usage: How to thank? | Greg_Morgan | Off-Topic | 2 | 9th October 2009 12:49 AM |
dd and split usage problem | paul-lkw | FreeBSD General | 4 | 31st January 2009 08:13 PM |
memory usage monitoring using net-snmp | ducu_00 | FreeBSD Ports and Packages | 2 | 11th October 2008 03:12 PM |
pagedaemon 100% cpu usage | fenrisW0lf | NetBSD General | 14 | 5th June 2008 12:31 PM |