Forked from anonymouse64/busctl-example-systemd.sh
Created
February 15, 2023 10:44
-
-
Save nohupped/ed0218849bd2c11d550c487b43c47d53 to your computer and use it in GitHub Desktop.
Get systemd unit property's from busctl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get the object path for a service with the "easy name" | |
sudo busctl --verbose --system call org.freedesktop.systemd1 /org/freedesktop/systemd1 org.freedesktop.systemd1.Manager GetUnit s snap.docker.dockerd.service | |
# get the ActiveState d-bus property of the Unit object | |
sudo busctl --verbose --system get-property org.freedesktop.systemd1 /org/freedesktop/systemd1/unit/snap_2edocker_2edockerd_2eservice org.freedesktop.systemd1.Unit ActiveState | |
# get the OOMScoreAdjust d-bus property of the Service object | |
sudo busctl --verbose --system get-property org.freedesktop.systemd1 /org/freedesktop/systemd1/unit/snap_2edocker_2edockerd_2eservice org.freedesktop.systemd1.Service OOMScoreAdjust |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment