1

For example one common way to check on a dd process is to use watch i.e. sudo kill -USR1 $(pgrep ^dd). Notably the process pid changes since a new kill command is called every-time.

Is there a good way to filter outputs of certain recurring sources from journalctl output without relying on pid ?

3
  • Are your tasks executed by systemd unit files? If so, journalctl -u <unit>
    – jordanm
    Commented Apr 29, 2015 at 18:30
  • @jordanm No they aren't -- would you recommend writing common ones as unit-files? Is there a better alternative? Commented Apr 29, 2015 at 18:44
  • Wow. complete bounty failure. Not even an extra comment =/ let alone an upvote. Commented May 11, 2015 at 1:11

1 Answer 1

2

You need to give these processes an identifier, then you can filter on the identifier using

journalctl -f -t <identifier>

Example:

$ systemd-cat -t myapp echo "lol"
$ journalctl -f -t myapp
-- Logs begin at Tue 2017-10-24 09:11:37 CEST. --
Oct 31 17:26:46 travers myapp[5190]: lol

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .