dsh-ops-kit 0.4.8 → 0.4.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +1 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1751,7 +1751,7 @@ awk '{print "LOAD "$1" "$2" "$3}' /proc/loadavg 2>/dev/null
1751
1751
  awk '/^MemTotal/{t=$2} /^MemAvailable/{a=$2} /^SwapTotal/{s=$2} /^SwapFree/{f=$2} END{print "MEM "t" "a" "s" "f}' /proc/meminfo 2>/dev/null
1752
1752
  df -P / 2>/dev/null | awk 'NR==2{gsub("%","",$5);print "DISK "$5}'
1753
1753
  awk -F'[: ]+' '/^ *(eth|ens|enp|eno)/{rx+=$3;tx+=$11} END{print "NET "rx" "tx}' /proc/net/dev 2>/dev/null
1754
- awk '{r+=$3; w+=$7} END{print "IO "r" "w}' /proc/diskstats 2>/dev/null
1754
+ awk -v d="$(lsblk -dn -o NAME 2>/dev/null | tr '\\n' ' ')" 'BEGIN{n=split(d,a," ")} { if (n>0) { for(i=1;i<=n;i++) if($3==a[i]) {r+=$6; w+=$10} } else if ($3 !~ /^(loop|ram|sr|dm-|fd)/ && $3 !~ /((sd|vd|hd|xvd)[a-z]+[0-9]+|nvme[0-9]+n[0-9]+p[0-9]+|mmcblk[0-9]+p[0-9]+)$/) { r+=$6; w+=$10 } } END{print "IO "r*512" "w*512}' /proc/diskstats 2>/dev/null
1755
1755
  echo "PROCS $(ls /proc 2>/dev/null | grep -c '^[0-9][0-9]*$')"
1756
1756
  awk '{print "UPTIME "int($1)}' /proc/uptime 2>/dev/null
1757
1757
  echo "TCP $(ss -H -tan state established 2>/dev/null | wc -l)"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-ops-kit",
3
- "version": "0.4.8",
3
+ "version": "0.4.9",
4
4
  "description": "OPC-运维工作台 (dsh-ops-kit) — Server operations kit for DeepSeek Harness: server cards, health charts, config browser, app manager and plain-language AI diagnosis — over SSH, no agent install.",
5
5
  "license": "MIT",
6
6
  "type": "module",