20 |
|
|
21 |
#include <config.h> |
#include <config.h> |
22 |
|
|
23 |
|
#ifdef HAVE_STDIO_H |
24 |
|
#include <stdio.h> |
25 |
|
#endif |
26 |
|
|
27 |
#ifdef HAVE_SYS_TYPES_H |
#ifdef HAVE_SYS_TYPES_H |
28 |
#include <sys/types.h> |
#include <sys/types.h> |
29 |
#endif |
#endif |
30 |
|
|
31 |
|
#ifdef HAVE_UNISTD_H |
32 |
#include <unistd.h> |
#include <unistd.h> |
33 |
|
#endif |
34 |
|
|
35 |
#ifdef HAVE_SYS_STAT_H |
#ifdef HAVE_SYS_STAT_H |
36 |
#include <sys/stat.h> |
#include <sys/stat.h> |
54 |
#include <time.h> |
#include <time.h> |
55 |
#endif |
#endif |
56 |
|
|
|
#include <procinfo.h> |
|
|
#include <sys/proc.h> |
|
|
|
|
57 |
#ifdef HAVE_STRING_H |
#ifdef HAVE_STRING_H |
58 |
#include <string.h> |
#include <string.h> |
59 |
#endif |
#endif |
60 |
|
|
61 |
#include <stdio.h> |
#ifdef HAVE_PROCINFO_H |
62 |
|
#include <procinfo.h> |
63 |
|
#endif |
64 |
|
|
65 |
|
#ifdef HAVE_SYS_PROC_H |
66 |
|
#include <sys/proc.h> |
67 |
|
#endif |
68 |
|
|
69 |
|
#ifdef HAVE_PROCFS_H |
70 |
#include <procfs.h> |
#include <procfs.h> |
71 |
|
#endif |
72 |
|
|
73 |
|
|
74 |
#include "process.h" |
#include "process.h" |
75 |
#include "sysdep.h" |
#include "sysdep.h" |
215 |
*/ |
*/ |
216 |
int getloadavg_sysdep (double *loadv, int nelem) { |
int getloadavg_sysdep (double *loadv, int nelem) { |
217 |
|
|
218 |
|
/* |
219 |
static int initted=0; |
static int initted=0; |
220 |
int avenrun[3]; |
int avenrun[3]; |
221 |
static int no_avenrun_here = 0; |
static int no_avenrun_here = 0; |
248 |
loadv[2] = avenrun[2] / 65536.0; |
loadv[2] = avenrun[2] / 65536.0; |
249 |
|
|
250 |
return TRUE; |
return TRUE; |
251 |
|
*/ |
252 |
|
|
253 |
|
return getloadavg(loadv, nelem); |
254 |
|
|
255 |
} |
} |
256 |
|
|