Collectd / rrd error -> some graphics not showing up

Hello community!

I've been seeing the following error for a long time, and would like to see if this is "normal" or how can this be fixed... I'm on the latest build of LEDE ( up to today ) , and when I go through Luci to the statistics page, to the processes tab ( I'm monitoring the following processes : uhttpd dropbear dnsmasq bandwidthd collectd darkstat smbd hostapd snmpd ) , there are several "broken link icons" in the page ... and this is logged to the syslog:

Sat Apr 29 17:45:32 2017 daemon.err uhttpd[2559]: ERROR: opening '/mnt/sda1/RouterACS/processes/ps_cputime.rrd': No such file or directory
Sat Apr 29 17:45:32 2017 daemon.err uhttpd[2559]: ERROR: opening '/mnt/sda1/RouterACS/processes-bandwidthd/ps_state-sleeping.rrd': No such file or directory
Sat Apr 29 17:45:32 2017 daemon.err uhttpd[2559]: ERROR: opening '/mnt/sda1/RouterACS/processes-collectd/ps_state-sleeping.rrd': No such file or directory
Sat Apr 29 17:45:32 2017 daemon.err uhttpd[2559]: ERROR: opening '/mnt/sda1/RouterACS/processes-darkstat/ps_state-sleeping.rrd': No such file or directory
Sat Apr 29 17:45:32 2017 daemon.err uhttpd[2559]: ERROR: opening '/mnt/sda1/RouterACS/processes-dnsmasq/ps_state-sleeping.rrd': No such file or directory
Sat Apr 29 17:45:33 2017 daemon.err uhttpd[2559]: ERROR: opening '/mnt/sda1/RouterACS/processes-dropbear/ps_state-sleeping.rrd': No such file or directory
Sat Apr 29 17:45:33 2017 daemon.err uhttpd[2559]: ERROR: opening '/mnt/sda1/RouterACS/processes-hostapd/ps_state-sleeping.rrd': No such file or directory
Sat Apr 29 17:45:33 2017 daemon.err uhttpd[2559]: ERROR: opening '/mnt/sda1/RouterACS/processes-smbd/ps_state-sleeping.rrd': No such file or directory
Sat Apr 29 17:45:33 2017 daemon.err uhttpd[2559]: ERROR: opening '/mnt/sda1/RouterACS/processes-snmpd/ps_state-sleeping.rrd': No such file or directory
Sat Apr 29 17:45:33 2017 daemon.err uhttpd[2559]: ERROR: opening '/mnt/sda1/RouterACS/processes-uhttpd/ps_state-sleeping.rrd': No such file or directory

Any tips?

Are the RRD files, the directory (and its parents) world-readable?
Luci graphs run as nobody (instead of "root")...

Is the error only happening for the processes plugin? Other graphs are shown ok?

Just remembered that this was discussed in February:
https://github.com/openwrt/luci/issues/1021

The permissions are ok ... the file is just not there, as if collectd is not collecting the stats, therefore not creating the .rrd file?

@hnyman Yes, the other graphs are showing ok.

Like I explained in https://github.com/openwrt/luci/issues/1021#issuecomment-280448000 it is mainly due to the simplistic structure of the statistics graph pages. The same page is serving both the "global overview" and the process-specific detail pages (selectable as tabs from the top menu). Not all data is available in both the global and the detail pages, and that makes some graphs to fail. See the difference in data contents of global & process-specific dirs:

root@LEDE:/tmp/rrd/LEDE# ls processes*
processes:
fork_rate.rrd          ps_state-paging.rrd    ps_state-sleeping.rrd  ps_state-zombies.rrd
ps_state-blocked.rrd   ps_state-running.rrd   ps_state-stopped.rrd

processes-dnsmasq:
ps_code.rrd        ps_cputime.rrd     ps_pagefaults.rrd  ps_stacksize.rrd
ps_count.rrd       ps_data.rrd        ps_rss.rrd         ps_vm.rrd

processes-dropbear:
ps_code.rrd        ps_cputime.rrd     ps_pagefaults.rrd  ps_stacksize.rrd
ps_count.rrd       ps_data.rrd        ps_rss.rrd         ps_vm.rrd

processes-uhttpd:
ps_code.rrd        ps_cputime.rrd     ps_pagefaults.rrd  ps_stacksize.rrd
ps_count.rrd       ps_data.rrd        ps_rss.rrd         ps_vm.rrd

The page would need much more complex logic to clean this up.

1 Like

FYI,
I looked a bit more into the processes plugin. I did not yet figure out how to remove the failing graphs from the page, but I beautified the graphs a bit (and corrected the memory graph).
https://github.com/openwrt/luci/commit/b737831e56854f55fedbc6a6394d385ee0aef6e3

1 Like

WOW! That was quick! :slight_smile: