[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Cheshire Cat Computing :: View topic - Graphs problems
Cheshire Cat Computing
http://www.steveshipway.org/forum/

Graphs problems
http://www.steveshipway.org/forum/viewtopic.php?f=2&t=5001
Page 1 of 1

Author:  samuel6 [ Thu Dec 15, 2011 11:20 pm ]
Post subject:  Graphs problems

Hi all,

I'm new in "routers.cgi" and I have a problem with the graphics.

I have installed MRTG and ROUTERS2.CGI in a Ubuntu server last month.

I put the RRD files from an old system, and everything worked fine and I could see the old graphics, but yesterday, I had to restart the server (to aplicate the updates) and the graphics was reset, and old data dissapeared.

What can I do to show again the old data on the graphs?

Thank you.

Author:  stevesh [ Fri Dec 16, 2011 10:58 am ]
Post subject:  Re: Graphs problems

Check the RRD files still exist. If not, you'll need to restore from backup.

Check your clock is set correctly. If it is too far in advance, then the next MRTG update will expire and delete all your data. If it is too far behind, then it will not be able to display any data as the RRD will be for the future.

If your RRD files have been expired then youll need to restore from backup to get the data back. I hope you remembered to take backups!

You can use 'rrdtool dump filename.rrd' to see if there is any data in the file. If it just shows 'NaN' everywhere then the data has been expired.

Author:  samuel6 [ Mon Dec 19, 2011 7:52 pm ]
Post subject:  Re: Graphs problems

Thanks Steve.

As you said, the RRD files had been expired.

Using "RRDTOOL DUMP filename.rrd" I show the next data:
<!-- 2011-12-03 05:00:00 CET / 1322884800 --> <row><v>NaN</v><v>NaN</v></row>
<!-- 2011-12-03 05:30:00 CET / 1322886600 --> <row><v>NaN</v><v>NaN</v></row>
<!-- 2011-12-03 06:00:00 CET / 1322888400 --> <row><v>NaN</v><v>NaN</v></row>
<!-- 2011-12-03 06:30:00 CET / 1322890200 --> <row><v>NaN</v><v>NaN</v></row>
<!-- 2011-12-03 07:00:00 CET / 1322892000 --> <row><v>NaN</v><v>NaN</v></row>
<!-- 2011-12-03 07:30:00 CET / 1322893800 --> <row><v>NaN</v><v>NaN</v></row>
<!-- 2011-12-03 08:00:00 CET / 1322895600 --> <row><v>NaN</v><v>NaN</v></row>
<!-- 2011-12-03 08:30:00 CET / 1322897400 --> <row><v>NaN</v><v>NaN</v></row>
<!-- 2011-12-03 09:00:00 CET / 1322899200 --> <row><v>NaN</v><v>NaN</v></row>
<!-- 2011-12-03 09:30:00 CET / 1322901000 --> <row><v>NaN</v><v>NaN</v></row>
<!-- 2011-12-03 10:00:00 CET / 1322902800 --> <row><v>NaN</v><v>NaN</v></row>
<!-- 2011-12-03 10:30:00 CET / 1322904600 --> <row><v>NaN</v><v>NaN</v></row>
<!-- 2011-12-03 11:00:00 CET / 1322906400 --> <row><v>NaN</v><v>NaN</v></row>
<!-- 2011-12-03 11:30:00 CET / 1322908200 --> <row><v>NaN</v><v>NaN</v></row>
<!-- 2011-12-03 12:00:00 CET / 1322910000 --> <row><v>NaN</v><v>NaN</v></row>

I have a backup from the RRD files, so what can I do to add the old data from this backup to the RRD files who was in use now?

And another question. Why the RRD files has been expired after a reboot of the system?

Thank you so much.

Author:  stevesh [ Mon Dec 19, 2011 8:27 pm ]
Post subject:  Re: Graphs problems

You should be able to just restore your backup, and any relevant data will be kept (though remember it only keeps data for a certain length of time)

Normally, the RRD files would not be cleared after a reboot. However, if your system clock has a problem, then this can happen. Make sure your system clock is synchronised properly before starting MRTG else, if it thinks the time is in the future, it can incorrectly expire and delete historical data.

Author:  samuel6 [ Tue Dec 20, 2011 12:50 am ]
Post subject:  Re: Graphs problems

Hi Steve.

The clock is OK, because I have the NTP service enabled.

I discovered where was the problem with the RRD files. My RRD files were in /tmp, and my server has a UBUNTU distribution, so in every boot /tmp was cleared.

I changed the RRD folder to /mrtg, and the problem is resolved, but now I have a new question.

What can I do to add the old data from the backup RRD files to the new ones?

Can I add the old data and the new data with "cat NEW.RRD >> OLD.RRD" and overwrite the NEW.RRD to see all data on the graphs?

Thank you.

Author:  stevesh [ Tue Dec 20, 2011 9:48 am ]
Post subject:  Re: Graphs problems

Ah - I'm sure you know now, but you NEVER put anything you want to keep in /tmp ( or /var/tmp for that matter). Some systems (eg Solaris) make /tmp a ram disk which means it is erased on reboot. Others have bootup scripts that automatically clear out /tmp files.
Also, /tmp is not so secure as it has global r/w privs.

Author:  samuel6 [ Tue Dec 20, 2011 8:30 pm ]
Post subject:  Re: Graphs problems

Yes I know, I have had a fool error.

But now I need your help again for one more thing:

What can I do to add the data on the old RRD file with the data on the new RRD files, to see all data on the graphs?

Thank you.

Author:  stevesh [ Tue Dec 20, 2011 9:19 pm ]
Post subject:  Re: Graphs problems

Merging two RRD files like this is asked for so often that you'd think there would be a utility for it. Unfortunately, there isnt... you would need to export the RRD files to XML and merge them before writing back to form a new RRD file.

Almost all the problems with this sort of merge are concerned with making sure the two RRD files combine correctly, and the length of the combined file, but if we can assume the file to be created by MRTG rather than as generic RRD files, then this removes most of the potential issues as almost all of these settings are standard. The only problem then would be to specify the cutover time (when it switches from the first file to the second). This should be automatically deducable by looking for the first non-NaN value in the second.

Maybe I'll take a go at writing one this summer holiday...

Author:  stevesh [ Tue Dec 20, 2011 9:27 pm ]
Post subject:  Re: Graphs problems

You may like to try this attempt from a guy in Italy: http://www.pintori.it/rrd-merger/

This seems to merge an old and new RRD, overwriting the old with any non-NaN values form the nw to make a merged RRD.

Author:  samuel6 [ Tue Dec 20, 2011 9:32 pm ]
Post subject:  Re: Graphs problems

Thank you so much for your help Steve.

Page 1 of 1 All times are UTC + 12 hours [ DST ]
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/