[systemd-devel] [PATCH 2/2] systemd-analyze: --type cpuacct option for blame

Lennart Poettering lennart at poettering.net
Tue Mar 26 07:18:36 PDT 2013


On Tue, 26.03.13 12:14, Umut Tezduyar (umut at tezduyar.com) wrote:

> Hi Auke-jan,
> 
> 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.
> 
> 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.
> 
> 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?

It sounds like a very good idea to make "systemd-cgtop"'s output
"pipeable". Maybe if cgtop detects that STDOUT is not a tty it should
only run once instead of continously and output its stuff in a parsable
form.

> 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?

I guess, it shouldn't be too hard to add that, and given that writing
SVGs doesn't pull in any deps really I'd be happy to add a flag for
that.

I would prefer if we did this in cgtop rather than systemd-analyze I
must say.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list