scripting logic
tell me how can i make a script to send the output of top command in mail.
i have to mail the output to another person ,plz tell me how can i do this |
You can use:
top -b >> somefilename.txt ...to get readable top output in a file (note: >> will append data to the end of the file you named, or start a new file if it doesn't exist; use > if you want to start a new file each time). To automatically mail that file as an attachment to an email... I'm not sure, but you could probably Google that info (like so): http://www.linuxforums.org/forum/deb...e-nightly.html |
Quote:
As a rule, no one here is going to write your script for you. If you're having problems, post what you've written, and we'll help. If you want someone to write it for you, you're in the wrong place. Also, spell out your words. |
Usually the *stat programs are best for this. Things like iostat, vmstat, prstat, etc. You might want to look at using one of those.
Nmon is also good. |
All times are GMT -5. The time now is 12:44 PM. |