AS-Stats icon indicating copy to clipboard operation
AS-Stats copied to clipboard

rrd-extractstats.pl needs sort on %knownlinks & requires statsfile to be deleted if knownlinks file has changed

Open hengchai opened this issue 5 years ago • 1 comments

  1. With the addition of skipifnotmodified, the stats table is no longer being re-created during every run. However, function read_knownlinks() loads all the links into a hash %knownlinks which has inconsistent sort order when it's filled into @links.

Quick fix for is to update line 41:

my @links = values %knownlinks;

to

my @links = sort values %knownlinks;

This will keep the list of links consistent across runs.

  1. Per above, since stats table is no longer recreated during every run, if there's a new link added (or removed) the statsfile needs to be deleted so that rrd-extractstats.pl will recreate. Ideally schema should be checked to identify if there's any new links added (or removed).

hengchai avatar Dec 01 '20 22:12 hengchai

I've made a pull request for this exact issue, see #105. :-)

pv2b avatar Apr 24 '23 14:04 pv2b