Systemd needs sensible, non-truncated output

July 15, 2013

If you run 'systemctl status <service>', you get (among other things) some recent log messages from the service in question. Well, in theory you get that. In practice, well, here is part of what one of my machines shows:

Jul 15 17:18:20 mumble123.cs.toronto.edu unbound[31622]: [31622:0] notice: in...

Yeah.

What's Unbound trying to tell me? I have no idea because systemd has truncated the output in a useless way. I don't believe in truncating output by default to start with but if systemd is going to do it it should do it intelligently. Almost all of this line is useless. Especially useless is the huge hostname, because by definition systemctl is reporting on things from the local machine.

Of course, you may say, systemd is really just reporting some lines from syslog and chopping them off at 77 characters and thus the formatting is not its fault. Well, actually, it is. If systemd is going to truncate the output at all, it has to take responsibility for the formatting of the whole thing; effectively the rule is 'you break it, you own it'. Truncating the output is breaking it, so it becomes systemd's job to make it useful again.

Unfortunately this isn't a small issue. If you have a service that doesn't start, these very log messages may contain important information, information that systemd by default won't show you. You can make systemd show you in various ways (piping the output to something, remembering the --full argument, and probably others), but speaking as a sysadmin, you shouldn't have to remember any of this. Systemd should do the right thing by default because sysadmins already have enough to keep track of and truncating the output (especially in useless ways) is almost never what we want.

Written on 15 July 2013.
« Git's petty little irritation for me
Do specific HTTP error codes actually matter? »

Page tools: View Source.
Search:
Login: Password:

Last modified: Mon Jul 15 23:54:06 2013
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.