[systemd-devel] journalctl --unit and pattern

Cecil Westerhof cldwesterhof at gmail.com
Mon Dec 18 23:00:35 UTC 2017


2017-12-18 22:53 GMT+01:00 Kai Krakow <hurikhan77 at gmail.com>:

> Am Mon, 18 Dec 2017 18:01:21 +0100 schrieb Cecil Westerhof:
>
> > At the moment I am using:
> >     journalctl --boot --follow --no-tail --unit storeSystemStatistics
> > --unit vmstatLog
> >
> > But instead of unit names you  should be able to use a pattern. I tried
> the
> > following:
> >     --unit "storeSystemStatistics|vmstatLog"
> >
> > ​And variants on it, but could not make it work.
> >
> > How should I use a pattern. (I could not find info about it.)​
>
> You can exploit bash expansion for that:
>
> $ journalctl --boot --follow --notail --unit={storeSystemStatistics,
> vmstatLog}
>
> Note the equal sign...
>
> The curly braces will the be expanded into two separate unit parameters
> before being passed to the journalctl command.
>

​Works like a charm. Thanks.

-- 
Cecil Westerhof
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20171219/3171bba8/attachment.html>


More information about the systemd-devel mailing list