Sample Header Ad - 728x90

Cumulative CPU time across reboots

0 votes
0 answers
101 views
**How can I record and view cumulative CPU time on system across reboots?** Essentially, it should be like the TIME+ column of top, but not per process. In other words, like vnstat, but for CPU time. I am the only user on the system. ###### vnstat:
daily
                     rx      |     tx      |    total    |   avg. rate
     ------------------------+-------------+-------------+---------------
     yesterday      4.30 MiB |    2.42 MiB |    6.72 MiB |    0.64 kbit/s
         today      2.03 MiB |    1.07 MiB |    3.10 MiB |    0.59 kbit/s
     ------------------------+-------------+-------------+---------------
     total          6.33 MiB |    3.49 MiB |    9.82 MiB |    0.62 kbit/s
###### Desired:
daily
                     CPU time | % of day 
     -------------------------+-------
     2023-08-01         0 s    |  0.0%
     2023-08-02         0 s    |  0.0%
     2023-08-03         0 s    |  0.0%
     2023-08-04      1052 s    |  1.2%
     2023-08-05      7200 s    |  8.3%
     --------------------------+--------
     total           8252 s    |  4.8% (avg)
**I'm really only interested in the total CPU time and CPU seconds ÷ seconds since monitoring started.**
Asked by wjwrpoyob (460 rep)
Aug 28, 2023, 12:42 AM
Last activity: Sep 16, 2023, 01:16 AM