CPU Usage in SpyReport - VxWorks

This is a discussion on CPU Usage in SpyReport - VxWorks ; Hello All, I am trying to use the spyLib to get the CPU information for my tasks. My spyReport says that the total CPU usage is 82%. My understanding is that the total CPU usage should be always 100% or ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: CPU Usage in SpyReport

  1. CPU Usage in SpyReport

    Hello All,
    I am trying to use the spyLib to get the CPU information for my
    tasks. My spyReport says that the total CPU usage is 82%.
    My understanding is that the total CPU usage should be always 100%
    or very close to this figure. The CPU time used by all tasks should add
    up to this figure.
    Can anyone please help me to figure this out?
    Thanks in advance

    Regards,
    Gautam Rao


    Extract of SPY Report provided below for reference.

    NAME ENTRY TID PRI total % (ticks) delta %
    (ticks)
    -------- -------- ----- --- ---------------
    ---------------
    tRootTask usrRoot 37ffdf0 0 0% ( 0) 0% (
    0)
    tExcTask excTask 2feea20 0 0% ( 4) 0% (
    1)
    tLogTask logTask 2fd66b0 0 0% ( 0) 0% (
    0)
    tShell shell 2636090 1 0% ( 3) 0% (
    3)
    tWdbTask wdbTask 263d090 3 0% ( 0) 0% (
    0)
    tNetTask netTask 2645980 50 3% ( 266) 3% (
    167)
    tPortmapd portmapd 2640670 54 0% ( 0) 0% (
    0)
    cpciCommSvr 2fdc500 55 0% ( 0) 0% (
    0)
    tTelnetd telnetd 2642a20 55 0% ( 0) 0% (
    0)
    tLinkChk ethDrvLink 2299400 100 0% ( 0) 0% (
    0)
    nt0 tskAllTask 1d90500 205 0% ( 26) 0% (
    14)
    nt1 tskAllTask 1d61fd0 205 0% ( 24) 0% (
    18)
    nt2 tskAllTask 1d33aa0 205 0% ( 21) 0% (
    17)
    nt3 tskAllTask 1d05570 205 0% ( 41) 0% (
    26)
    nt4 tskAllTask 1cd7040 205 0% ( 22) 0% (
    17)
    nt5 tskAllTask 1ca8b10 205 0% ( 27) 0% (
    22)
    nt6 tskAllTask 1c7a5e0 205 0% ( 16) 0% (
    9)
    nt7 tskAllTask 1c4c0b0 205 0% ( 36) 0% (
    23)
    nt8 tskAllTask 1c1db80 205 0% ( 27) 0% (
    19)
    nt9 tskAllTask 1bef650 205 0% ( 34) 0% (
    23)
    LOG tskAllTask 1ba9010 205 0% ( 0) 0% (
    0)
    nT0 tskAllTask 1b77a00 205 0% ( 8) 0% (
    5)
    nT1 tskAllTask 1b66d50 205 0% ( 7) 0% (
    4)
    nT2 tskAllTask 1b560a0 205 0% ( 11) 0% (
    9)
    nT3 tskAllTask 1b453f0 205 0% ( 11) 0% (
    6)
    VIDL tskAllTask 2509040 254 74% ( 6582) 69% (
    3399)
    KERNEL 1% ( 112) 1% (
    72)
    INTERRUPT 0% ( 33) 0% (
    24)
    IDLE 0% ( 2) 0% (
    1)
    TOTAL 82% ( 8798) 79% (
    4913)

    1366 tasks were created.
    1439 tasks were deleted.


  2. Re: CPU Usage in SpyReport

    > 1366 tasks were created.
    > 1439 tasks were deleted.


    I've used spyLib before and didn't have this problem - however, I'm
    guessing it might be something to do with these figures. Perhaps there
    are tasks that did some work and were deleted before the spyLib report
    was generated, and their stats are not being listed. The spy job knows
    how many ticks were in the last "spying" interval, and is using that
    total to calculate percentages; hence, you get a total of < 100%
    (because the CPU usage of deleted tasks is not being shown). That's my
    guess, anyway.

    More to the point - why are you creating/deleting so many tasks in such
    a short space of time?


  3. Re: CPU Usage in SpyReport

    Hello Ben,
    Thanks for your reply. I changed the program so that so many tasks
    are not created/deleted in such a short span of time. Now the spylib
    report shows the total as close to 95%. The other 5% is due to rounding
    off errors in the percentage column.

    Regards,
    Gautam Rao


+ Reply to Thread