Operating System - HP-UX
1836396 Members
2525 Online
110100 Solutions
New Discussion

Top vs Glance output, which is correct?

 
SOLVED
Go to solution
Cem Tugrul
Esteemed Contributor

Top vs Glance output, which is correct?

Hi forum,
i have HP UX 11.11 RP2450 9000/800/SD16000
last week accidently i have noticed such a kind of output from GlancePlus & top performance tools below;

output from "top";

CPU TTY PID USERNAME PRI NI SIZE RES STATE TIME %WCPU %CPU COMMAND
3 ? 6649 root 152 20 204M 187M run 789:17 98.81 98.63 rds
1 ? 11934 ut1ea 238 20 3677M 5428K run 6:41 65.97 65.85 oraclebaan01
5 ? 3628 ut2ad 154 20 32584K 6556K run 755:16 59.70 59.60 oracle8

and from GlancePlus;

oracle8 26463 26455 154 rvs 0.0/ 0.5 3066.5 0.0/ 0.0 20.5mb 1
rds 6649 1 154 root 0.0/ 1.6 47517.7 0.0/ 1.4 184.5mb 11
oraclebaan0 15391 1 154 ut1mc 0.0/ 0.0 0.7 0.0/ 0.1 23.0mb 1

Did you notice the processes "rds"????
it is top on "top" but GlancePlus not taking into consideration!!!!!!

ps -ef|egrep -i rds
root 6649 1 0 Sep 17 ? 789:17 /opt/omni/lbin/rds -d
rvs 19151 16006 1 10:14:30 pts/tc 0:00 egrep -i rds

PS:my server is also CellManager for Omniback
HPOV dataprotector V.5.00

now please tell me who tells lie?????


Our greatest duty in this life is to help others. And please, if you can't
12 REPLIES 12
Sridhar Bhaskarla
Honored Contributor

Re: Top vs Glance output, which is correct?

Hi,

It depends on the time at which both took the samples. top gets it's data from kernel counters whereas a glance pulls it from it's own measurement instrumention. Since both pull from different data sources, I wouldn't try compare them one to one.

Atleast top 10 processes should match. I wouldn't bother much about their order as it is dependent on the sampling time.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Cem Tugrul
Esteemed Contributor

Re: Top vs Glance output, which is correct?

Hi Sridhar,

Thank's so much for your kind concern...
here are some specs from Glanceplus belongs "rds" processes


System Calls PID: 6649, rds PPID: 1 euid: 0 User: root
Elapsed Elapsed
System Call Name ID Count Rate Time Cum Ct CumRate CumTime
--------------------------------------------------------------------------------
select 93 10 2.0 8.00289 61 2.0 50.00019
gettimeofday 116 2 0.4 0.00000 12 0.3 0.00005
sched_yield 341 0 0.0 0.00000 63 2.0 0.00081
clock_gettime 346 2 0.4 0.00001 12 0.3 0.00009
nanosleep 353 5 1.0 5.05286 25 0.8 25.25240
ksleep 398 4 0.8 12.05942 24 0.7 72.36591
kwakeup 399 2 0.4 0.00049 12 0.3 0.00098

Resources PID: 6649, rds PPID: 1 euid: 0 User: root
--------------------------------------------------------------------------------
CPU Usage (util): 0.0 Log Reads : 0 Wait Reason : SLEEP
User/Nice/RT CPU: 0.0 Log Writes: 0 Total RSS/VSS :184.5mb/194.5mb
System CPU : 0.0 Phy Reads : 0 Traps / Vfaults: 1/ 0
Interrupt CPU : 0.0 Phy Writes: 0 Faults Mem/Disk: 0/ 0
Cont Switch CPU : 0.0 FS Reads : 0 Deactivations : 0
Scheduler : HPUX FS Writes : 0 Forks & Vforks : 0
Priority : 168 VM Reads : 0 Signals Recd : 0
Nice Value : 20 VM Writes : 0 Mesg Sent/Recd : 0/ 0
Dispatches : 44 Sys Reads : 0 Other Log Rd/Wt: 0/ 0
Forced CSwitch : 3 Sys Writes: 0 Other Phy Rd/Wt: 0/ 0
VoluntaryCSwitch: 19 Raw Reads : 0 Proc Start Time
Running CPU : 3 Raw Writes: 0 Fri Sep 17 20:59:10 2004
CPU Switches : 7 Bytes Xfer: 0kb :

Resources PID: 6649, rds PPID: 1 euid: 0 User: root
--------------------------------------------------------------------------------
CPU Usage (util): 0.0 Log Reads : 0 Wait Reason : SLEEP
User/Nice/RT CPU: 0.0 Log Writes: 0 Total RSS/VSS :184.5mb/194.5mb
System CPU : 0.0 Phy Reads : 0 Traps / Vfaults: 1/ 0
Interrupt CPU : 0.0 Phy Writes: 0 Faults Mem/Disk: 0/ 0
Cont Switch CPU : 0.0 FS Reads : 0 Deactivations : 0
Scheduler : HPUX FS Writes : 0 Forks & Vforks : 0
Priority : 168 VM Reads : 0 Signals Recd : 0
Nice Value : 20 VM Writes : 0 Mesg Sent/Recd : 0/ 0
Dispatches : 44 Sys Reads : 0 Other Log Rd/Wt: 0/ 0
Forced CSwitch : 3 Sys Writes: 0 Other Phy Rd/Wt: 0/ 0
VoluntaryCSwitch: 19 Raw Reads : 0 Proc Start Time
Running CPU : 3 Raw Writes: 0 Fri Sep 17 20:59:10 2004
CPU Switches : 7 Bytes Xfer: 0kb :

System Calls PID: 6649, rds PPID: 1 euid: 0 User: root
Elapsed Elapsed
System Call Name ID Count Rate Time Cum Ct CumRate CumTime
--------------------------------------------------------------------------------
select 93 15 3.0 12.00278 871 2.4 697.98374
gettimeofday 116 3 0.6 0.00001 173 0.4 0.00080
sched_yield 341 21 4.2 0.00031 1183 3.3 0.01600
clock_gettime 346 3 0.6 0.00002 173 0.4 0.00182
nanosleep 353 5 1.0 5.04990 345 0.9 348.44531
ksleep 398 6 1.2 18.08921 346 0.9 1043.15655
kwakeup 399 3 0.6 0.00008 173 0.4 0.00475

Thread List PID: 6649, rds PPID: 1 euid: 0 User: root
CPU Util CPU Tm Phys Logl Block
TID ( 800% max) Cum IO Rate IO Rate Scheduler Pri On
--------------------------------------------------------------------------------
6900 0.0/ 0.0 107.8 0.0/ 0.0 0.0/ 0.0 HPUX 168 SLEEP
6901 0.0/ 0.0 0.1 0.0/ 0.0 0.0/ 0.0 HPUX 154 SYSTM
6902 0.0/ 0.0 231.3 0.0/ 0.6 0.0/ 0.6 HPUX 154 SYSTM
6904 0.0/ 0.0 10.3 0.0/ 0.0 0.0/ 0.0 HPUX 154 SYSTM
6903 0.0/ 0.1 2179.5 0.0/ 0.0 0.0/ 6.4 HPUX 154 SYSTM
6905 0.0/ 0.0 571.0 0.0/ 0.0 0.0/ 0.0 HPUX 154 SYSTM
6906 0.0/ 0.0 99.9 0.0/ 0.0 0.0/ 0.0 HPUX 154 SLEEP
6908 0.0/ 0.4 12896.7 0.0/ 0.1 0.0/ 7.3 HPUX 154 SYSTM
6909 0.0/ 0.5 14321.4 0.0/ 0.1 0.0/ 7.3 HPUX 154 SYSTM
6907 0.0/ 0.4 12211.9 0.0/ 0.1 0.0/ 6.8 HPUX 154 SYSTM
6915 0.0/ 0.0 825.9 0.0/ 0.0 0.0/ 0.0 HPUX 154 SLEEP

AND FINALLY from top;
CPU TTY PID USERNAME PRI NI SIZE RES STATE TIME %WCPU %CPU COMMAND
4 ? 6649 root 152 20 204M 187M run 789:19 98.84 98.67 rds
3 ? 23910 ut1ia 235 20 3677M 5364K run 4:01 95.56 95.39 oraclebaan01
4 ? 3628 ut2ad 233 20 32584K 6556K run 796:55 60.35 60.24 oracle8
6 ? 3630 ut2ad 154 20 3677M 5364K sleep 435:26 33.68 33.62 oraclebaan01
0 ? 3627 ut2ad 154 20 30188K 8644K sleep 152:45 11.90 11.88 bshell
1 ? 1900 root -16 20 41092K 18804K run 2734:40 9.56 9.54 midaemon
3 ? 2610 ut1ou 154 20 32584K 6556K sleep 0:33 3.73 3.72 oracle8
3 ? 1476 ut0iy 154 20 3677M 5300K sleep 1:31 2.83 2.82 oraclebaan01
3 ? 1829 ut0ht 154 20 29164K 7620K sleep 2:07 2.19 2.18 bshell
0 ? 2612 ut1ou 154 20 3677M 5300K sleep 0:31 2.19 2.18 oraclebaan01
6 ? 2602 ut1ou 154 20 29164K 7620K sleep 1:30 1.76 1.76 bshell
6 ? 2008 kom01 154 20 32236K 10692K sleep 1:02 1.74 1.73 bshell
1 ? 2009 kom01 154 20 42824K 16796K sleep 0:57 1.69 1.69 oracle8
1 ? 28045 ut4my 154 20 26092K 4548K sleep 0:00 2.55 1.46 bshell
2 ? 11289 ut3ae 154 20 31212K 9668K sleep 0:19 1.41 1.41 bshell
2 ? 23908 ut1ia 154 20 39752K 13724K sleep 0:09 1.26 1.26 oracle8
4 ? 20710 bm001 154 20 3677M 4276K sleep 1:01 1.24 1.24 oraclebaan01
6 ? 19474 ut0et 154 20 27116K 5572K sleep 0:10 1.16 1.16 bshell
2 ? 41 root 152 20 1920K 1920K run 191:42 1.10 1.10 vxfsd
2 ? 23907 ut1ia 154 20 35308K 13764K sleep 0:06 1.10 1.10 bshell
6 ? 2011 kom01 154 20 3681M 9396K sleep 2:41 1.06 1.05 oraclebaan01
2 ? 25664 ut0dy 154 20 3677M 4276K sleep 0:05 0.99 0.98 oraclebaan01
3 ? 11292 ut3ae 154 20 3677M 5364K sleep 0:23 0.95 0.95 oraclebaan01

Please share your comments,

Our greatest duty in this life is to help others. And please, if you can't
Borislav Perkov
Respected Contributor

Re: Top vs Glance output, which is correct?

Hi,
GlancePlus is more reliable than top, you should beleive it. top doesn't take the parameters from the same place like GlancePlus did, and dont forget that GlancePlus is HP SW Product.
Regards,
Borislav
Sridhar Bhaskarla
Honored Contributor

Re: Top vs Glance output, which is correct?

Well - you can't really compare them with the information you provided as both were in different states. When glance took the sample, rds process was sleeping and when top took it, it was running. So, looking at cumulative CPUs of both the tools over a certain period may make some sense but I wouldn't go too far in trying to compare piece to piece.

'top' may report wrong results depending on the patch levels though on 11i it seems to be fairly good. I use top just to have a quick look at the system. But I would always rely on glance as it gives a lot more information than top.

-Sri

You may be disappointed if you fail, but you are doomed if you don't try
Cem Tugrul
Esteemed Contributor

Re: Top vs Glance output, which is correct?

$ man top
blahblah....

AUTHOR
top was developed by HP and William LeFebvre of Rice University.

Hewlett-Packard Company - 4 - HP-UX Release 11i: March 2002

On the other hand;what about iostat,sar,vmstat???
so Don't we trust this base programmes???
i am lucky because i am licensed GlancePlus.
and i know glance can not compare with others
but i believe there must hardly enough regularity between GlancePlus and other basic programmes...
Finally,i rely on Glance and think there is a "bug" on "top" program so waiting pacth
announces from HP...

Best Regards,

Our greatest duty in this life is to help others. And please, if you can't
Cheryl Griffin
Honored Contributor
Solution

Re: Top vs Glance output, which is correct?

In addition to the points already made, Glance provides the best results as it offers the data in much greater granularity than what top provides.

In addition, make sure you have this patch installed:
PHCO_29072 s700_800 11.11 top(1) cumulative patch
"Downtime is a Crime."
Geoff Wild
Honored Contributor

Re: Top vs Glance output, which is correct?

You have to compare at same time - very hard to do...

I like to use sar and vmstat...

both top and glance are fine...

Attached is a script I picked up called sar-collect - might be useful for you.


Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Steven E. Protter
Exalted Contributor

Re: Top vs Glance output, which is correct?

Both are correct.

They use different data and collection methodology.

Want more information, run the script I'm attaching.

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
Stuart Urquhart
Frequent Advisor

Re: Top vs Glance output, which is correct?

Although it's no help I see exactly the same thing - top consistently, and over long periods, shows rds at the top, glance doesn't show it anywhere. I think in our case glance is probably right, just because the glance cpu times add up OK compared to sar cpu times. And the top idle times are for too high for the CPU usage times top shows for rds.
Cheryl Griffin
Honored Contributor

Re: Top vs Glance output, which is correct?

here's the issue:
Patch Name: PHKL_29198
Patch Description: s700_800 11.11 Psets Enablement Patch; top(1)

Which resolves:
top(1) shows inflated CPU usage for a process with detached threads.

There is no fix for 11.00.
"Downtime is a Crime."
Cem Tugrul
Esteemed Contributor

Re: Top vs Glance output, which is correct?

Hello,
i have downloaded PHKL_29198 and i will apply
it on this Friday after my OFFLINE_bck because it is my production srv and the patch needs reboot so i will inform all of you about my experience whether succeed or not...

Thank's so much for your kind concern and support...

Best Regards,
Our greatest duty in this life is to help others. And please, if you can't
Cem Tugrul
Esteemed Contributor

Re: Top vs Glance output, which is correct?

PHKL_29198 patch as Cherly's pointed out
solved the problem...
Our greatest duty in this life is to help others. And please, if you can't