~ubuntu-branches/ubuntu/oneiric/collectd/oneiric

« back to all changes in this revision

Viewing changes to src/memory.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Harl
  • Date: 2008-06-17 10:35:51 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20080617103551-9d0ym3zejc7agtt3
Tags: 4.4.1-1
* New upstream release.
  - Fixed another issue of the sensors plugin affecting some chip types
    (Closes: #468143).
  - Fixed creation of "vserver" graphs in collection.cgi (Closes: #475120).
  - Fixed a segfault when using libperl 5.10.
  - collectd now ships libiptc itself.
  New plugins:
  - Ascent server statistics: ascent
  - IPMI sensors information: ipmi
  - PowerDNS name server statistics: powerdns
  - incremental parsing of logfiles: tail
  - TeamSpeak2 server statistics: teamspeak2
  - detailed virtual memory statistics: vmem
* Disable "tcpconns" plugin by default (Closes: #478759).
* Reenabled iptables plugin on all architectures (Closes: #473435).
  - Added the plugin to collectd.conf.
  - Added /usr/share/doc/collectd/examples/iptables/.
  - Added build dependency on linux-libc-dev (>= 2.6.25-4) - that version is
    required because of #479899.
* New debconf template translations:
  - gl.po, thanks to Jacobo Tarrio (Closes: #482667).
* Added a work around for #474087 (broken openipmi .pc files) by forcing the
  inclusion of the ipmi plugin and manually specifying the dependencies.
* Updated standards-version to 3.8.0 (no changes).

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
# include <mach/vm_statistics.h>
44
44
#endif
45
45
 
 
46
#if HAVE_STATGRAB_H
 
47
# include <statgrab.h>
 
48
#endif
 
49
 
46
50
/* vm_statistics_data_t */
47
51
#if HAVE_HOST_STATISTICS
48
52
static mach_port_t port_host;
62
66
static kstat_t *ksp;
63
67
/* #endif HAVE_LIBKSTAT */
64
68
 
 
69
#elif HAVE_LIBSTATGRAB
 
70
/* no global variables */
 
71
/* endif HAVE_LIBSTATGRAB */
 
72
 
65
73
#else
66
74
# error "No applicable input method."
67
75
#endif
218
226
        memory_submit ("cache",    sysctl_vals[6]);
219
227
/* #endif HAVE_SYSCTLBYNAME */
220
228
 
221
 
#elif defined(KERNEL_LINUX)
 
229
#elif KERNEL_LINUX
222
230
        FILE *fh;
223
231
        char buffer[1024];
224
232
        
276
284
                memory_submit ("cached",   mem_cached);
277
285
                memory_submit ("free",     mem_free);
278
286
        }
279
 
/* #endif defined(KERNEL_LINUX) */
 
287
/* #endif KERNEL_LINUX */
280
288
 
281
 
#elif defined(HAVE_LIBKSTAT)
 
289
#elif HAVE_LIBKSTAT
282
290
        long long mem_used;
283
291
        long long mem_free;
284
292
        long long mem_lock;
303
311
        memory_submit ("used",   mem_used);
304
312
        memory_submit ("free",   mem_free);
305
313
        memory_submit ("locked", mem_lock);
306
 
/* #endif defined(HAVE_LIBKSTAT) */
 
314
/* #endif HAVE_LIBKSTAT */
307
315
 
308
 
#elif defined(HAVE_LIBSTATGRAB)
 
316
#elif HAVE_LIBSTATGRAB
309
317
        sg_mem_stats *ios;
310
318
 
311
319
        if ((ios = sg_get_mem_stats ()) != NULL)