You are not logged in.

#1 2013-05-13 23:46:20

FrozenCow
Member
Registered: 2011-02-03
Posts: 19

[SOLVED] systemctl dot or how to generate dependency graph of systemd?

Does anyone know what is going on with "systemctl dot"? It should generate a dependency graph of the (I'd imagine) different targets and services that are defined in systemd.
My autocompletion (zsh) says that "systemctl dot" should be available, but when issued it returns "Unknown operation 'dot'."
I've looked online and the command does seem to be used by some others exactly the way I'm calling it (without any other arguments, with root and without root).

I'd really like to have a better view of my services now that I've set up systemd for my user-session as well. Does anyone know what's the problem with "systemctl dot" and/or has an alternative to get such a dependency graph?

Last edited by FrozenCow (2013-05-14 00:02:53)

Offline

#2 2013-05-13 23:51:33

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] systemctl dot or how to generate dependency graph of systemd?

pacman -S graphviz

Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2013-05-13 23:55:55

FrozenCow
Member
Registered: 2011-02-03
Posts: 19

Re: [SOLVED] systemctl dot or how to generate dependency graph of systemd?

jasonwryan wrote:
pacman -S graphviz

Ok, a graph visualizer is one step in the process, but I mean a way to generate a dot file (or svg or something) of the different services and targets that are defined in systemd. It should be possible from what I gathered online, but I couldn't find it.

I forgot to mention, I do know about "systemd-analyze plot", but that's not really a dependency graph. It mostly visualizes my current boot and their times, not explicitly the relations.

EDIT: Argh, upon mentioning systemd-analyze I thought to check out the other options... there it is: "systemd-analyze dot"... simple :-/ I remember I've looked through the options of systemd-analyze before and didn't find 'dot' before.

Anyway... this thread is solved.

To create a graph from your system use:

systemd-analyze dot --order | dot -Tsvg > systemd-user.svg

To create a graph from your user-session use:

systemd-analyze dot --user --order | dot -Tsvg > systemd-user.svg

I feel kindof dumb, but hopefully this is useful for others as well. It might be a good idea to remove 'systemctl dot' from autocompletion package. I guess it is a depricated command.

Last edited by FrozenCow (2013-05-14 00:04:40)

Offline

Board footer

Powered by FluxBB