This commit is contained in:
2026-08-29 10:29:48 +05:00
parent eaa9a7bef2
commit 069b51a84c
16 changed files with 949 additions and 471 deletions
Executable
+7
View File
@@ -0,0 +1,7 @@
#!/bin/sh
# Суммарная загрузка CPU в процентах 0-100 (mac + linux).
case "$(uname)" in
Darwin) cores=$(sysctl -n hw.ncpu) ;;
*) cores=$(nproc) ;;
esac
ps -A -o %cpu | awk -v c="$cores" '{s+=$1} END {printf "%d", s/c}'
+3
View File
@@ -0,0 +1,3 @@
#!/bin/sh
echo "arg1: $1"
echo "arg2: $2"