2019-05-10 02:23:32 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
function cpuUsage {
|
|
|
|
ps -A -o pcpu | tail -n+2 | paste -sd+ | bc | awk '{print int($1)}'
|
|
|
|
}
|
2019-07-07 09:41:39 +02:00
|
|
|
|
2019-07-07 11:00:39 +02:00
|
|
|
function cpuTop {
|
|
|
|
ps -eo pid,cmd,%cpu --sort=-%cpu | head -2 | tail -n 1 | sed 's: :%20:g; s:/:%2F:g'
|
2019-07-07 09:41:39 +02:00
|
|
|
}
|