I have few rows of my own code i would like to run when this script kills distnoted.
It propably needs if ... end if type or thing.
How i can do this?
ps -reo '%cpu,uid,pid,command' |
awk -v UID=$UID '
/distnoted agent$/ && $1 > 100.0 && $2 == UID {
system("kill -9 " $3)
}
'
It propably needs if ... end if type or thing.
How i can do this?
ps -reo '%cpu,uid,pid,command' |
awk -v UID=$UID '
/distnoted agent$/ && $1 > 100.0 && $2 == UID {
system("kill -9 " $3)
}
'