[users at i-scream] libstatgrab on AIX: data mismatch between saidar and topas

Anderson Carlos Trindade anderson.trindade at optimode.com.br
Mon May 23 20:29:42 BST 2016


Hi,

The libstatgrab version I’m using is 0.91.
The cpu_usage provides output similar to the saidar, as below (proved by hight IDLE %)

 User CPU       : 112 ( 12.44)
 Kernel CPU     : 6 (  0.67))
 IOWait CPU     : 75 (  8.33)
 Swap CPU       : 0 (  0.00)
 Nice CPU       : 0 (  0.00)
 Idle CPU       : 707 ( 78.56))
 Ctxts          : 1876
   Voluntary    : 0
   Involuntary  : 0
 Syscalls       : 10516
 Intrs          : 517
 SoftIntrs      : 55

I had been talking to a fried which worked with AIX. He believes that the sample code I got from IBM site as well as topas (and vmstat too) are reporting information about the whole physical machine and saidar is reporting information just about the “LPAR” where saidar is running. Does it make sense to you?



> Em 23 de mai de 2016, à(s) 15:07, Jens Rehsack <rehsack at gmail.com> escreveu:
> 
> Hi Anderson,
> 
> given the libstatgrab ist compiled on your own and is most recent version, I'd need to dig into it to see what's going on.
> Does ./examples/cpu_usage proves saidar or sample code?
> 
> Maybe truss output of saidar helps out to see what's wrong ...
> 
> Cheers,
> Jens
> 
>> Am 23.05.2016 um 18:54 schrieb Anderson Carlos Trindade <anderson.trindade at optimode.com.br>:
>> 
>> Hi Jens,
>> 
>> Thank you for reply!
>> 
>> As far as I know, topas seems to be an AIX utility (https://www.ibm.com/support/knowledgecenter/#!/ssw_aix_71/com.ibm.aix.cmds5/topas.htm), but I can’t tel you where the data displayed by topas is coming from.
>> 
>> But let’s forget topas for a moment.
>> 
>> I got a sample code from IBM site (https://www.ibm.com/support/knowledgecenter/#!/ssw_aix_53/com.ibm.aix.prftools/doc/prftools/prftools07.htm%23wq407), which uses perfstat to report cpu usage statistics.
>> 
>> Then, I compiled this sample code and run in parallel to saidar, each one in a separated SSH session. While saidar is reporting around 80% of Idle time and 10% of user time, the sample code above (based on perfstat) is reporting something around 35% of idle time and 60% of user mode usage. I recorded a screenshot and I can share with you If you prefer.
>> 
>> Considering that saidar and the sample code above are getting data from the same source, why are these statistics so different?
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>> Em 23 de mai de 2016, à(s) 13:02, Jens Rehsack <rehsack at gmail.com> escreveu:
>>> 
>>> Hi,
>>> 
>>>> Am 23.05.2016 um 17:02 schrieb Anderson Carlos Trindade <anderson.trindade at optimode.com.br>:
>>>> 
>>>> Hello List,
>>>> 
>>>> I’m trying to understanding some differences between data reported by AIX utility topas and saidar.
>>>> 
>>>> On a given moment (almost in the same second), saidar report the following CPU usage:
>>>> 
>>>> CPU Idle: 88,28%
>>>> CPU system: 4,72%
>>>> CPU User: 7,00%
>>>> 
>>>> but topas report the following usage:
>>>> 
>>>> %Idle 35,8%
>>>> %Kern 3,5%
>>>> %User: 60,5%
>>>> %Wait 0,2%
>>>> 
>>>> It seems that both utilities are using different sources of data, since the usage reported is very different.
>>>> Please, could you help me to understand where these differences are coming from?
>>> 
>>> Well, I don't know where topas is fetching it's data from - and where your topas comes from (AIX Linux Tools? 3rd party repo?) ....
>>> 
>>> As you can see here https://github.com/i-scream/libstatgrab/blob/master/src/libstatgrab/cpu_stats.c#L162, libstatgrab is using perfstat - the IBM recommendation and the same source used by nmon.
>>> See https://www.ibm.com/support/knowledgecenter/ssw_aix_53/com.ibm.aix.prftools/doc/prftools/prftools07.htm%23wq407 for more details about libperfstat.
>>> 
>>> The reason for enhancing libstatgrab by a former customer was the poor data quality of GNU tools on Unices (HP-UX, AIX, Solaris).
>>> When I'm in doubt, I trust libstatgrab more than all GNU tools together >:-)
>>> 
>>>> my apologies in advance, because I'm very new on AIX world
>>>> 
>>>> This is a LPAR with 4 CPU’s
>>> 
>>> Best regards
>>> --
>>> Jens Rehsack - rehsack at gmail.com
>> 
> 
> --
> Jens Rehsack - rehsack at gmail.com
> 




More information about the users mailing list