Fix 64bit counters in Interface Traffic graphs
Moderators: Developers, Moderators
Re: Fix 64bit counters in Interface Traffic graphs
I disabled almost every other plugin and tried it again. This is all that's in the log:
[~]$ grep -i FIX64BIT /var/www/html/log/cacti.log
05/09/2011 09:00:00 PM - CMDPHP: Poller[0] DEVEL: SQL Row: "SELECT * FROM plugin_config WHERE directory='fix64bit'"
05/09/2011 09:00:28 PM - CMDPHP: Poller[0] DEVEL: SQL Exec: "INSERT INTO plugin_fix64bit(local_data_id, rrd_maximum) VALUES(6405, '1000000000')"
[~]$ grep -i FIX64BIT /var/www/html/log/cacti.log
05/09/2011 09:00:00 PM - CMDPHP: Poller[0] DEVEL: SQL Row: "SELECT * FROM plugin_config WHERE directory='fix64bit'"
05/09/2011 09:00:28 PM - CMDPHP: Poller[0] DEVEL: SQL Exec: "INSERT INTO plugin_fix64bit(local_data_id, rrd_maximum) VALUES(6405, '1000000000')"
Re: Fix 64bit counters in Interface Traffic graphs
Looks like fixing doesn't start after poller run. Do you have similar output when grepping poller.php file for poller_bottom?jt555 wrote:I disabled almost every other plugin and tried it again. This is all that's in the log:
[~]$ grep -i FIX64BIT /var/www/html/log/cacti.log
05/09/2011 09:00:00 PM - CMDPHP: Poller[0] DEVEL: SQL Row: "SELECT * FROM plugin_config WHERE directory='fix64bit'"
05/09/2011 09:00:28 PM - CMDPHP: Poller[0] DEVEL: SQL Exec: "INSERT INTO plugin_fix64bit(local_data_id, rrd_maximum) VALUES(6405, '1000000000')"
Code: Select all
$ grep -n -B 3 -A 3 poller_bottom poller.php
450-
451- /* sleep the appripriate amount of time */
452- if ($poller_runs_completed < $poller_runs) {
453: api_plugin_hook('poller_bottom');
454- usleep($sleep_time * 1000000);
455- api_plugin_hook('poller_top');
456- }
--
499- echo " --debug|-d Output debug information. Similar to cacti's DEBUG logging level.\n\n";
500-}
501-
502:api_plugin_hook('poller_bottom');
503-
504-?>
CentOS 64-bit, 20Gb RAM, 8xCPU, some virtual datastore. 600+ hosts, 200k+ datasources, avg polltime 45 sec
Re: Fix 64bit counters in Interface Traffic graphs
shd wrote:Looks like fixing doesn't start after poller run. Do you have similar output when grepping poller.php file for poller_bottom?jt555 wrote:I disabled almost every other plugin and tried it again. This is all that's in the log:
[~]$ grep -i FIX64BIT /var/www/html/log/cacti.log
05/09/2011 09:00:00 PM - CMDPHP: Poller[0] DEVEL: SQL Row: "SELECT * FROM plugin_config WHERE directory='fix64bit'"
05/09/2011 09:00:28 PM - CMDPHP: Poller[0] DEVEL: SQL Exec: "INSERT INTO plugin_fix64bit(local_data_id, rrd_maximum) VALUES(6405, '1000000000')"Code: Select all
$ grep -n -B 3 -A 3 poller_bottom poller.php 450- 451- /* sleep the appripriate amount of time */ 452- if ($poller_runs_completed < $poller_runs) { 453: api_plugin_hook('poller_bottom'); 454- usleep($sleep_time * 1000000); 455- api_plugin_hook('poller_top'); 456- } -- 499- echo " --debug|-d Output debug information. Similar to cacti's DEBUG logging level.\n\n"; 500-} 501- 502:api_plugin_hook('poller_bottom'); 503- 504-?>
Mine is a bit different:
Code: Select all
$grep -n -B 3 -A 3 poller_bottom poller.php
407-
408- /* sleep the appripriate amount of time */
409- if ($poller_runs_completed < $poller_runs) {
410: api_plugin_hook('poller_bottom');
411- db_close();
412- usleep($sleep_time * 1000000);
413- db_connect_real($database_hostname, $database_username, $database_password, $database_default, $database_type, $database_port);
--
458- echo " --debug|-d Output debug information. Similar to cacti's DEBUG logging level.\n\n";
459-}
460-
461:api_plugin_hook('poller_bottom');
462-
463-?>
Re: Fix 64bit counters in Interface Traffic graphs
Show me select count(*) from plugin_fix64bitjt555 wrote:Mine is a bit different:Code: Select all
$grep -n -B 3 -A 3 poller_bottom poller.php 407- 408- /* sleep the appripriate amount of time */ 409- if ($poller_runs_completed < $poller_runs) { 410: api_plugin_hook('poller_bottom'); 411- db_close(); 412- usleep($sleep_time * 1000000); 413- db_connect_real($database_hostname, $database_username, $database_password, $database_default, $database_type, $database_port); -- 458- echo " --debug|-d Output debug information. Similar to cacti's DEBUG logging level.\n\n"; 459-} 460- 461:api_plugin_hook('poller_bottom'); 462- 463-?>
Also try leaving debug mode on and wait for two polls to happen after adding graphs to fix. Then grep log for fix64bit.
CentOS 64-bit, 20Gb RAM, 8xCPU, some virtual datastore. 600+ hosts, 200k+ datasources, avg polltime 45 sec
Re: Fix 64bit counters in Interface Traffic graphs
mysql> select count(*) from plugin_fix64bit;Show me select count(*) from plugin_fix64bit
Also try leaving debug mode on and wait for two polls to happen after adding graphs to fix. Then grep log for fix64bit.
+----------+
| count(*) |
+----------+
| 0 |
+----------+
1 row in set (0.00 sec)
$ grep -i fix64bit /var/www/html/log/cacti.log
05/10/2011 04:06:41 PM - CMDPHP: Poller[0] DEVEL: SQL Exec: "INSERT INTO plugin_fix64bit(local_data_id, rrd_maximum) VALUES(6406, '1000000000')"
05/10/2011 04:13:22 PM - CMDPHP: Poller[0] DEVEL: SQL Row: "SELECT * FROM plugin_config WHERE directory='fix64bit'"
05/10/2011 04:13:35 PM - CMDPHP: Poller[0] DEVEL: SQL Row: "SELECT * FROM plugin_config WHERE directory='fix64bit'"
05/10/2011 04:13:35 PM - CMDPHP: Poller[0] DEVEL: SQL Row: "SELECT * FROM plugin_config WHERE directory='fix64bit'"
Re: Fix 64bit counters in Interface Traffic graphs
That's very strange. Table plugin_fix64bit is empty after insert? Plugin deletes entries from that table only after succeeding the fix process. Can you insert entries into that table by user cacti? Try executing "INSERT INTO plugin_fix64bit(local_data_id, rrd_maximum) VALUES(6406, '1000000000')" manually and check number of entries in that table shortly afterwards and if that table is populated, look at the cacti.log for fix64bit again.jt555 wrote:mysql> select count(*) from plugin_fix64bit;
+----------+
| count(*) |
+----------+
| 0 |
+----------+
1 row in set (0.00 sec)
$ grep -i fix64bit /var/www/html/log/cacti.log
05/10/2011 04:06:41 PM - CMDPHP: Poller[0] DEVEL: SQL Exec: "INSERT INTO plugin_fix64bit(local_data_id, rrd_maximum) VALUES(6406, '1000000000')"
05/10/2011 04:13:22 PM - CMDPHP: Poller[0] DEVEL: SQL Row: "SELECT * FROM plugin_config WHERE directory='fix64bit'"
05/10/2011 04:13:35 PM - CMDPHP: Poller[0] DEVEL: SQL Row: "SELECT * FROM plugin_config WHERE directory='fix64bit'"
05/10/2011 04:13:35 PM - CMDPHP: Poller[0] DEVEL: SQL Row: "SELECT * FROM plugin_config WHERE directory='fix64bit'"
CentOS 64-bit, 20Gb RAM, 8xCPU, some virtual datastore. 600+ hosts, 200k+ datasources, avg polltime 45 sec
Re: Fix 64bit counters in Interface Traffic graphs
manual insert:That's very strange. Table plugin_fix64bit is empty after insert? Plugin deletes entries from that table only after succeeding the fix process. Can you insert entries into that table by user cacti? Try executing "INSERT INTO plugin_fix64bit(local_data_id, rrd_maximum) VALUES(6406, '1000000000')" manually and check number of entries in that table shortly afterwards and if that table is populated, look at the cacti.log for fix64bit again.
mysql> INSERT INTO plugin_fix64bit(local_data_id, rrd_maximum) VALUES(6406, '1000000000');
mysql> select * from plugin_fix64bit;
+---------------+-------------+
| local_data_id | rrd_maximum |
+---------------+-------------+
| 6406 | 1000000000 |
+---------------+-------------+
1 row in set (0.00 sec)
After setting through GUI:
mysql> select * from plugin_fix64bit;
+---------------+-------------+
| local_data_id | rrd_maximum |
+---------------+-------------+
| 6406 | 1000000000 |
| 6407 | 1000000000 |
| 6408 | 1000000000 |
+---------------+-------------+
3 rows in set (0.00 sec)
It seems to be working now. The data templates are also changed to 64-bit counters. Strange.
BTW, you probably know this but threshold plugin has to be disabled for Fix 64-bit to work.
Re: Fix 64bit counters in Interface Traffic graphs
manual insert:That's very strange. Table plugin_fix64bit is empty after insert? Plugin deletes entries from that table only after succeeding the fix process. Can you insert entries into that table by user cacti? Try executing "INSERT INTO plugin_fix64bit(local_data_id, rrd_maximum) VALUES(6406, '1000000000')" manually and check number of entries in that table shortly afterwards and if that table is populated, look at the cacti.log for fix64bit again.
mysql> INSERT INTO plugin_fix64bit(local_data_id, rrd_maximum) VALUES(6406, '1000000000');
mysql> select * from plugin_fix64bit;
+---------------+-------------+
| local_data_id | rrd_maximum |
+---------------+-------------+
| 6406 | 1000000000 |
+---------------+-------------+
1 row in set (0.00 sec)
After setting through GUI:
mysql> select * from plugin_fix64bit;
+---------------+-------------+
| local_data_id | rrd_maximum |
+---------------+-------------+
| 6406 | 1000000000 |
| 6407 | 1000000000 |
| 6408 | 1000000000 |
+---------------+-------------+
3 rows in set (0.00 sec)
It seems to be working now. The data templates are also changed to 64-bit counters. Strange.
BTW, you probably know this but threshold plugin has to be disabled for Fix 64-bit to work.
Re: Fix 64bit counters in Interface Traffic graphs
Strange indeed. But it's good to know that it is working now.jt555 wrote:It seems to be working now. The data templates are also changed to 64-bit counters. Strange.
Yeah, it is a known problem with old versions of thold or old versions of cacti. Or both.jt555 wrote:BTW, you probably know this but threshold plugin has to be disabled for Fix 64-bit to work.
CentOS 64-bit, 20Gb RAM, 8xCPU, some virtual datastore. 600+ hosts, 200k+ datasources, avg polltime 45 sec
Re: Fix 64bit counters in Interface Traffic graphs
After clicking the icon fix64 in the logs I see the following entry:12/05/2011 02:44:16 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1062', SQL:"INSERT INTO plugin_fix64bit(local_data_id, rrd_maximum) VALUES(40, '1000000000')'
Re: Fix 64bit counters in Interface Traffic graphs
1. Try to reinstall the plugin.gamayun wrote:After clicking the icon fix64 in the logs I see the following entry:12/05/2011 02:44:16 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1062', SQL:"INSERT INTO plugin_fix64bit(local_data_id, rrd_maximum) VALUES(40, '1000000000')'
2. Can you run mysql under cacti user, select cacti database and then run this query? After that, show me output of this query.
CentOS 64-bit, 20Gb RAM, 8xCPU, some virtual datastore. 600+ hosts, 200k+ datasources, avg polltime 45 sec
Re: Fix 64bit counters in Interface Traffic graphs
mysql> INSERT INTO plugin_fix64bit(local_data_id, rrd_maximum) VALUES(40, '1000000000');
ERROR 1062 (23000): Duplicate entry '40-1000000000' for key 1
ERROR 1062 (23000): Duplicate entry '40-1000000000' for key 1
Re: Fix 64bit counters in Interface Traffic graphs
Looks like you're already trying to fix this graph. Can you show me grep FIX64BIT of cacti.log file?gamayun wrote:mysql> INSERT INTO plugin_fix64bit(local_data_id, rrd_maximum) VALUES(40, '1000000000');
ERROR 1062 (23000): Duplicate entry '40-1000000000' for key 1
Also, what are the Cacti and PIA versions?
CentOS 64-bit, 20Gb RAM, 8xCPU, some virtual datastore. 600+ hosts, 200k+ datasources, avg polltime 45 sec
Re: Fix 64bit counters in Interface Traffic graphs
I created a new graph and pressed a button. This entry appeared in the logs after the second pressing.
Re: Fix 64bit counters in Interface Traffic graphs
Yes, but have you waited enough time to get this graph fixed? It's being fixed only after the next poll.gamayun wrote:I created a new graph and pressed a button. This entry appeared in the logs after the second pressing.
CentOS 64-bit, 20Gb RAM, 8xCPU, some virtual datastore. 600+ hosts, 200k+ datasources, avg polltime 45 sec
Who is online
Users browsing this forum: No registered users and 0 guests