sigar-test 0.7.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +201 -0
  3. data/NOTICE +117 -0
  4. data/README +2 -0
  5. data/Rakefile +105 -0
  6. data/bindings/SigarBuild.pm +301 -0
  7. data/bindings/SigarWrapper.pm +3025 -0
  8. data/bindings/ruby/extconf.rb +131 -0
  9. data/bindings/ruby/rbsigar.c +888 -0
  10. data/include/sigar.h +984 -0
  11. data/include/sigar_fileinfo.h +157 -0
  12. data/include/sigar_format.h +65 -0
  13. data/include/sigar_getline.h +18 -0
  14. data/include/sigar_log.h +80 -0
  15. data/include/sigar_private.h +429 -0
  16. data/include/sigar_ptql.h +53 -0
  17. data/include/sigar_util.h +197 -0
  18. data/src/os/aix/aix_sigar.c +2168 -0
  19. data/src/os/aix/sigar_os.h +73 -0
  20. data/src/os/darwin/Info.plist.in +27 -0
  21. data/src/os/darwin/darwin_sigar.c +3718 -0
  22. data/src/os/darwin/sigar_os.h +80 -0
  23. data/src/os/hpux/hpux_sigar.c +1361 -0
  24. data/src/os/hpux/sigar_os.h +49 -0
  25. data/src/os/linux/linux_sigar.c +2810 -0
  26. data/src/os/linux/sigar_os.h +82 -0
  27. data/src/os/solaris/get_mib2.c +321 -0
  28. data/src/os/solaris/get_mib2.h +127 -0
  29. data/src/os/solaris/kstats.c +181 -0
  30. data/src/os/solaris/procfs.c +97 -0
  31. data/src/os/solaris/sigar_os.h +224 -0
  32. data/src/os/solaris/solaris_sigar.c +2732 -0
  33. data/src/os/win32/peb.c +212 -0
  34. data/src/os/win32/sigar.rc.in +40 -0
  35. data/src/os/win32/sigar_os.h +685 -0
  36. data/src/os/win32/sigar_pdh.h +47 -0
  37. data/src/os/win32/win32_sigar.c +4109 -0
  38. data/src/sigar.c +2444 -0
  39. data/src/sigar_cache.c +253 -0
  40. data/src/sigar_fileinfo.c +815 -0
  41. data/src/sigar_format.c +696 -0
  42. data/src/sigar_getline.c +1849 -0
  43. data/src/sigar_ptql.c +1976 -0
  44. data/src/sigar_signal.c +216 -0
  45. data/src/sigar_util.c +1060 -0
  46. data/src/sigar_version.c.in +22 -0
  47. data/src/sigar_version_autoconf.c.in +22 -0
  48. data/version.properties +11 -0
  49. metadata +91 -0
@@ -0,0 +1,73 @@
1
+ /*
2
+ * Copyright (c) 2004-2007, 2009 Hyperic, Inc.
3
+ * Copyright (c) 2009 SpringSource, Inc.
4
+ * Copyright (c) 2010 VMware, Inc.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+
19
+ #ifndef SIGAR_OS_H
20
+ #define SIGAR_OS_H
21
+
22
+ #include <fcntl.h>
23
+ #include <errno.h>
24
+ #include <dlfcn.h>
25
+ #include <procinfo.h>
26
+ #include <sys/resource.h>
27
+
28
+ enum {
29
+ KOFFSET_LOADAVG,
30
+ KOFFSET_VAR,
31
+ KOFFSET_SYSINFO,
32
+ KOFFSET_IFNET,
33
+ KOFFSET_VMINFO,
34
+ KOFFSET_CPUINFO,
35
+ KOFFSET_TCB,
36
+ KOFFSET_ARPTABSIZE,
37
+ KOFFSET_ARPTABP,
38
+ KOFFSET_MAX
39
+ };
40
+
41
+ typedef struct {
42
+ time_t mtime;
43
+ int num;
44
+ char **devs;
45
+ } swaps_t;
46
+
47
+ typedef int (*proc_fd_func_t) (sigar_t *, sigar_pid_t, sigar_proc_fd_t *);
48
+
49
+ struct sigar_t {
50
+ SIGAR_T_BASE;
51
+ int kmem;
52
+ /* offsets for seeking on kmem */
53
+ long koffsets[KOFFSET_MAX];
54
+ proc_fd_func_t getprocfd;
55
+ int pagesize;
56
+ swaps_t swaps;
57
+ time_t last_getprocs;
58
+ sigar_pid_t last_pid;
59
+ struct procsinfo64 *pinfo;
60
+ struct cpuinfo *cpuinfo;
61
+ int cpuinfo_size;
62
+ int cpu_mhz;
63
+ char model[128];
64
+ int aix_version;
65
+ int thrusage;
66
+ sigar_cache_t *diskmap;
67
+ };
68
+
69
+ #define HAVE_STRERROR_R
70
+
71
+ #define SIGAR_EPERM_KMEM (SIGAR_OS_START_ERROR+EACCES)
72
+
73
+ #endif /* SIGAR_OS_H */
@@ -0,0 +1,27 @@
1
+ <plist version="1.0">
2
+
3
+ <dict>
4
+
5
+ <key>CFBundleDevelopmentRegion</key>
6
+
7
+ <string>English</string>
8
+
9
+ <key>CFBundleIdentifier</key>
10
+
11
+ <string>org.hyperic.sigar</string>
12
+
13
+ <key>CFBundleInfoDictionaryVersion</key>
14
+
15
+ <string>6.0</string>
16
+
17
+ <key>CFBundleName</key>
18
+
19
+ <string>sigar</string>
20
+
21
+ <key>CFBundleVersion</key>
22
+
23
+ <string>@@VERSION_STRING@@</string>
24
+
25
+ </dict>
26
+
27
+ </plist>