Difference between revisions of "Plugin:Netlink"

From collectd Wiki
Jump to: navigation, search
m (Example graphs: Removed the notice about empty error graphs.)
(Added "List of Plugins" template.)
Line 1: Line 1:
= Description =
+
{{List of Plugins}}
 +
== Description ==
  
 
The <em>Netlink</em> plugin will open a netlink socket to the Linux kernel and use it to get statistics for interfaces, qdiscs, classes, and, if you can make use of it, filters. Since in most setups many of the statistics this plugin can collect aren't of interest, you can select which information to gather using the configuration. The details are documented in the [http://collectd.org/documentation/manpages/collectd.conf.5.shtml#plugin_netlink collectd.conf(5)]  manpage.
 
The <em>Netlink</em> plugin will open a netlink socket to the Linux kernel and use it to get statistics for interfaces, qdiscs, classes, and, if you can make use of it, filters. Since in most setups many of the statistics this plugin can collect aren't of interest, you can select which information to gather using the configuration. The details are documented in the [http://collectd.org/documentation/manpages/collectd.conf.5.shtml#plugin_netlink collectd.conf(5)]  manpage.
Line 12: Line 13:
 
Graphing filters is a bit troublesome: Filters don't have an ID of their own, so the parent's ID (i. e. the qdisc or class that filter is attached to) is used. This may not result in a unique name if there is more than one filter attached to that qdisc or class. If you want to get statistics about different traffic types, please have a look at the [[Plugin:IPTables|IP-Tables]] plugin.
 
Graphing filters is a bit troublesome: Filters don't have an ID of their own, so the parent's ID (i. e. the qdisc or class that filter is attached to) is used. This may not result in a unique name if there is more than one filter attached to that qdisc or class. If you want to get statistics about different traffic types, please have a look at the [[Plugin:IPTables|IP-Tables]] plugin.
  
= Synopsis =
+
== Synopsis ==
  
 
  <Plugin "netlink">
 
  <Plugin "netlink">
Line 24: Line 25:
 
  </Plugin>
 
  </Plugin>
  
= Example graphs =
+
== Example graphs ==
  
 
[[Image:Plugin-netlink-if rx errors.png]]
 
[[Image:Plugin-netlink-if rx errors.png]]
Line 31: Line 32:
 
[[Image:Plugin-netlink-ipt packets.png]]
 
[[Image:Plugin-netlink-ipt packets.png]]
  
= Dependencies =
+
== Dependencies ==
  
 
* Linux 2.4 or later
 
* Linux 2.4 or later

Revision as of 10:46, 4 March 2009

Template:List of Plugins

Description

The Netlink plugin will open a netlink socket to the Linux kernel and use it to get statistics for interfaces, qdiscs, classes, and, if you can make use of it, filters. Since in most setups many of the statistics this plugin can collect aren't of interest, you can select which information to gather using the configuration. The details are documented in the collectd.conf(5) manpage.

The interface statistics has been split up in two parts:

  • The normal interface statistics include exactly the same information as is collected by the Interface plugin - it's only collected in another way.
  • The verbose interface statistics give you all the other details that are available: Number of dropped packets, number of multicast packets, and RX- and TX-errors by error types. Under Linux, you cannot get any more verbose than that. These statistics basically correspond to the values returned by:
# ip -s -s link list

But extended interface statistics is not all. The netlink plugin can also gather statistics from Linux' traffic control subsystem, i. e. the bytes and packets that passed a certain qdisc, class, or filter. I'm afraid there is no one sentence answer to what all that is, but there's an article in the LARTC FAQ which tries to explain that. If you have a traffic shaping or QoS setup and you need or want to know how much traffic is going over which qdisc or class, this is the right plugin for you.

Graphing filters is a bit troublesome: Filters don't have an ID of their own, so the parent's ID (i. e. the qdisc or class that filter is attached to) is used. This may not result in a unique name if there is more than one filter attached to that qdisc or class. If you want to get statistics about different traffic types, please have a look at the IP-Tables plugin.

Synopsis

<Plugin "netlink">
  Interface "eth0"
  Interface "ppp0"
  VerboseInterface "ppp0"
  QDisc "ppp0"
  Class "ppp0" "htb-1:10"
  Filter "ppp0" "u32-1:0"
  IgnoreSelected false
</Plugin>

Example graphs

Plugin-netlink-if rx errors.png Plugin-netlink-if tx errors.png Plugin-netlink-ipt bytes.png Plugin-netlink-ipt packets.png

Dependencies

  • Linux 2.4 or later
  • libnetlink