Jump to content

Recommended Posts

Posted

Whilst there are some threads concerning systemd there does not seem to be a thread about using systemd that I can find so this is just such a thread.

This is a thread to post useful information on the general usage of systemd for whatever os.

 

My tip is a little outside my knowledge zone but I can see that it looks very useful. :look:

 

http://jjacky.com/2013-10-06-run-triggers-on-systemd-journal-messages/

 

Installed as a service, it runs in the background and whenever a matching messages is added to the journal, the corresponding action is triggered. Exactly what I was looking for.

For example, an error can sometimes occur leading to the network being down, as the interface goes down with a speed/duplex mismatch error. This doesn't happen very often and is easy enough to fix once the problem has been identified, but now I don't have to, thanks to a simple rule like the following:

[Rule]

trigger=systemctl restart network.service

[Filter]

_KERNEL_DEVICE=+pci:0000:02:00.0

MESSAGE=sky2 0000:02:00.0 net0: speed/duplex mismatch

See I told you it was a useful tip.

:breakfast:

  • Like 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...