Skip to content

Latest commit

 

History

History
26 lines (20 loc) · 1.29 KB

systemd-notify.md

File metadata and controls

26 lines (20 loc) · 1.29 KB

LAB 5: systemd-notify

How systemd knows about application state? We have a sd_notify syscall that we might use. There're 2 libraries that implements via cython this syscall:

So now let's have some fun with it. Enter sd-notify-python directory and follow those steps:

  1. sd-notify:
    1. view sd-notify-app-service.service file
    2. copy service file to /etc/systemd/system/ and enable/run it
    3. view journalctl -f -u sd-notify-app-service
  2. systemd-notify + socket activation
    1. view systemd-notify-app.service and systemd-notify-app.socket
    2. copy service and socket file to /etc/systemd/system/
    3. start systemd-notify-app.socket service
    4. curl localhost:1025 && journalctl -f

Remember about reading socket activation posts: