[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

Software support and information
It is currently Mon Dec 22, 2025 9:55 am

All times are UTC + 12 hours [ DST ]




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: Graphs problems
PostPosted: Thu Dec 15, 2011 11:20 pm 
Offline
User

Joined: Thu Dec 15, 2011 11:08 pm
Posts: 5
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.


Top
 Profile Send private message  
 
 Post subject: Re: Graphs problems
PostPosted: Fri Dec 16, 2011 10:58 am 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 3039
Location: Auckland, New Zealand
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.

_________________
Steve Shipway
UNIX Systems, ITSS, University of Auckland, NZ
Woe unto them that rise up early in the morning... -- Isaiah 5:11


Top
 Profile Send private message  
 
 Post subject: Re: Graphs problems
PostPosted: Mon Dec 19, 2011 7:52 pm 
Offline
User

Joined: Thu Dec 15, 2011 11:08 pm
Posts: 5
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.


Top
 Profile Send private message  
 
 Post subject: Re: Graphs problems
PostPosted: Mon Dec 19, 2011 8:27 pm 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 3039
Location: Auckland, New Zealand
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.

_________________
Steve Shipway
UNIX Systems, ITSS, University of Auckland, NZ
Woe unto them that rise up early in the morning... -- Isaiah 5:11


Top
 Profile Send private message  
 
 Post subject: Re: Graphs problems
PostPosted: Tue Dec 20, 2011 12:50 am 
Offline
User

Joined: Thu Dec 15, 2011 11:08 pm
Posts: 5
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.


Top
 Profile Send private message  
 
 Post subject: Re: Graphs problems
PostPosted: Tue Dec 20, 2011 9:48 am 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 3039
Location: Auckland, New Zealand
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.

_________________
Steve Shipway
UNIX Systems, ITSS, University of Auckland, NZ
Woe unto them that rise up early in the morning... -- Isaiah 5:11


Top
 Profile Send private message  
 
 Post subject: Re: Graphs problems
PostPosted: Tue Dec 20, 2011 8:30 pm 
Offline
User

Joined: Thu Dec 15, 2011 11:08 pm
Posts: 5
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.


Top
 Profile Send private message  
 
 Post subject: Re: Graphs problems
PostPosted: Tue Dec 20, 2011 9:19 pm 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 3039
Location: Auckland, New Zealand
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...

_________________
Steve Shipway
UNIX Systems, ITSS, University of Auckland, NZ
Woe unto them that rise up early in the morning... -- Isaiah 5:11


Top
 Profile Send private message  
 
 Post subject: Re: Graphs problems
PostPosted: Tue Dec 20, 2011 9:27 pm 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 3039
Location: Auckland, New Zealand
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.

_________________
Steve Shipway
UNIX Systems, ITSS, University of Auckland, NZ
Woe unto them that rise up early in the morning... -- Isaiah 5:11


Top
 Profile Send private message  
 
 Post subject: Re: Graphs problems
PostPosted: Tue Dec 20, 2011 9:32 pm 
Offline
User

Joined: Thu Dec 15, 2011 11:08 pm
Posts: 5
Thank you so much for your help Steve.


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC + 12 hours [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group