--- projects/cms/source/ihost/libstatgrab/page_stats.c 2002/05/16 14:55:38 1.1 +++ projects/cms/source/ihost/libstatgrab/page_stats.c 2002/05/16 17:02:43 1.3 @@ -65,7 +65,10 @@ char *get_page_stats(){ continue; } } - + if((kstat_close(kc)) != 0){ + errf("Failed to close kstat control structure (%m)"); + return NULL; + } swap_pageins=(cs.cpu_vminfo.pgswapin-swapin)/WAIT_TIME_IN_SECS; swap_pageouts=(cs.cpu_vminfo.pgswapout-swapout)/WAIT_TIME_IN_SECS; #endif @@ -161,9 +164,3 @@ char *get_page_stats(){ } return xml_page_stats; } - -int main(){ - printf("%s\n",get_page_stats()); - exit(0); -} -