vmstat: adapted to the interface changes, <VMSTAT> api

This commit just eliminates all the procps_vmstat_read
calls since the interface now handles that requirement
as needed when the 'get' and 'select' guys are called.

Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
Jim Warner 2016-06-04 00:00:00 -05:00 committed by Craig Small
parent d69a2b6899
commit acb83a2b74

View File

@ -291,9 +291,6 @@ static void new_format(void)
if (procps_vmstat_new(&vm_info) < 0)
xerrx(EXIT_FAILURE,
_("Unable to create vmstat structure"));
if (procps_vmstat_read(vm_info) < 0)
xerrx(EXIT_FAILURE,
_("Unable to read vmstat information"));
if (procps_stat_new(&sys_info) < 0)
xerrx(EXIT_FAILURE,
_("Unable to create system stat structure"));
@ -366,9 +363,6 @@ static void new_format(void)
new_header();
tog = !tog;
if (procps_vmstat_read(vm_info) < 0)
xerrx(EXIT_FAILURE,
_("Unable to read vmstat information"));
if ((stat_stack = procps_stat_select(sys_info, Loop_stat_items, 12)) == NULL)
xerrx(EXIT_FAILURE,
_("Unable to select stat information"));
@ -830,10 +824,6 @@ static void sum_format(void)
if (procps_vmstat_new(&vm_info) < 0)
xerrx(EXIT_FAILURE,
_("Unable to create vmstat structure"));
if (procps_vmstat_read(vm_info) < 0)
xerrx(EXIT_FAILURE,
_("Unable to read vmstat information"));
if (procps_meminfo_new(&mem_info) < 0)
xerrx(EXIT_FAILURE, _("Unable to create meminfo structure"));
if ((mem_stack = procps_meminfo_select(mem_info, Sum_mem_items, 10)) ==