cpuuse

Claus, Ric claus at slac.stanford.edu
Sun Jan 5 20:24:05 UTC 2014


Sometimes I see 'cpuuse' give results like the following:

[/] cpuuse
-------------------------------------------------------------------------------
                              CPU USAGE BY THREAD
------------+----------------------------------------+---------------+---------
 ID         | NAME                                   | SECONDS       | PERCENT
------------+----------------------------------------+---------------+---------
 0x09010001 | IDLE                                   |     33.568522 | 192.351
 0x0a010001 | tcpI                                   |4294966091.3351480 |4294960389.4294966833
 0x0a010002 | Xinp                                   |   1187.924336 |6800.972
 0x0a010003 | CSHL                                   |      0.057157 |   0.327
 0x0b010001 |                                        |      0.000000 |   0.000
 0x0b010002 |                                        |      0.000078 |   0.000
 0x0b010003 |                                        |      0.000265 |   0.001
 0x0b010004 |                                        |      0.054508 |   0.311
------------+----------------------------------------+---------------+---------
 TIME SINCE LAST CPU USAGE RESET IN SECONDS:                         17.501697
-------------------------------------------------------------------------------

These things can happen in combination or individually:
- the numbers in the seconds column are either individually greater than the time since last reset
- the numbers in the seconds column sum up to be greater than the time since last reset
- one or more of the numbers in the percent column is greater than 100
- the sum of the numbers in the percent column is greater than 100

I think, but am not sure, that these nonsensical results show up when either CPU usage by a task other than IDLE is ~100%, and/or the interrupt rate is high.  In the above case I was sending UDP packets to the RTEMS system (with the LWIP network stack instead of the standard one) at almost, but not quite, the maximum rate.

The RTEMS version is from a recent HEAD and the platform is a xilinx-zynq board.  The nameless threads are pthreads whereas the named threads are normal RTEMS tasks.

Anyone have any idea about this or how to go about fixing it?

Thanks,
             Ric



More information about the users mailing list