Truncating the database

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
zkenton
Posts: 47
Joined: Fri Jun 29, 2007 2:22 pm

Truncating the database

Post by zkenton »

I continuously have to truncate the mysql database in order to get the graphs to come back to life. This happens about once every 3 weeks. Is there any way to avoid this? Truncate automatically or stop the database from filling up?
User avatar
Linegod
Developer
Posts: 1626
Joined: Thu Feb 20, 2003 10:16 am
Location: Canada
Contact:

Post by Linegod »

Which table are you truncating?

Which version are you running?
--
Live fast, die young
You're sucking up my bandwidth.

J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

I suspect they really mean the binary logs, not the database tables.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
zkenton
Posts: 47
Joined: Fri Jun 29, 2007 2:22 pm

Post by zkenton »

I am running 0.8.7 and have to complete this procedure every few weeks in order to get the graphs back up:

This is commonly due to php.ini's memory settings of 8MB default. Change this to at least 64 MB.
To check this, please run following sql from mysql cli (or phpmyadmin or the like)
Code:
select count(*) from poller_output;

If the result is huge, you may get rid of those stuff by
Code:
truncate table poller_output;

*From Gandalf's NAN debug guide
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

Oohhh. So it *is* the database :-?

You shouldn't need to do that on a regular basis. What do your poller stats look like? (STATS line in your cacti.log) and what memory_limit do you now have? (current Cacti manual recommends 128M)
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
zkenton
Posts: 47
Joined: Fri Jun 29, 2007 2:22 pm

Post by zkenton »

My STATS in cacti.log all resemble:
SYSTEM STATS: Time:27.9589 Method:cactid Processes:1 Threads:1 Hosts:83 HostsPerProcess:83 DataSources:834 RRDsProcessed:579

While I had 128M as my memory_limit, I juiced it up to 512 the other day just to see what happens. The machine has plenty of RAM, so we'll see.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests