[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 17:54:27 BST 2016


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 <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 <https://www.ibm.com/support/knowledgecenter/#!/ssw_aix_53/com.ibm.aix.prftools/doc/prftools/prftools07.htm#wq407>), 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 <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 <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 <mailto:rehsack at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.i-scream.org/pipermail/users/attachments/20160523/1efb37e7/attachment.html>


More information about the users mailing list