<div dir="ltr">Hi Auke-jan,<div><br></div><div>I have learned the existence of systemd-cgtop hard way. Thanks for making me aware of it. It makes a lot more sense to put cpuacct information to systemd-cgtop. I have few concerns though. </div>

<div><br></div><div>systemd-cgtop updates itself every x interval and retrieving the unit list from systemd and asking for ControlGroup names on each of the services could be quite expensive. At least on my embedded system, I am afraid that retrieving this information is slower than the default "x" interval of systemd-cgtop. I am aware that frequency of systemd-cgtop can be changed with a command parameter. </div>

<div><br></div><div style>The who purpose of my patch was being able to parse out cpuacct information and keeping it in a database. Parsing out "systemd-analyze blame" output would be much more easier than parsing out "systemd-cgtop -N 1". Should we also provide some kind of output format option to systemd-cgtop?</div>

<div style><br></div><div style>Also, I wanted to have some kind of PIE chart of cpuacct information (I got inspired by systemd-analyze plot). Could this be a feature of systemd-cgtop?</div><div style><br></div><div style>

You could say that I have very specific requirements and advice me to have my own program to satisfy my own needs but any input is welcome.</div><div style><br></div><div style>Thanks,</div><div style>Umut</div></div><div class="gmail_extra">

<br><br><div class="gmail_quote">On Mon, Mar 25, 2013 at 9:59 PM, Kok, Auke-jan H <span dir="ltr"><<a href="mailto:auke-jan.h.kok@intel.com" target="_blank">auke-jan.h.kok@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im">On Sun, Mar 24, 2013 at 11:23 AM, Umut Tezduyar <<a href="mailto:umut@tezduyar.com">umut@tezduyar.com</a>> wrote:<br>
> systemd-analyze blame --type cpuacct displays cpu time<br>
> usage information of the cgroup. The information displayed<br>
> is cpuacct.usage.<br>
><br>
> ControlGroup=cpuacct:/foo/bar for a service would work.<br>
> ControlGroupPersistent=yes for a oneshot service keeps<br>
> cpuacct around so blame can retrieve it.<br>
> DefaultControllers=cpuacct on system.conf can be set<br>
> to have cpuacct same as systemd cgroup.<br>
> ---<br>
>  src/analyze/systemd-analyze.c |  131 +++++++++++++++++++++++++++++++++++++----<br>
>  1 files changed, 119 insertions(+), 12 deletions(-)<br>
<br>
</div>So, I'm not against this patch per se, but, I'm wondering if it's not<br>
better to display this data in systemd-cgtop.<br>
<br>
After all, systemd-analyze is a one-time snapshot and suffers from<br>
data loss when services are restarted, etc.<br>
<br>
Having a method to show cpuacct totals in systemd-cgtop seems much<br>
more useful. You could modify the code to show totals instead of<br>
percentages, etc.<br>
<br>
Have you thought about doing that?<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
Auke<br>
</font></span></blockquote></div><br></div>