Re: 回复: Is it possible to send a string to the journal of one specific systemd unit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2021-10-22 at 08:42 +0000, DHAIY DHAIY wrote:
> But is there a way to insert one string from command-line into
> myservice's journal so that it can be seen byjournalctl -u myservice
> later

Try this:

$ echo "foo" | systemd-cat -t foobar

Then you can access your string with:

$ journalctl -t foobar

S




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux