[HEADS-UP] systemd for F14 - the next steps

Lennart Poettering mzerqung at 0pointer.de
Thu Jul 22 23:43:42 UTC 2010


On Thu, 22.07.10 13:39, Jeff Spaleta (jspaleta at gmail.com) wrote:

> On Thu, Jul 22, 2010 at 12:17 PM, Horst H. von Brand
> <vonbrand at inf.utfsm.cl> wrote:
> > Great to know about that. And yes, it  is extremely relevant for a sysadmin
> > to know how to tickle the system so it spits out awk(1)-able logs and stuff.
> 
> 
> Hmm... can these tools learn to prefer a certain format when they are
> piped into another program and then prefer a different format when
> they are just outputting to an active console. And then the preferred
> behaviour can be overridden when specific commandline arguments are
> present?  Don't other tools exhibit this sort of functionality?
> 
> foo show | awk    would assume one line awkable output
> foo show            would assume human readable
> foo show -1         would force one line awkable output
> foo show -v | awk         would force human readable into awk

Well, I think is very confusing for the user if he wants to write awk
scripts and it turns out what is read through awk is different from what
he himself sees on screen.

That said, systemctl actually generates different output when used on a
tty (i.e. isatty(STDOUT_FILENO) > 0) and when not. However, we do not
change the actual contents, but just drop the ansi coloring (we normally
hightlight all failed units in red, to give the admin a clear indication
that there's something to look into), and suppress a helpful descriptive
legend text we sometimes show at the end of the output. But again, the
actual content we don't change depending on the kind of stderr, and I am
strongly against doing this.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the devel mailing list