collectd

Rating: 
5
Your rating: None Average: 5 (4 votes)

collectd is a daemon which collects system performance statistics periodically and provides mechanisms to store the values in a variety of ways, for example, in RRD files. Upgrade notes are below.

This is a Sailfish port of collectd that uses keepalive library to wakeup the device and perform the readouts from different plugins. Some of the plugins are: cpu usage, battery, storage and disk traffic, network traffic, processes monitoring.

In Sailfish, this daemon can be controlled and data shown by GUI SystemDataScope. If you plan to use collectd with that GUI, you don't have to install this package directly. See description of GUI for collected stats.

If something does not work, please send your bug reports via GitHub by opening an Issue (see GitHub page below). It is an open-source project and its an easiest way to contribute to it. If you have improvement suggestions, send them also via GitHub by opening a new issue. Developers are welcome to join.

This release notes:

Swap plugin is compiled and enabled in default /etc/collectd.conf. If you have modified this configuration file, the upgrade is not expected to overwrite your version and you would have to enable it manually, if you wish.

Suspend plugin note:

For suspend plugin to work, debugFS has to be mounted with permissions allowing a user to read it. If you have /sys/kernel/debug/suspend_stats, but user cannot read it, you could set debugFS permissions during its mount either using debugFS755 or manually.

Used resourses by collectd:

  • RAM usage: resident size (RSS) is about 5MB, data covering 1 year statistics about 10 MB. RSS+Data = 15MB
  • CPU usage is about 0.1%
  • Wakeup device from sleep every 2.5 minutes
  • Storage use: in addition to program and libs, 1 year statistics takes 10 MB.

Upgrade notes:

When upgrading from previous version, please note

  • collectd will be stopped and disabled on boot. You would have to start and reenable it (contributions welcome to make upgrade a bit smarter).
  • if you made any changes in /etc/collectd.conf the configuration file will not be overwritten. The default the configuration file will be then with the ending .rpmsave. Compare two configuration files and enable new plugins, if you wish.
  • if you wish to delete some recorded data types: stop collectd; go to /home/nemo/.local/share/collectd/Jolla and delete the sets; modify /etc/collectd.conf; start collectd.

Upgrade notes for users of versions 2016.07.17-6 and earlier:

In short, for default configuration users, please delete the old datasets and start with the new default configuration (will delete earlier data). For that, stop collectd and remove /home/nemo/.local/share/collectd ( in terminal: rm -rf /home/nemo/.local/share/collectd ) and start collectd again. While the data will be lost from earlier recordings, new databases will be initialized allowing you to record data for 1 year.

If you modified RRD plugin section in your configuration, then please check if RRDs are actually covering the expected period.

Explanation: While the default settings were used to setup databases, at least on Nexus 4 SFOS port, the datasets sections that were supposed to cover long-term statistics were initialized wrong. As a result, while space was used to cover a year of stats, the presented statistics were limited to 1 week. For users of even earlier versions, there are also logging of inactive internet interfaces and disk partitions traffic. In the later versions, only active internet interfaces and physical disk traffic are logged.

With the default configuration active (check if /etc/collectd.conf.rpmsave or rpmnew exists and if its different from the current one), you should be all set.

Outlook

The functionality that I was planning to implement is there. While merging it with upstream, some plugins, such as statefs_ family, may merge with the corresponding collectd plugins. Please note that this may require, in future, changes in datasets.

collectd homepage: https://collectd.org/

Sailfish port developed at: https://github.com/rinigus/collectd

License: mixture of open-source licenses, MIT or GPL for most of the code.

Donations: https://rinigus.github.io/donate

For details, see Sailfish port description at https://github.com/rinigus/collectd/tree/sailfish/contrib/sailfish .

Graphs by SystemDataScope used in screeshots.

Screenshots: 
Application versions: 
Changelog: 

5.5.0.git.2018.01.20

  • follow /run storage by default (contributed by @Self-Perfection)

5.5.0.git.2017.12.24

  • Enabled swap plugin

5.5.0.git.2016.09.19

  • NB! Change in data reporting: statefs_battery is a part of battery plugin leading to changes in reported variable names
  • new battery plugin has been merged upstream
  • changes from upstream pulled Sep 19 2016

 

5.5.0.git.2016.08.30

  • NB! Change in data reporting: cpusleep, cpufreq, and cpuidle plugins use total_time_in_ms to report the recordings.
  • cpusleep merged upstream
  • removal of some dependencies for rpm package
  • changes from upstream pulled Aug 16 2016

5.5.0.git.2016.08.02

New plugins:

  • suspend to follow suspend attempts;
  • cpuidle to follow CPU idle states;
  • rewrite of cpufreq to follow CPU frequencies distributions and support for hot-pluggable CPUs

5.5.0.git.2016.08.02

  • new plugin: radio
  • new plugin: statefs_bluetooth
  • new plugin: statefs_internet
  • new plugin: statefs_cellular
  • fix RRD databases setup in default Sailfish configuration

For earlier versions, see Sailfish project github.