View Single Post
  #3   (View Single Post)  
Old 18th July 2008
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,319
Default

Quote:
Originally Posted by bigb89 View Post
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?
Factors you will want to consider:
  • Look at the -b switch to top(1) if you are using FreeBSD (-n on OpenBSD or NetBSD...). This will allow you to dump top output to a file.
  • Study the cron(8) manpage for information on how to configure a script which will run at periodic times.
  • Look at the manpage for whatever mail transport you are using. This may be sendmail(8).
Reply With Quote