diff options
| author | pants <niklasjo2004@gmail.com> | 2026-09-21 14:17:03 -0700 |
|---|---|---|
| committer | pants <niklasjo2004@gmail.com> | 2026-09-21 14:17:03 -0700 |
| commit | 7b21727285e50b0b050c4ddd70d07542229c5366 (patch) | |
| tree | 5d369153c5df5b41f3750d25479a68f20169c8ff /bin/st-usage | |
init
Diffstat (limited to 'bin/st-usage')
| -rwxr-xr-x | bin/st-usage | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bin/st-usage b/bin/st-usage new file mode 100755 index 0000000..c49a20f --- /dev/null +++ b/bin/st-usage @@ -0,0 +1,4 @@ +#!/bin/sh +CPU_USAGE=$(top -bn2 | grep "%Cpu(s)" | awk 'NR==2 {print 100 - $8}') +GPU_USAGE=$(nvtop -s | grep gpu_util | awk '{print $2}' | sed 's/"//g;s/,//') +echo "CPU:$CPU_USAGE% GPU:$GPU_USAGE" |
