diff options
| author | Danilo M. <danix@danix.xyz> | 2026-11-11 12:23:25 +0100 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-11-11 12:23:25 +0100 |
| commit | 63ed39482219ba9172e151d9c82692aff9a622ad (patch) | |
| tree | 918fd1228588d9048cf6f49e75d7dfd757b8239b /desktop/modules/perf/Perf.js | |
| parent | 9227120043a2ea3df3a84ac85e784057cab05635 (diff) | |
| download | quickshell-63ed39482219ba9172e151d9c82692aff9a622ad.tar.gz quickshell-63ed39482219ba9172e151d9c82692aff9a622ad.zip | |
A pcmanfm-qt copy of 8GB from an NFS share never appeared among the
busiest processes. The copy's bytes travel on the kernel NFS client's
TCP socket to port 2049, which ss reports with no users:(()) owner, and
sockets() skipped every ownerless socket. The file manager itself owns
no socket for the transfer at all.
Ownerless sockets whose peer port is 2049 are now kept and named
"NFS <server>". Which process drives the traffic is not knowable from
ss, so the row names the share's server instead. Other ownerless
sockets (other users', without root) are still skipped.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'desktop/modules/perf/Perf.js')
| -rw-r--r-- | desktop/modules/perf/Perf.js | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/desktop/modules/perf/Perf.js b/desktop/modules/perf/Perf.js index d067d3b..eb0dbd7 100644 --- a/desktop/modules/perf/Perf.js +++ b/desktop/modules/perf/Perf.js @@ -186,16 +186,21 @@ function procs(text) { // One {key, name, rx, tx} per TCP socket in `ss -tinpH` output: a line // naming the owner in users:((...)), then the -i line under it with the // byte counters. Sockets ss names no owner for (other users', without root) -// are skipped. The key is both endpoints and the pid, so a reused port in -// another process is a new socket. +// are skipped, except NFS: the kernel's client owns that socket, so a file +// manager copying to or from a share shows nothing of its own, and the +// traffic is listed as "NFS <server>" instead. The key is both endpoints and +// the pid, so a reused port in another process is a new socket. function sockets(text) { const out = []; let cur = null; for (const line of text.split("\n")) { - const u = /^\S+\s+\d+\s+\d+\s+(\S+)\s+(\S+)\s+users:\(\("([^"]*)",pid=(\d+)/.exec(line); + let u = /^\S+\s+\d+\s+\d+\s+(\S+)\s+(\S+)\s+users:\(\("([^"]*)",pid=(\d+)/.exec(line); if (u) { cur = { key: u[1] + " " + u[2] + " " + u[4], name: u[3], rx: 0, tx: 0 }; out.push(cur); + } else if ((u = /^\S+\s+\d+\s+\d+\s+(\S+)\s+(\S+):2049\s*$/.exec(line))) { + cur = { key: u[1] + " " + u[2] + ":2049", name: "NFS " + u[2], rx: 0, tx: 0 }; + out.push(cur); } else if (cur && /^\s/.test(line)) { cur.rx = Number((/bytes_received:(\d+)/.exec(line) || [0, 0])[1]); cur.tx = Number((/bytes_sent:(\d+)/.exec(line) || [0, 0])[1]); |
