shell-base/modules/systemd.lib

41 lines
1.1 KiB
Plaintext
Raw Normal View History

#!/bin/bash
function sdj(){
journalctl -u "$1" | tail -f -n ${2:-50}
}
function sdjf(){
journalctl -f -u "$1"
}
function sdw(){
sdst "$1" | grep Loaded
}
function sdstate () {
echo $1 state
systemctl show --no-page $1 | grep ActiveState
systemctl show --no-page $1 | grep UnitFileState
systemctl show --no-page $1 | grep LoadState
systemctl show --no-page $1 | grep ExecMainPID
systemctl show --no-page $1 | grep ExecMainStartTimestamp=
systemctl show --no-page $1 | grep ExecMainExitTimestamp=
}
function sdju(){
journalctl --user -u "$1" | tail -f -n ${2:-50}
}
function sdjuf(){
journalctl --user -f -u "$1"
}
function sdwu(){
sdstu "$1" | grep Loaded
}
function sdstateu () {
echo $1 state
systemctl --user show --no-page $1 | grep ActiveState
systemctl --user show --no-page $1 | grep UnitFileState
systemctl --user show --no-page $1 | grep LoadState
systemctl --user show --no-page $1 | grep ExecMainPID
systemctl --user show --no-page $1 | grep ExecMainStartTimestamp=
systemctl --user show --no-page $1 | grep ExecMainExitTimestamp=
}