MonitorParsers class

Pure parsers for the textual output of the system probes the monitors run.

Kept side-effect-free (no process spawning) so they can be unit-tested with captured sample output across platforms.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

parseDf(String content) List<StorageDevice>
Parses POSIX df -k -P output into storage devices (sizes in 1 KiB blocks). The header line is skipped.
parseLinuxMemInfo(String content) MemoryInfo
Parses /proc/meminfo (Linux) into a MemoryInfo (values are in kB).
parseLoadAvg(String content) List<double>
Parses /proc/loadavg (Linux) — the first three fields are the 1/5/15 minute load averages.
parsePs(String content, {int limit = 20}) List<ProcessInfo>
Parses POSIX ps output with columns pid %cpu rss comm (rss in kB). The header line is skipped. Results are sorted by CPU descending and truncated to limit.