Added journalctl --lines/-n parameter to only post the last 3 lines, not 10
This commit is contained in:
parent
c22b59dc85
commit
7432e06f58
@ -228,7 +228,7 @@ typeset -A notice_sent
|
|||||||
typeset -A secs
|
typeset -A secs
|
||||||
integer last_dunst_id=-1
|
integer last_dunst_id=-1
|
||||||
|
|
||||||
journalctl -b 0 -fu "${svc}" | \
|
journalctl -b 0 -fn 3 -u "${svc}" | \
|
||||||
while read line; do
|
while read line; do
|
||||||
local psi_type="$(grep -Eo "(CPU|MEM|IO) PSI event" <<< "${line}" | grep -Eo "CPU|MEM|IO")"
|
local psi_type="$(grep -Eo "(CPU|MEM|IO) PSI event" <<< "${line}" | grep -Eo "CPU|MEM|IO")"
|
||||||
if [[ -n "${psi_type}" ]]; then
|
if [[ -n "${psi_type}" ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user