Operating System - HP-UX
1833758 Members
3159 Online
110063 Solutions
New Discussion

Re: top vs. glance cpu usage

 
Rich Wright
Trusted Contributor

top vs. glance cpu usage

Can anyone explain the following?

For pid 25970, top shows > 100% cpu. Glance for same pid shows < 1%.
Here are two 'ps -fp' with 10 second sleep between.
UID PID PPID C STIME TTY TIME COMMAND
root 25970 1 0 Jan 3 ? 9714:30 /opt/omni/lbin/rds -d
UID PID PPID C STIME TTY TIME COMMAND
root 25970 1 0 Jan 3 ? 9714:30 /opt/omni/lbin/rds -d


Top vs. Glance

Top Shows:
CPU TTY PID USERNAME PRI NI SIZE RES STATE TIME %WCPU %CPU COMMAND
2 ? 25970 root 152 20 124M 121M run 9712:09 101.19 101.01 rds

Glance Shows:
Resources PID: 25970, rds PPID: 1 euid: 0 User: root
--------------------------------------------------------------------------------
CPU Usage (util): 0.1 Log Reads : 0 Wait Reason : SLEEP
6 REPLIES 6
Steve Steel
Honored Contributor

Re: top vs. glance cpu usage

Hi


Top is an indication

Glance is a tool

There are known problems with top readings

What os are you on


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
harry d brown jr
Honored Contributor

Re: top vs. glance cpu usage

"top" and glance are TWO very DIFFERENT products. glance has the ability to really see what a process is doing/consuming, "top" does NOT.

live free or die
harry d brown jr
Live Free or Die
Pete Randall
Outstanding Contributor

Re: top vs. glance cpu usage

Interestingly enough, I took a look at my own system to see if I got similar results and I also had rds running (you must be using OmniBack/DataProtector!). I see pretty much the same symptoms you see: high usage in top and low in glance. I would definitely tend to believe glance over top which is a rather old tool and not tuned for today's advanced hardware/software. The other thing that I notice about the top output is that despite the fact that it's using 101.01% of the CPU, it's also waiting for CPU 101.19%!! Another reason I would tend to discount top output.


Pete

Pete
Rich Wright
Trusted Contributor

Re: top vs. glance cpu usage

The box is an L3000 running HP-UX 11.00.
Load average was pretty high at sample time.
Load averages: 7.42, 6.80, 6.49
628 processes: 497 sleeping, 128 running, 3 zombies

Now load average has dropped to 4.00, but top is showing 186% cpu for this pid.

Steven E. Protter
Exalted Contributor

Re: top vs. glance cpu usage

Given a choice, I'd belive glance.

This system looks awfully busy.

top needs a patch, its not supposed to show more than 100% cpu on any process.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Rich Wright
Trusted Contributor

Re: top vs. glance cpu usage

Thanks for the opinions. I am hopeful that patching will help.