← 插件

Host monitor

CPU, memory, disk and network usage of the daemon host in the sidebar footer

$ clisbot plugin add a31521424/host-monitor
报告问题
a31521424daemon 管理0次安装14e6ac03d78c源代码
Host monitor 截图 1

该插件的概览尚未翻译为你的语言,因此以英文显示。

Shows the CPU, memory, disk and network usage of the machine the Paseo daemon runs on, as one line in the sidebar footer.

The line reads like the built-in usage summary: an icon and percentage for CPU, RAM and disk, with a small meter when the sidebar is wide enough, followed by download and upload speed side by side under one icon. The disk figure adds all local disks together. Meters and numbers turn yellow above 70 percent and red above 90 percent; on macOS the RAM color follows the system's memory pressure instead (see below). On a narrow sidebar the network speeds are dropped first, then disk. Press the line for a popover with about three minutes of history for each metric, the usage of each local disk, plus uptime and load average.

The daemon samples the host every two seconds, disks every thirty, and keeps the history in memory. History resets when the plugin reloads or the daemon restarts. Each connected host reports its own numbers.

Percentages below 10 show one decimal, so a nearly idle host reads 0.4% rather than 0%. On Linux, CPU usage comes from /proc/stat; I/O wait counts as idle and steal time, which a VPS loses to its hypervisor, counts as busy. Memory uses the available-memory figure from /proc/meminfo on Linux, so the page cache is not counted as used. On macOS, RAM follows Activity Monitor's Memory Used: app memory, wired memory and the compressor, read from vm_stat. Cached files are left out because macOS frees them as soon as an app needs the room; the popover shows them on a separate line. A Mac often runs at high usage with no shortage, so there the RAM color follows the kernel's memory pressure level (kern.memorystatus_vm_pressure_level): yellow at warning, red at critical, never because of the percentage alone. Sizes use binary units (KiB, MiB, GiB), so a 994.6 GB disk reads 926.3 GiB. Network speed sums all interfaces except loopback and common virtual ones (veth, docker, bridge). Disks are the filesystems in /proc/mounts backed by a block device (plus ZFS), each device counted once; network mounts, memory-backed filesystems and read-only images such as snap packages are left out. Disk percentages follow df: space reserved for root counts as neither used nor free. On macOS the disk is the APFS container of the root volume, so its usage covers every volume in the container (system, data, VM and others), and the popover labels it that way; apps that show the data volume alone report a little less. Network speed and the disk list need Linux; on other systems only CPU, RAM and the root disk are shown.

The plugin only reads local system counters. On macOS it runs /usr/bin/vm_stat and /usr/sbin/sysctl -n kern.memorystatus_vm_pressure_level every two seconds for the memory figures; it runs nothing else. The host name and these statistics are shown to every Paseo client connected to the daemon, including remote ones; the plugin contacts no other service.