diff --git a/web/src/ZFS.tsx b/web/src/ZFS.tsx index 93b279a..4a42b32 100644 --- a/web/src/ZFS.tsx +++ b/web/src/ZFS.tsx @@ -381,6 +381,13 @@ const wIds = (w: ZFSWrites) => ['zfs.write.dirty', ...w.pools.flatMap((p) => { return [b + 'write_bps', b + 'logical_bps', ...(p.landing ? [b + 'landing.pending_bytes', b + 'landing.in_bps', b + 'landing.drain_bps'] : [])] })] +// rsync's --bwlimit: a bare number is KiB/s, a K/M/G suffix is binary (60M = 60 MiB/s); 0 is none +const bwl = (v: string) => { + const m = /^(\d+(?:\.\d+)?)([KMG]?)$/i.exec((v ?? '').trim()) + if (!m || Number(m[1]) === 0) return '' + return ` · rsync limited to ${m[1]} ${(m[2] || 'K').toUpperCase()}iB/s` +} + function MoverLine({ l }: { l: Landing }) { const m = l.mover if (!m) return
No mover is reporting for this landing tier (nothing in /run/landing-mover/). Files that land here stay here until something moves them.
@@ -396,7 +403,7 @@ function MoverLine({ l }: { l: Landing }) { {m.state === 'moving' && m.current &&
Now{m.current}{m.current_size ? ` · ${fmtBytes(m.partial)} of ${fmtBytes(m.current_size)}` : ''}
}
Since start{fmtN(m.moved_files)} files · {fmtBytes(m.moved_bytes)} moved · running {ago(m.started_ms).replace(' ago', '')}
{m.last_move &&
Last moved{m.last_move} · {ago(m.last_move_ms)}
} -
Rulesa file moves once it has been closed and left alone for {m.settle} s · limit {m.bwlimit && m.bwlimit !== '0' ? `${m.bwlimit}B/s` : 'none'} · oldest first
+
Rulesa file moves once it has been closed and left alone for {m.settle} s · oldest first{bwl(m.bwlimit)}
{m.last_error &&
Last error{m.last_error} · {ago(m.last_error_ms)}
} {m.state === 'moving' && m.current_size > 0 && }