ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/libstatgrab/src/libstatgrab/cpu_stats.c
(Generate patch)

Comparing projects/libstatgrab/src/libstatgrab/cpu_stats.c (file contents):
Revision 1.1 by pajs, Tue Feb 18 19:28:30 2003 UTC vs.
Revision 1.3 by tdb, Thu Feb 20 13:19:52 2003 UTC

# Line 23 | Line 23
23   #endif
24  
25   #include <stdio.h>
26 #include <ukcprog.h>
26   #include <unistd.h>
27   #include <stdlib.h>
28   #include <sys/types.h>
# Line 42 | Line 41
41   static cpu_states_t cpu_now;
42   static int cpu_now_uninit=1;
43  
45
44   cpu_states_t *get_cpu_totals(){
45  
46   #ifdef SOLARIS
# Line 77 | Line 75 | cpu_states_t *get_cpu_totals(){
75          cpu_now.total=cpu_now.user+cpu_now.iowait+cpu_now.kernel+cpu_now.idle+cpu_now.swap;
76          cpu_now_uninit=0;
77  
78 <        if((kstat_close(kc)) != 0){
81 <                return NULL;
82 <        }
83 <
78 >        kstat_close(kc);
79   #endif
80  
81          cpu_now.systime=time(NULL);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines