how to get current CPU load in redhat?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Tarantulus
    New Member
    • May 2007
    • 114

    how to get current CPU load in redhat?

    Hi all,

    I feel like an idiot for asking this but I just can't seem to get it. I'm trying to extract the current CPU load (not average) from a redhat box and put it into a variable in a shellscript.

    I've tried various combinations of "top -b" and the like, but it's not working, I mean, I get the figures, but they are always the same (and therefore not accurate).

    any thoughts?
  • micmast
    New Member
    • Mar 2008
    • 144

    #2
    You should be able to find the information in /proc/stat
    However you might have to do some research on what the columns mean

    Comment

    • Tarantulus
      New Member
      • May 2007
      • 114

      #3
      thanks, it seems odd that there is no way to do this, I'd have expected it to be a fairly standard request!

      Comment

      • Nepomuk
        Recognized Expert Specialist
        • Aug 2007
        • 3111

        #4
        Hm, the sysstat package seems to do that - have a look there.

        Greetings,
        Nepomuk

        Comment

        Working...