--- projects/cms/source/ihost/libstatgrab/page_stats.c 2002/05/16 15:25:45 1.2 +++ projects/cms/source/ihost/libstatgrab/page_stats.c 2002/05/21 16:47:12 1.5 @@ -1,3 +1,23 @@ +/* + * i-scream central monitoring system + * http://www.i-scream.org.uk + * Copyright (C) 2000-2002 i-scream + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + #include #include "ukcprog.h" #include @@ -65,7 +85,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