<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hi,<br>
<br>
I wanted to have an overview on CPU usage but I'm getting strange values. Basically every 5 secs I want a report from my init task:<br>
<br>
while(true) {<br>
rtems_cpu_usage_reset(); <br>
sleep(5); <br>
rtems_cpu_usage_report();<br>
}<br>
<br>
The first time the data seems OK on the idle system but from the second output then I can't make any sense of it. Have I missed something?<br>
<br>
The result is: <br>
-------------------------------------------------------------------------------<br>
CPU USAGE BY THREAD<br>
------------+----------------------------------------+---------------+---------<br>
ID | NAME | SECONDS | PERCENT<br>
------------+----------------------------------------+---------------+---------<br>
0x09010001 | IDLE | 4.995655 | 99.135<br>
0x0A010001 | CCRx | 0.000000 | 0.000<br>
0x0A010002 | TATx | 0.000000 | 0.000<br>
0x0A010003 | UI1 | 0.070863 | 1.398<br>
0x0A010004 | MMTD | 0.000000 | 0.000<br>
0x0A010005 | MMTQ | 0.000000 | 0.000<br>
0x0A010006 | HKTQ | 0.000000 | 0.000<br>
0x0A010007 | TMTQ | 0.000000 | 0.000<br>
0x0A010008 | TMTT | 0.000000 | 0.000<br>
0x0A010009 | TMTU | 0.000000 | 0.000<br>
0x0A01000A | TCTQ | 0.000000 | 0.000<br>
0x0A01000B | TCTC | 0.000000 | 0.000<br>
0x0A01000C | SPTQ | 0.000000 | 0.000<br>
0x0A01000D | SPTR | 0.000000 | 0.000<br>
0x0A01000E | UATQ | 0.000000 | 0.000<br>
0x0A01000F | UATR | 0.000000 | 0.000<br>
0x0A010010 | RMON | 0.000000 | 0.000<br>
------------+----------------------------------------+---------------+---------<br>
TIME SINCE LAST CPU USAGE RESET IN SECONDS: 5.182685<br>
-------------------------------------------------------------------------------<br>
-------------------------------------------------------------------------------<br>
CPU USAGE BY THREAD<br>
------------+----------------------------------------+---------------+---------<br>
ID | NAME | SECONDS | PERCENT<br>
------------+----------------------------------------+---------------+---------<br>
0x09010001 | IDLE | 6.521875 | 128.061<br>
0x0A010001 | CCRx | 0.000000 | 0.000<br>
0x0A010002 | TATx | 0.000000 | 0.000<br>
0x0A010003 | UI1 | 0.068974 | 1.339<br>
0x0A010004 | MMTD | 0.000000 | 0.000<br>
0x0A010005 | MMTQ | 0.000000 | 0.000<br>
0x0A010006 | HKTQ | 0.000000 | 0.000<br>
0x0A010007 | TMTQ |4294967293.864541 |3527535.838<br>
0x0A010008 | TMTT | 0.000000 | 0.000<br>
0x0A010009 | TMTU | 0.000000 | 0.000<br>
0x0A01000A | TCTQ | 0.000000 | 0.000<br>
0x0A01000B | TCTC | 0.000000 | 0.000<br>
0x0A01000C | SPTQ | 0.035310 | 0.663<br>
0x0A01000D | SPTR | 0.714130 | 13.368<br>
0x0A01000E | UATQ | 0.000000 | 0.000<br>
0x0A01000F | UATR | 0.000000 | 0.000<br>
0x0A010010 | RMON | 0.000000 | 0.000<br>
------------+----------------------------------------+---------------+---------<br>
TIME SINCE LAST CPU USAGE RESET IN SECONDS: 5.405170<br>
-------------------------------------------------------------------------------<br>
</div>
</body>
</html>