cpu_load: merge back Darwin and FreeBSD
This commit is contained in:
parent
ce345aa24d
commit
9adfd973d0
17
liquidprompt
17
liquidprompt
@ -114,7 +114,7 @@ case "$LP_OS" in
|
|||||||
echo "$load"
|
echo "$load"
|
||||||
}
|
}
|
||||||
;;
|
;;
|
||||||
FreeBSD)
|
FreeBSD|Darwin|OpenBSD)
|
||||||
_lp_cpu_load () {
|
_lp_cpu_load () {
|
||||||
local bol load eol
|
local bol load eol
|
||||||
# If you have problems with syntax coloring due to the following
|
# If you have problems with syntax coloring due to the following
|
||||||
@ -124,21 +124,6 @@ case "$LP_OS" in
|
|||||||
echo "$load"
|
echo "$load"
|
||||||
}
|
}
|
||||||
;;
|
;;
|
||||||
Darwin)
|
|
||||||
_lp_cpu_load () {
|
|
||||||
local bol load eol
|
|
||||||
read bol load eol <<<$( LANG=C sysctl -n vm.loadavg )
|
|
||||||
echo "$load"
|
|
||||||
}
|
|
||||||
LP_DWIN_KERNEL_REL_VER=$(uname -r | cut -d . -f 1)
|
|
||||||
;;
|
|
||||||
OpenBSD)
|
|
||||||
_lp_cpu_load() {
|
|
||||||
local bol load eol
|
|
||||||
read one two three <<< `sysctl -n vm.loadavg`
|
|
||||||
echo "$load"
|
|
||||||
}
|
|
||||||
;;
|
|
||||||
SunOS)
|
SunOS)
|
||||||
_lp_cpu_load () {
|
_lp_cpu_load () {
|
||||||
LANG=C uptime | awk '{print substr($10,0,length($10))}'
|
LANG=C uptime | awk '{print substr($10,0,length($10))}'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user