free: Show single line statistics
Added the -L --line option to free to show a small set of memory statistics on a single line of 80 characters. Largely based on the work of @Ulenrich1 and updated to the new API. References: procps-ng/procps#156 Signed-off-by: Craig Small <csmall@dropbear.xyz>
This commit is contained in:
@@ -55,3 +55,7 @@ set test "free with positive repeat count"
|
||||
spawn $free -c 2
|
||||
expect_continue "$test" "^${free_header}"
|
||||
expect_pass "$test" "${free_header}"
|
||||
|
||||
set test "free with single line"
|
||||
spawn $free -L
|
||||
expect_pass "$test" "^SwapUse\\s+\\d+\\s+CachUse\\s+\\d+\\s+MemUse\\s+\\d+\\s+MemFree\\s+\\d+\\s*$"
|
||||
|
Reference in New Issue
Block a user