Skip to main content

parse_top_processes

Function parse_top_processes 

Source
pub fn parse_top_processes(output: &str) -> Option<Vec<ProcessInfo>>
Expand description

Parse the top processes by CPU usage from ps output.

Expects lines of %CPU %MEM COMMAND, sorted by the remote ps. An optional header line and any malformed line are skipped (their first two columns are not numeric). Returns at most 3 entries in input order, or None if empty.