Collectd

collectd is Article description::a daemon that regularly collects, transfers, and stores system information. It is typically used for collecting performance information and other system data like disk, memory, and network usage, and from many other sources using a number of plugins. Other software can then be used to read databases of collected information to plot it and analyze it.

Emerge
First, determine which plugins you want on your system. The collectd wiki contains a list of plugins, or check the collectd man page. These plugins are specified as USE flags with a  prefix, though these can also be specified with a   variable in :

collectd requires a plugin to enable any sort of logging. Make sure you enable the syslog plugin and/or the logfile plugin.

To write data, you need to enable write plugins. The rrdtool plugin is a common plugin. Data can be written to other collectd daemons using the network plugin.

To install:

Configuration
With collectd and some plugins installed, enable them in the configuration file by uncommenting them, for instance, the syslog plugin:

rrdtool plugin
Default location for saving the rrd files by collectd is BaseDir but that will mix the rrdtool's files with other plugins. So redefine it.

Service
To start collectd on start-up:

Troubleshooting
Check the logs for errors after starting up to make sure everything is going smoothly.