ps/top report wildly different CPU utilization values

Solution Verified - Updated -

Issue

  • The commands "top" and "ps" from the "procps" rpm report wildly different CPU utilization values.

    Example:

    # rpm -q procps
    procps-3.2.7-17.el5.x86_64
    
    # top -b -n 1 | egrep 'PID|6088' ; ps -e -o psr,pcpu,pid,args | egrep 'CPU|6088'
      PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                                                                                              
     6088 admin       -11   0 80304  65m 1096 S 17.3  0.0 113:02.79 pidd                                                                                                                                                 
    
    PSR %CPU   PID COMMAND
     41  2.2  6088 ./pidd -c /usr/local/bin/pid.conf
     13  0.0 18099 egrep CPU|6088
    

Environment

  • Red Hat Enterprise Linux
  • procps

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.