:cry: ops:
I've been trying to come up with a small script that will give me uptime, ps and top information output to a file using a cron job. I have gotten most of what i want however I can not seem to find a way to get the top information to output to my file when the cron runs it. I can run it manually and everything comes out just the way i want. i have been to forums and no one can seem to tell me why the top won't give output using the cron. This is very important for me i need to track info on the servers at my job and i'm just a newbie.
Actually i do not need the entire top output information. I just want the top that gives the CPU, memory,swap etc information. I would like to capture this every 5 minutes using a cron job. Is there something else i can use to capture the info i seek using a cron. I have looked into using ps, uptime, top, free, and w. There seems like there may be some commands using top and or ps that will give me everything but maybe i'm just not getting the syntax right some of the examples the syntax is confusing to me and how the options are used??? some one help pleezze! :?