1 |
|
|
2 |
|
|
3 |
/* |
/* |
4 |
* Copyright (C), 2000-2003 by Contributors to the monit codebase. |
* Copyright (C), 2000-2003 by Contributors to the monit codebase. |
5 |
* All Rights Reserved. |
* All Rights Reserved. |
22 |
|
|
23 |
#include <config.h> |
#include <config.h> |
24 |
|
|
25 |
|
#ifdef HAVE_STDIO_H |
26 |
|
#include <stdio.h> |
27 |
|
#endif |
28 |
|
|
29 |
#ifdef HAVE_SYS_TYPES_H |
#ifdef HAVE_SYS_TYPES_H |
30 |
#include <sys/types.h> |
#include <sys/types.h> |
31 |
#endif |
#endif |
32 |
|
|
33 |
|
#ifdef HAVE_UNISTD_H |
34 |
#include <unistd.h> |
#include <unistd.h> |
35 |
|
#endif |
36 |
|
|
37 |
#ifdef HAVE_SYS_STAT_H |
#ifdef HAVE_SYS_STAT_H |
38 |
#include <sys/stat.h> |
#include <sys/stat.h> |
60 |
#include <string.h> |
#include <string.h> |
61 |
#endif |
#endif |
62 |
|
|
63 |
#include <stdio.h> |
#ifdef HAVE_KVM_H |
64 |
#include <kvm.h> |
#include <kvm.h> |
65 |
|
#endif |
66 |
|
|
67 |
|
#ifdef HAVE_SYS_PARAM_H |
68 |
#include <sys/param.h> |
#include <sys/param.h> |
69 |
|
#endif |
70 |
|
|
71 |
|
#ifdef HAVE_SYS_PROC_H |
72 |
#include <sys/proc.h> |
#include <sys/proc.h> |
73 |
|
#endif |
74 |
|
|
75 |
|
#ifdef HAVE_SYS_RESOURCE_H |
76 |
#include <sys/resource.h> |
#include <sys/resource.h> |
77 |
|
#endif |
78 |
|
|
79 |
|
#ifdef HAVE_SYS_RESOURCEVAR_H |
80 |
#include <sys/resourcevar.h> |
#include <sys/resourcevar.h> |
81 |
|
#endif |
82 |
|
|
83 |
|
#ifdef HAVE_SYS_LOCK_H |
84 |
#include <sys/lock.h> |
#include <sys/lock.h> |
85 |
|
#endif |
86 |
|
|
87 |
|
#ifdef HAVE_SYS_USER_H |
88 |
#include <sys/user.h> |
#include <sys/user.h> |
89 |
|
#endif |
90 |
|
|
91 |
|
#ifdef HAVE_UVM_UVM_H |
92 |
#include <uvm/uvm.h> |
#include <uvm/uvm.h> |
93 |
|
#endif |
94 |
|
|
95 |
|
#ifdef HAVE_UVM_UVM_OBJECT_H |
96 |
#include <uvm/uvm_object.h> |
#include <uvm/uvm_object.h> |
97 |
|
#endif |
98 |
|
|
99 |
|
#ifdef HAVE_UVM_UVM_PMAP_H |
100 |
#include <uvm/uvm_pmap.h> |
#include <uvm/uvm_pmap.h> |
101 |
|
#endif |
102 |
|
|
103 |
|
#ifdef HAVE_MACHINE_PMAP_H |
104 |
#include <machine/pmap.h> |
#include <machine/pmap.h> |
105 |
|
#endif |
106 |
|
|
107 |
|
#ifdef HAVE_MACHINE_VMPARAM_H |
108 |
#include <machine/vmparam.h> |
#include <machine/vmparam.h> |
109 |
|
#endif |
110 |
|
|
111 |
|
#ifdef HAVE_UVM_UVM_MAP_H |
112 |
#include <uvm/uvm_map.h> |
#include <uvm/uvm_map.h> |
113 |
|
#endif |
114 |
|
|
115 |
|
#ifdef HAVE_SYS_VMMETER_H |
116 |
#include <sys/vmmeter.h> |
#include <sys/vmmeter.h> |
117 |
|
#endif |
118 |
|
|
119 |
|
#ifdef HAVE_SYS_SYSCTL_H |
120 |
#include <sys/sysctl.h> |
#include <sys/sysctl.h> |
121 |
|
#endif |
122 |
|
|
123 |
#include "process.h" |
#include "process.h" |
124 |
#include "sysdep.h" |
#include "sysdep.h" |