Re: fooling a non-"stdin redirection accepting" app (colortail)??
On 11/24/12, Sven Joachim <svenjoac@gmx.de> wrote:
> On 2012-11-24 11:36 +0100, Zenaan Harkness wrote:
>> On 11/24/12, Sven Joachim <svenjoac@gmx.de> wrote:
>>> Probably "colortail -f <(systemd-journalctl -f)" will do the trick.
>>
>> This doesn't work - I guess "<" is still a redirection to stdin or
>> something.
>
> No.
thanks for checking
>> For colortail, we need to auto-generate the corresponding filename for
>> stdin.
>
> It reports /dev/fd/63 here. Since I did not boot with systemd as PID 1,
I get the same
> I tested with "colortail -f <(tail -f /var/log/auth.log)", however.
Yes, this works.
Here are my attempts:
$ colortail -f <(systemd-journalctl -f)
Showing user generated messages only. Users in the group 'adm' can see
all messages. Pass -q to turn this message off.
==> /dev/fd/63 <==
# no more output
$ colortail -f <(systemd-journalctl -n 2)
Showing user generated messages only. Users in the group 'adm' can see
all messages. Pass -q to turn this message off.
==> /dev/fd/63 <==
Nov 22 22:50:52 localhost xscreensaver[1763]: pam_winbind(xscreensaver:auth)...)
Nov 22 22:50:55 localhost xscreensaver[1763]: FAILED LOGIN 1 ON DISPLAY ":0"..."
# I'm guessing no more output can be got at this point
$ colortail -f <(systemd-journalctl -n 2 -f)
Showing user generated messages only. Users in the group 'adm' can see
all messages. Pass -q to turn this message off.
==> /dev/fd/63 <==
# no more output
$ colortail -f <(sudo systemd-journalctl -f)
==> /dev/fd/63 <==
# no more output
$ colortail -f <(sudo systemd-journalctl -f -n 10)
==> /dev/fd/63 <==
# no more output
$ colortail -f <(sudo systemd-journalctl -f 2>&1)
==> /dev/fd/63 <==
# no more output
$ colortail -f <(sudo systemd-journalctl)
... this produces the full journal/syslog ...
... and does not actually follow (not surprising, since no -f option
to journalctl)
$ sudo colortail -f <(sudo systemd-journalctl -f)
colortail: Failed to open file: /dev/fd/63
==> /dev/fd/63 <==
# no more output
$ sudo colortail -f <(systemd-journalctl -f)
Showing user generated messages only. Users in the group 'adm' can see
all messages. Pass -q to turn this message off.
colortail: Failed to open file: /dev/fd/63
==> /dev/fd/63 <==
# no more output
Seems a hard nut to crack... evidently systemd-journalctl does not
output in the same way as tail command...
Reply to: