From 44af171d0e27f506223d42d9b3262b541744714a Mon Sep 17 00:00:00 2001 From: Fabian Vogt Date: Mon, 15 Jul 2024 14:08:00 +0200 Subject: [PATCH] console/sysstat.pm: Support for sysstat 12.7.5 From sysstat.changes: * [Quan quan Cao]: sar/sadc: Add new metrics pgprom/s and pgdem/s. * sar: Remove %vmeff metric. --- tests/console/sysstat.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/console/sysstat.pm b/tests/console/sysstat.pm index e9acbaa6a832..a33c42fcd0e5 100644 --- a/tests/console/sysstat.pm +++ b/tests/console/sysstat.pm @@ -78,7 +78,11 @@ sub run { } else { validate_script_output "sar -b", sub { /tps rtps wtps bread\/s bwrtn\/s/ }; } - validate_script_output "sar -B", sub { /pgpgin\/s pgpgout\/s fault\/s majflt\/s pgfree\/s pgscank\/s pgscand\/s pgsteal\/s %vmeff/ }; + if (version->parse(script_output('rpm --qf "%{VERSION}\n" -q sysstat')) >= version->parse('12.7.5')) { + validate_script_output "sar -B", sub { /pgpgin\/s pgpgout\/s fault\/s majflt\/s pgfree\/s pgscank\/s pgscand\/s pgsteal\/s pgprom\/s pgdem\/s/ }; + } else { + validate_script_output "sar -B", sub { /pgpgin\/s pgpgout\/s fault\/s majflt\/s pgfree\/s pgscank\/s pgscand\/s pgsteal\/s %vmeff/ }; + } validate_script_output "sar -H", sub { /kbhugfree kbhugused %hugused/ }; validate_script_output "sar -S", sub { /kbswpfree kbswpused %swpused kbswpcad %swpcad/ };