Rebuild poller_output datafile?
Moderators: Developers, Moderators
Rebuild poller_output datafile?
Hi all, I'm new to mySql, Cacti and am trying to recover a table datafile for the poller_output table.
The table's datafile was apparently deleted. When I show the tables in the database, the table name does show up. The poller_output.FRM file still exists in the /var/lib/mysql/cacti directory. However, the poller_output.MYD file does not exist in the standard location. I've searched the entire /var mount point w/o finding it.
A query against that table gives ...
mysql> select * from poller_output;
ERROR 1017 (HY000): Can't find file: 'poller_output' (errno: 2)
I tried to repair the table with the repair table command ...
mysql> repair table poller_output use_frm;
and got the message ...
Can't find file: 'poller_output' (errno: 2)
I believe that we can drop/recreate the table w/o any serious loss at this point (Cacti has been down since 5Nov, I just took over.) Does someone have the data definition commands to rebuild the poller_output table? Is there another option?
The background info is - Cacti version is 0.8.7b, mySql db version is 5.0.22 on Linux Redhat, 2.6.18-53.el5, physical server - hardware unknown right now.
Any assistance would be appreciated.
Thanks,
Jeff
The table's datafile was apparently deleted. When I show the tables in the database, the table name does show up. The poller_output.FRM file still exists in the /var/lib/mysql/cacti directory. However, the poller_output.MYD file does not exist in the standard location. I've searched the entire /var mount point w/o finding it.
A query against that table gives ...
mysql> select * from poller_output;
ERROR 1017 (HY000): Can't find file: 'poller_output' (errno: 2)
I tried to repair the table with the repair table command ...
mysql> repair table poller_output use_frm;
and got the message ...
Can't find file: 'poller_output' (errno: 2)
I believe that we can drop/recreate the table w/o any serious loss at this point (Cacti has been down since 5Nov, I just took over.) Does someone have the data definition commands to rebuild the poller_output table? Is there another option?
The background info is - Cacti version is 0.8.7b, mySql db version is 5.0.22 on Linux Redhat, 2.6.18-53.el5, physical server - hardware unknown right now.
Any assistance would be appreciated.
Thanks,
Jeff
- rony
- Developer/Forum Admin
- Posts: 6022
- Joined: Mon Nov 17, 2003 6:35 pm
- Location: Michigan, USA
- Contact:
Just drop and recreate the table, it's a table that only stores data temporarly before it's written to the RRDtool files.
You can find the create table syntax in the cacti.sql file located in your Cacti installation.
You can find the create table syntax in the cacti.sql file located in your Cacti installation.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
-
- Posts: 1
- Joined: Thu Feb 11, 2010 10:54 am
Can not file poller_output;
Hi all,
If you can not fix the error with poller_output table not show:
Just run mysql, use database "cacti" and
+ mySQL>select count(*) from poller_output;
If too much data, run query:
+ mysql> truncate table poller_output;
And it worked for my issue.
Good luck,
Manh Dung
If you can not fix the error with poller_output table not show:
Just run mysql, use database "cacti" and
+ mySQL>select count(*) from poller_output;
If too much data, run query:
+ mysql> truncate table poller_output;
And it worked for my issue.
Good luck,
Manh Dung
Re: Rebuild poller_output datafile?
I only had the .frm file, no .myd, and I ran the command and my file came back Cacti is online again after being off-line for very long.If too much data, run query:
+ mysql> truncate table poller_output;
Re: Rebuild poller_output datafile?
Thanks guys. I had run out of disk space and the Poller_output file got corrupted. For the past two days I have had no graphing. With your instruction I was able to get it working again.
-
- Posts: 35
- Joined: Tue Sep 29, 2009 4:36 am
Re: Rebuild poller_output datafile?
It worked for me also to trunk the table.
I had the same issue as "kjjmiles" and after using the truncate method everything's fine!
I had the same issue as "kjjmiles" and after using the truncate method everything's fine!
Re: Rebuild poller_output datafile?
Thanks!
It's indeed the problem here: when running out of space on the device, the temporary table poller_output may be deleted but not re-created.
Running MyIsam, if you're missing the MYD and MYI files, you have to recreate the table, the good thing is that the frm file contains the definition of the TABLE, and using the command TRUNCATE does the table creation for you.
poller_output.frm
poller_output.MYD
poller_output.MYI
Using InnoDB (I don't know if it's an option), you may have manually DROP and CREATE the table, I have dumped the table structure just in case (Version 0.8.7i)
http://dev.mysql.com/doc/refman/4.1/en/ ... table.html :
Thomas
It's indeed the problem here: when running out of space on the device, the temporary table poller_output may be deleted but not re-created.
Running MyIsam, if you're missing the MYD and MYI files, you have to recreate the table, the good thing is that the frm file contains the definition of the TABLE, and using the command TRUNCATE does the table creation for you.
poller_output.frm
poller_output.MYD
poller_output.MYI
Using InnoDB (I don't know if it's an option), you may have manually DROP and CREATE the table, I have dumped the table structure just in case (Version 0.8.7i)
http://dev.mysql.com/doc/refman/4.1/en/ ... table.html :
As long as the table format file tbl_name.frm is valid, the table can be re-created as an empty table with TRUNCATE TABLE, even if the data or index files have become corrupted.
Code: Select all
--
-- Table structure for table `poller_output`
--
DROP TABLE IF EXISTS `poller_output`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `poller_output` (
`local_data_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
`rrd_name` varchar(19) NOT NULL DEFAULT '',
`time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`output` text NOT NULL,
PRIMARY KEY (`local_data_id`,`rrd_name`,`time`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
Re: Rebuild poller_output datafile?
Dropping the table worked for me too (Cacti 0.8.7b). My scenario was disk full and mysql database corruption. Moved /var to separate disk and mysqld was reporting poller_output was missing in /var/log/daemon.log.
To recover:
To recover:
- 1: Determine the password (<pwd>) for the cacti user to access the cacti mysql database.
Note: the second file above is included by thje first.
Code: Select all
less /usr/share/cacti/site/include/config.php less /etc/cacti/debian.php
2: Open the database and drop the table. Dropping the table causes the table to be rebuilt if it is missing.Code: Select all
mysql --user=cacti --password=<pwd> cacti truncate table poller_output; \q
Re: Rebuild poller_output datafile?
I face exactly the same problem but for a different table:
The data stored in this table are temporary ?
Does anybody knows if I can delete / empty the table?ERROR 1017 (HY000) at line 1: Can't find file: 'plugin_thold_host_failed' (errno: 2)
The data stored in this table are temporary ?
cacti rulez!
Re: Rebuild poller_output datafile?
Just after pressing "Submit" here, the table was created again automatically.
cacti rulez!
Re: Rebuild poller_output datafile?
This worked for me too. Instantly fixed. Thanks!
tla2k12 wrote:Dropping the table worked for me too (Cacti 0.8.7b). My scenario was disk full and mysql database corruption. Moved /var to separate disk and mysqld was reporting poller_output was missing in /var/log/daemon.log.
To recover:
- 1: Determine the password (<pwd>) for the cacti user to access the cacti mysql database.
Note: the second file above is included by thje first.Code: Select all
less /usr/share/cacti/site/include/config.php less /etc/cacti/debian.php
2: Open the database and drop the table. Dropping the table causes the table to be rebuilt if it is missing.Code: Select all
mysql --user=cacti --password=<pwd> cacti truncate table poller_output; \q
Re: Rebuild poller_output datafile?
In My case,
It shows Poller_output table in list of tables, but when i try to show table, table doesnt exists
re created table (refer following mysql query),
after 5 minutes traffic graphs were start to update
mysql > CREATE TABLE `poller_output` (
`local_data_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
`rrd_name` varchar(19) NOT NULL DEFAULT '',
`time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`output` text NOT NULL,
PRIMARY KEY (`local_data_id`,`rrd_name`,`time`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
It shows Poller_output table in list of tables, but when i try to show table, table doesnt exists
re created table (refer following mysql query),
after 5 minutes traffic graphs were start to update
mysql > CREATE TABLE `poller_output` (
`local_data_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
`rrd_name` varchar(19) NOT NULL DEFAULT '',
`time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`output` text NOT NULL,
PRIMARY KEY (`local_data_id`,`rrd_name`,`time`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
- Attachments
-
- fff.PNG (99.98 KiB) Viewed 4403 times
-
- ff.PNG (5.43 KiB) Viewed 4403 times
Who is online
Users browsing this forum: No registered users and 3 guests