Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Sat Mar 23, 2019 9:45 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 129 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7 ... 9  Next
Author Message
 Post subject: Re: Fix 64bit counters in Interface Traffic graphs
PostPosted: Mon May 09, 2011 4:07 pm 
Offline
Cacti User
User avatar

Joined: Sat Nov 17, 2007 3:37 pm
Posts: 54
Location: Atlanta, Ga
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')"


Top
 Profile  
 
 Post subject: Re: Fix 64bit counters in Interface Traffic graphs
PostPosted: Tue May 10, 2011 12:50 am 
Offline
Cacti User

Joined: Mon Apr 09, 2007 1:33 pm
Posts: 96
Location: Nizhnevartovsk, Russia
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')"

Looks like fixing doesn't start after poller run. Do you have similar output when grepping poller.php file for poller_bottom?
Code:
$ 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


Top
 Profile  
 
 Post subject: Re: Fix 64bit counters in Interface Traffic graphs
PostPosted: Tue May 10, 2011 9:06 am 
Offline
Cacti User
User avatar

Joined: Sat Nov 17, 2007 3:37 pm
Posts: 54
Location: Atlanta, Ga
shd wrote:
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')"

Looks like fixing doesn't start after poller run. Do you have similar output when grepping poller.php file for poller_bottom?
Code:
$ 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:
$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-?>


Top
 Profile  
 
 Post subject: Re: Fix 64bit counters in Interface Traffic graphs
PostPosted: Tue May 10, 2011 10:11 am 
Offline
Cacti User

Joined: Mon Apr 09, 2007 1:33 pm
Posts: 96
Location: Nizhnevartovsk, Russia
jt555 wrote:
Mine is a bit different:
Code:
$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-?>

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.

_________________
CentOS 64-bit, 20Gb RAM, 8xCPU, some virtual datastore. 600+ hosts, 200k+ datasources, avg polltime 45 sec


Top
 Profile  
 
 Post subject: Re: Fix 64bit counters in Interface Traffic graphs
PostPosted: Tue May 10, 2011 11:41 am 
Offline
Cacti User
User avatar

Joined: Sat Nov 17, 2007 3:37 pm
Posts: 54
Location: Atlanta, Ga
Quote:
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.


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'"


Top
 Profile  
 
 Post subject: Re: Fix 64bit counters in Interface Traffic graphs
PostPosted: Tue May 10, 2011 11:40 pm 
Offline
Cacti User

Joined: Mon Apr 09, 2007 1:33 pm
Posts: 96
Location: Nizhnevartovsk, Russia
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'"
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.

_________________
CentOS 64-bit, 20Gb RAM, 8xCPU, some virtual datastore. 600+ hosts, 200k+ datasources, avg polltime 45 sec


Top
 Profile  
 
 Post subject: Re: Fix 64bit counters in Interface Traffic graphs
PostPosted: Wed May 11, 2011 9:07 am 
Offline
Cacti User
User avatar

Joined: Sat Nov 17, 2007 3:37 pm
Posts: 54
Location: Atlanta, Ga
Quote:
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.


manual insert:
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.


Top
 Profile  
 
 Post subject: Re: Fix 64bit counters in Interface Traffic graphs
PostPosted: Wed May 11, 2011 9:07 am 
Offline
Cacti User
User avatar

Joined: Sat Nov 17, 2007 3:37 pm
Posts: 54
Location: Atlanta, Ga
Quote:
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.


manual insert:
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.


Top
 Profile  
 
 Post subject: Re: Fix 64bit counters in Interface Traffic graphs
PostPosted: Wed May 11, 2011 10:33 am 
Offline
Cacti User

Joined: Mon Apr 09, 2007 1:33 pm
Posts: 96
Location: Nizhnevartovsk, Russia
jt555 wrote:
It seems to be working now. The data templates are also changed to 64-bit counters. Strange.

Strange indeed. But it's good to know that it is working now.

jt555 wrote:
BTW, you probably know this but threshold plugin has to be disabled for Fix 64-bit to work.

Yeah, it is a known problem with old versions of thold or old versions of cacti. Or both. :)

_________________
CentOS 64-bit, 20Gb RAM, 8xCPU, some virtual datastore. 600+ hosts, 200k+ datasources, avg polltime 45 sec


Top
 Profile  
 
 Post subject: Re: Fix 64bit counters in Interface Traffic graphs
PostPosted: Mon Dec 05, 2011 4:00 am 
Offline

Joined: Mon Dec 05, 2011 3:53 am
Posts: 3
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')'


Top
 Profile  
 
 Post subject: Re: Fix 64bit counters in Interface Traffic graphs
PostPosted: Mon Dec 05, 2011 4:16 am 
Offline
Cacti User

Joined: Mon Apr 09, 2007 1:33 pm
Posts: 96
Location: Nizhnevartovsk, Russia
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')'

1. Try to reinstall the plugin.
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


Top
 Profile  
 
 Post subject: Re: Fix 64bit counters in Interface Traffic graphs
PostPosted: Mon Dec 05, 2011 4:31 am 
Offline

Joined: Mon Dec 05, 2011 3:53 am
Posts: 3
mysql> INSERT INTO plugin_fix64bit(local_data_id, rrd_maximum) VALUES(40, '1000000000');
ERROR 1062 (23000): Duplicate entry '40-1000000000' for key 1


Top
 Profile  
 
 Post subject: Re: Fix 64bit counters in Interface Traffic graphs
PostPosted: Mon Dec 05, 2011 4:43 am 
Offline
Cacti User

Joined: Mon Apr 09, 2007 1:33 pm
Posts: 96
Location: Nizhnevartovsk, Russia
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

Looks like you're already trying to fix this graph. Can you show me grep FIX64BIT of cacti.log file?
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


Top
 Profile  
 
 Post subject: Re: Fix 64bit counters in Interface Traffic graphs
PostPosted: Mon Dec 05, 2011 5:00 am 
Offline

Joined: Mon Dec 05, 2011 3:53 am
Posts: 3
I created a new graph and pressed a button. This entry appeared in the logs after the second pressing.


Top
 Profile  
 
 Post subject: Re: Fix 64bit counters in Interface Traffic graphs
PostPosted: Mon Dec 05, 2011 5:01 am 
Offline
Cacti User

Joined: Mon Apr 09, 2007 1:33 pm
Posts: 96
Location: Nizhnevartovsk, Russia
gamayun wrote:
I created a new graph and pressed a button. This entry appeared in the logs after the second pressing.

Yes, but have you waited enough time to get this graph fixed? It's being fixed only after the next poll.

_________________
CentOS 64-bit, 20Gb RAM, 8xCPU, some virtual datastore. 600+ hosts, 200k+ datasources, avg polltime 45 sec


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 129 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7 ... 9  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 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

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group