Skip to content

Commit d11d0b6

Browse files
committed
ps -aux => ps aux
1 parent 88fbb1f commit d11d0b6

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
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: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,9 @@ print_cpu_percentage() {
2929
# shellcheck disable=SC2059
3030
printf "$cpu_percentage_format" "$usage"
3131
else
32-
if is_osx; then
3332
load=$(cached_eval ps aux | awk '{print $3}' | tail -n+2 | awk '{s+=$1} END {print s}')
3433
cpus=$(cpus_number)
3534
echo "$load $cpus" | awk -v format="$cpu_percentage_format" '{printf format, $1/$2}'
36-
else
37-
load=$(cached_eval ps -aux | awk '{print $3}' | tail -n+2 | awk '{s+=$1} END {print s}')
38-
cpus=$(cpus_number)
39-
echo "$load $cpus" | awk -v format="$cpu_percentage_format" '{printf format, $1/$2}'
4035
fi
4136
fi
4237
}

0 commit comments

Comments
 (0)