Skip to content

Commit

Permalink
Merge pull request #90 from johnnymatthews/master
Browse files Browse the repository at this point in the history
Adds MacOS-specfic `ps aux` command.
  • Loading branch information
casperdcl authored Oct 6, 2024
2 parents 98d7871 + d11d0b6 commit bcb110d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ If format strings are added to `status-right`, they should now be visible.
### Optional requirements (Linux, BSD, OSX)

- `iostat` or `sar` are the best way to get an accurate CPU percentage.
A fallback is included using `ps -aux` but could be inaccurate.
A fallback is included using `ps aux` but could be inaccurate.
- `free` is used for obtaining system RAM status.
- `lm-sensors` is used for CPU temperature.
- `nvidia-smi` is required for GPU information.
Expand Down
2 changes: 1 addition & 1 deletion scripts/cpu_percentage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ print_cpu_percentage() {
# shellcheck disable=SC2059
printf "$cpu_percentage_format" "$usage"
else
load=$(cached_eval ps -aux | awk '{print $3}' | tail -n+2 | awk '{s+=$1} END {print s}')
load=$(cached_eval ps aux | awk '{print $3}' | tail -n+2 | awk '{s+=$1} END {print s}')
cpus=$(cpus_number)
echo "$load $cpus" | awk -v format="$cpu_percentage_format" '{printf format, $1/$2}'
fi
Expand Down

0 comments on commit bcb110d

Please sign in to comment.