The behaviour of systemctl.

Aaron Sowry aaron+rh at aeneby.se
Fri Jun 17 20:16:35 UTC 2011


Hello,

I'd like to discuss the behaviour of systemctl. See RH bug 713567 for context. To summarise:

- 'systemctl --all' pages by default when the output is to tty. This consumes 50-60+ lines of potentially bug-prone code, and irks the crap out of me as a system administrator. systemctl's jurisdiction ends at stdout.

- The same command outputs column headers on tty, and no headers otherwise. This is inconsistent. If I am outputting to a file, or perhaps a printer, and want headers on my non-tty output, I have to add them myself since there is no flag to force them on non-tty channels. If I don't want them and they are present, I tail.

- Currently, if I run 'systemctl --all' and have no pager (at least no pager that systemctl knows of) available, I get an error message and no output. This is horribly bad form, and forces me to use --no-pager or pipe to cat in order to get output. This issue is acknowledged in RH bug 713707.

- Another bright idea (RH bug 713567) is that --full should be applied to non-tty output automatically, and not to tty output.

All of these peculiarities stem from poor UNIX programming practise. Do not try to make decisions for me as a user (especially not based on output channels), about how I want my output formatted. No other Linux/UNIX tools make this assumption (with perhaps the exception of git-log et. al.), and if you are wanting administrators to feel comfortable with your new soon-to-be-ubiquitous tools, then I suggest you try to be consistent with existing convention. I don't want to have to check man pages to see if piping output gives me different results than tty, and I would rather use existing, well-proven tools to format my output than a bunch of flags I have to re-learn just to be able to deal with systemctl. The type of people using systemctl are not the type of people that are going to need hand-holding.

Thanks.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 489 bytes
Desc: Digital signature
Url : http://lists.fedoraproject.org/pipermail/devel/attachments/20110617/7e74b53a/attachment.bin 


More information about the devel mailing list