Question on 'top' command

This is a discussion on Question on 'top' command within the Linux Programming forums, part of the Platform Specific Boards category; Hello, I would like to extract only specific fields in a 'top' output. For example, I want to just find ...

  1. #1
    Registered User
    Join Date
    Jan 2008
    Posts
    17

    Question on 'top' command

    Hello,

    I would like to extract only specific fields in a 'top' output. For example, I want to just find the percent time the system is idle, available free memory, etc. Is there a way to do this. It may be possible to grep for the entire line but I just need specific parameters with the lines. Any thoughts on this is appreciated.

    Thanks.

  2. #2
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    you could probably just poll /proc for a lot of that information.

  3. #3
    Registered User
    Join Date
    Jan 2008
    Posts
    17
    Could do that but I have this specific requirement.

  4. #4
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    The tool for splitting a line is cut.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Odd 3D Invis Objects?
    By Zeusbwr in forum Game Programming
    Replies: 4
    Last Post: 12-07-2004, 07:01 PM
  2. command line param question
    By moi in forum C Programming
    Replies: 1
    Last Post: 08-05-2002, 09:07 PM
  3. Command Line Question
    By Sebastiani in forum C++ Programming
    Replies: 5
    Last Post: 07-09-2002, 02:46 AM
  4. Stack functions as arrays instead of node pointers
    By sballew in forum C Programming
    Replies: 8
    Last Post: 12-04-2001, 11:13 AM
  5. question about those command thngy's
    By face_master in forum C++ Programming
    Replies: 4
    Last Post: 09-15-2001, 09:54 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21