Skip to content

Commit bcb110d

Browse files
authored
Merge pull request #90 from johnnymatthews/master
Adds MacOS-specfic `ps aux` command.
2 parents 98d7871 + d11d0b6 commit bcb110d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ If format strings are added to `status-right`, they should now be visible.
4242
### Optional requirements (Linux, BSD, OSX)
4343

4444
- `iostat` or `sar` are the best way to get an accurate CPU percentage.
45-
A fallback is included using `ps -aux` but could be inaccurate.
45+
A fallback is included using `ps aux` but could be inaccurate.
4646
- `free` is used for obtaining system RAM status.
4747
- `lm-sensors` is used for CPU temperature.
4848
- `nvidia-smi` is required for GPU information.

scripts/cpu_percentage.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ print_cpu_percentage() {
2929
# shellcheck disable=SC2059
3030
printf "$cpu_percentage_format" "$usage"
3131
else
32-
load=$(cached_eval ps -aux | awk '{print $3}' | tail -n+2 | awk '{s+=$1} END {print s}')
32+
load=$(cached_eval ps aux | awk '{print $3}' | tail -n+2 | awk '{s+=$1} END {print s}')
3333
cpus=$(cpus_number)
3434
echo "$load $cpus" | awk -v format="$cpu_percentage_format" '{printf format, $1/$2}'
3535
fi

0 commit comments

Comments
 (0)