Merge branch 'collectd-4.8'
authorFlorian Forster <octo@leeloo.lan.home.verplant.org>
Fri, 2 Oct 2009 07:54:14 +0000 (09:54 +0200)
committerFlorian Forster <octo@leeloo.lan.home.verplant.org>
Fri, 2 Oct 2009 07:54:14 +0000 (09:54 +0200)
Conflicts:
src/df.c

1  2 
README
src/df.c

diff --combined README
--- 1/README
--- 2/README
+++ b/README
@@@ -33,9 -33,6 +33,6 @@@ Feature
        Batterycharge, -current and voltage of ACPI and PMU based laptop
        batteries.
  
-     - curl
-       Parse statistics from websites using regular expressions.
      - bind
        Name server and resolver statistics from the `statistics-channel'
        interface of BIND 9.5, 9,6 and later.
      - conntrack
        Number of nf_conntrack entries.
  
-     - curl_json
-       Retrieves JSON data via cURL and parses it according to user
-       configuration.
      - cpu
        CPU utilization: Time spent in the system, user, nice, idle, and related
        states.
      - cpufreq
        CPU frequency (For laptops with speed step or a similar technology)
  
+     - curl
+       Parse statistics from websites using regular expressions.
+     - curl_json
+       Retrieves JSON data via cURL and parses it according to user
+       configuration.
      - dbi
        Executes SQL statements on various databases and interprets the returned
        data.
        MySQL server statistics: Commands issued, handlers triggered, thread
        usage, query cache utilization and traffic/octets sent and received.
  
 +    - netapp
 +      Plugin to query performance values from a NetApp storage system using the
 +      “Manage ONTAP” SDK provided by NetApp.
 +
      - netlink
        Very detailed Linux network interface and routing statistics. You can get
        (detailed) information on interfaces, qdiscs, classes, and, if you can
@@@ -507,10 -503,6 +507,10 @@@ Prerequisite
      Unsurprisingly used by the `mysql' plugin.
      <http://dev.mysql.com/>
  
 +  * libnatapp (optional)
 +    Required for the “netapp” plugin.
 +    This library is part of the “Manage ONTAP SDK” published by NetApp.
 +
    * libnetlink (optional)
      Used, obviously, for the `netlink' plugin.
      <http://www.linuxfoundation.org/en/Net:Iproute2>
diff --combined src/df.c
+++ b/src/df.c
@@@ -122,7 -122,6 +122,7 @@@ static int df_config (const char *key, 
  }
  
  static void df_submit (char *df_name,
 +              const char *type,
                gauge_t df_used,
                gauge_t df_free)
  {
        sstrncpy (vl.host, hostname_g, sizeof (vl.host));
        sstrncpy (vl.plugin, "df", sizeof (vl.plugin));
        sstrncpy (vl.plugin_instance, "", sizeof (vl.plugin_instance));
-       sstrncpy (vl.type, type, sizeof (vl.host));
 -      sstrncpy (vl.type, "df", sizeof (vl.type));
++      sstrncpy (vl.type, type, sizeof (vl.type));
        sstrncpy (vl.type_instance, df_name, sizeof (vl.type_instance));
  
        plugin_dispatch_values (&vl);
@@@ -157,8 -156,6 +157,8 @@@ static int df_read (void
        unsigned long long blocksize;
        gauge_t df_free;
        gauge_t df_used;
 +      gauge_t df_inodes_free;
 +      gauge_t df_inodes_used;
        char disk_name[256];
  
        mnt_list = NULL;
                df_free = statbuf.f_bfree * blocksize;
                df_used = (statbuf.f_blocks - statbuf.f_bfree) * blocksize;
  
 +              df_inodes_used = statbuf.f_files - statbuf.f_ffree;
 +              df_inodes_free = statbuf.f_ffree;
 +
                if (by_device) 
                {
                        /* eg, /dev/hda1  -- strip off the "/dev/" */
                        }
                }
  
 -              df_submit (disk_name, df_used, df_free);
 +              df_submit (disk_name, "df", df_used, df_free);
 +              df_submit (disk_name, "df_inodes", df_inodes_used, df_inodes_free);
        }
  
        cu_mount_freelist (mnt_list);