# | 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); |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |