dotfiles/script/sysinfo
Rob Watson bffea54717
All checks were successful
continuous-integration/drone/push Build is passing
fix(tmux): macos load avg
2023-11-23 08:36:28 +01:00

12 lines
229 B
Bash
Executable File

#!/usr/bin/env bash
#
# Print loadavg to stdout
set -e
if [ "$(uname -s)" = "Darwin" ]; then
uptime | tr -d ',' | grep -o "[0-9]\+\.[0-9]\+ [0-9]\+\.[0-9]\+ [0-9]\+\.[0-9]\+"
else # Linux
cut -d " " -f 1-3 /proc/loadavg
fi