Results 1 to 2 of 2

Thread: script or cmd for cpu and memory usage_Is there no help???.

Hybrid View

  1. #1

    script or cmd for cpu and memory usage_Is there no help???.

    :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! :?

  2. #2
    did you try `top -n 1` ?

Similar Threads

  1. Cannot start X again ....
    By DjiT in forum Linux - Software, Applications & Programming
    Replies: 4
    Last Post: 02-24-2005, 12:51 AM
  2. Random Access Memory (RAM) Guide
    By Waka-Gashira in forum Windows - General Topics
    Replies: 2
    Last Post: 01-05-2005, 11:47 PM
  3. List of fixes included in Windows XP SP2
    By regix in forum Windows - General Topics
    Replies: 6
    Last Post: 01-03-2005, 11:44 PM
  4. Memory????
    By comtux in forum Linux - General Topics
    Replies: 10
    Last Post: 09-25-2004, 12:41 AM
  5. Memory errors with XP Pro
    By in forum Windows - General Topics
    Replies: 18
    Last Post: 04-15-2004, 10:02 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •