Added script.

This commit is contained in:
Joachim 2021-02-22 10:45:34 +01:00
parent 439d3ee876
commit 954918511a
2 changed files with 8 additions and 0 deletions

View File

View File

@ -0,0 +1,8 @@
#!/bin/bash
while true
do
# ps --sort=pcpu -eo cmd -h | head -n 1 | cut -b -15 | xargs
# ps -eo cmd --sort=-%cpu -A --no-headers | head -n 1 | sed -E "s/(\/.+)+\/(.+)/\2/" | cut -b -15 | xargs
ps -eo cmd --sort=-%cpu -A --no-headers | head -n 1 | cut -f 1 -d " " | grep -Eo "[^\/]+" | tail -n 1
sleep 5
done