Added journalctl --lines/-n parameter to only post the last 3 lines, not 10

This commit is contained in:
Trey Blancher 2023-08-19 13:35:48 -04:00
parent c22b59dc85
commit 7432e06f58

View File

@ -228,7 +228,7 @@ typeset -A notice_sent
typeset -A secs
integer last_dunst_id=-1
journalctl -b 0 -fu "${svc}" | \
journalctl -b 0 -fn 3 -u "${svc}" | \
while read line; do
local psi_type="$(grep -Eo "(CPU|MEM|IO) PSI event" <<< "${line}" | grep -Eo "CPU|MEM|IO")"
if [[ -n "${psi_type}" ]]; then