11 lines
180 B
Bash
Executable File
11 lines
180 B
Bash
Executable File
#!/bin/sh
|
|
|
|
loadavg=`cat /proc/loadavg 2>/dev/null | cut -d " " -f -3`
|
|
|
|
if [ "$loadavg" == "" ]
|
|
then
|
|
echo `sysctl -n vm.loadavg | sed 's/{\ //;s/\ }//'`
|
|
else
|
|
echo "$loadavg"
|
|
fi
|