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. Memory????
    By comtux in forum Linux - General Topics
    Replies: 10
    Last Post: 09-25-2004, 12:41 AM
  2. How can i tell what memory i have??
    By in forum General Chat
    Replies: 2
    Last Post: 04-20-2004, 12:31 AM
  3. Probs in a script called from another script
    By Outlaw in forum Programming
    Replies: 1
    Last Post: 03-12-2004, 02:54 PM
  4. Memory
    By jeremie in forum Linux - Hardware, Networking & Security
    Replies: 3
    Last Post: 08-24-2002, 10:06 AM
  5. Bad Memory
    By GhostDawg in forum Linux - General Topics
    Replies: 3
    Last Post: 05-20-2002, 07:16 PM


Posting Permissions

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