Cactid
Moderators: Developers, Moderators
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Tap,
Here is the update sql.c file. I have not tried to compile it yet, I am at a shared computer without tools. It will attempt to connect up to 20 times with at 10th of a second interval between retries. If it can't connect after all the attempts, it will die.
TheWitness
Here is the update sql.c file. I have not tried to compile it yet, I am at a shared computer without tools. It will attempt to connect up to 20 times with at 10th of a second interval between retries. If it can't connect after all the attempts, it will die.
TheWitness
- Attachments
-
- sql.c
- (3.39 KiB) Downloaded 253 times
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
TheWitness,
See in attachment the cacti.log file while using cactid.exe without the changed sql.c file --> polling process with 1 process and variable threads.
Testing now cactid.exe with the changed sql.c file. Will update you as soon as possible.
/Tap
See in attachment the cacti.log file while using cactid.exe without the changed sql.c file --> polling process with 1 process and variable threads.
Testing now cactid.exe with the changed sql.c file. Will update you as soon as possible.
/Tap
- Attachments
-
- cacti.txt
- (8.08 KiB) Downloaded 209 times
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Willie & Tap,
You need to NOT use the PConnect as recommended by another user. I will cause your MySQL log file to exhaust your system of it's disk space. Do not use it. I will be committing a revised database.php to remove this setting in the next few days.
TheWitness
You need to NOT use the PConnect as recommended by another user. I will cause your MySQL log file to exhaust your system of it's disk space. Do not use it. I will be committing a revised database.php to remove this setting in the next few days.
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Cactid
Larry,
I will change the sql.c to your new version and remove the pconnect. Although, it was the pconnect that made it work. Without both the changed sql.c (my one, not the mod one with the sleep that you just posted) and the pconnect, I got those really nasty error messages from php on the web side. I will let you know tomorrow once I get back into the office.
Regards,
Willie
I will change the sql.c to your new version and remove the pconnect. Although, it was the pconnect that made it work. Without both the changed sql.c (my one, not the mod one with the sleep that you just posted) and the pconnect, I got those really nasty error messages from php on the web side. I will let you know tomorrow once I get back into the office.
Regards,
Willie
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Willie,
I am going to try to resurrect the PConnect. However, the code will have to change to perform an explicit disconnect. When I implemented at the office, my MySQL server logs grew rather rapidly. The disconnect should allow us to re-implement.
I have the day off today. You can reach me at (586)759-3129
Larry
I am going to try to resurrect the PConnect. However, the code will have to change to perform an explicit disconnect. When I implemented at the office, my MySQL server logs grew rather rapidly. The disconnect should allow us to re-implement.
I have the day off today. You can reach me at (586)759-3129
Larry
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
You guys both just made my week (for today anyway). Make sure you download the patches that Ian posted yesterday. There is a major issue with Recache that will lock up the polling process. Currently, there are 4 Cacti 0.8.6b patch files that need to be applied.
Just a note, I should be able to have some form of multiple poller architecture ready within the month. PS. Don't apply any "database" changes (i.e. Just let 0.8.7 beta be broke) for now. Don't attempt to implement until I let you know. I am still changing DB structure and it will screw up your "test" (I hope) installs.
I am also going to make additional changes to both sql.c and database.php to make the SQL retries a configurable option. Maybe not this week. I may simply change the retry and usleep counts in database.php and sql.c to be consistent.
Larry
Just a note, I should be able to have some form of multiple poller architecture ready within the month. PS. Don't apply any "database" changes (i.e. Just let 0.8.7 beta be broke) for now. Don't attempt to implement until I let you know. I am still changing DB structure and it will screw up your "test" (I hope) installs.
I am also going to make additional changes to both sql.c and database.php to make the SQL retries a configurable option. Maybe not this week. I may simply change the retry and usleep counts in database.php and sql.c to be consistent.
Larry
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Willie,
The code I posted in CVS is not correct. Please try the following code in database.php. Note the retries, delay statments and logic are eqivalent to cactid.
Larry
The code I posted in CVS is not correct. Please try the following code in database.php. Note the retries, delay statments and logic are eqivalent to cactid.
Larry
Code: Select all
/* db_connect_real - makes a connection to the database server
@arg $host - the hostname of the database server, 'localhost' if the database server is running
on this machine
@arg $user - the username to connect to the database server as
@arg $pass - the password to connect to the database server with
@arg $db_name - the name of the database to connect to
@arg $db_type - the type of database server to connect to, only 'mysql' is currently supported
@arg $retries - the number a time the server should attempt to connect before failing
@returns - (bool) '1' for success, '0' for error */
function db_connect_real($host,$user,$pass,$db_name,$db_type, $retries = 20) {
global $cnn_id;
$i = 1;
$cnn_id = NewADOConnection($db_type);
while ($i <= $retries) {
if ($cnn_id->Connect($host,$user,$pass,$db_name)) {
return(1);
}
$i++;
usleep(100000);
}
cacti_log("ERROR: Cannot connect to MySQL server on '$host'. Please make sure you have specified a valid MySQL database name in 'include/config.php'.");
return(0);
}
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
I have posted to CVS.
Larry
Larry
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Willie & Tap,
Need to make 1 more correction to the code.
Need to make 1 more correction to the code.
Code: Select all
/* db_connect_real - makes a connection to the database server
@arg $host - the hostname of the database server, 'localhost' if the database server is running
on this machine
@arg $user - the username to connect to the database server as
@arg $pass - the password to connect to the database server with
@arg $db_name - the name of the database to connect to
@arg $db_type - the type of database server to connect to, only 'mysql' is currently supported
@arg $retries - the number a time the server should attempt to connect before failing
@returns - (bool) '1' for success, '0' for error */
function db_connect_real($host,$user,$pass,$db_name,$db_type, $retries = 20) {
global $cnn_id;
$i = 1;
$cnn_id = NewADOConnection($db_type);
while ($i <= $retries) {
if ($cnn_id->Connect($host,$user,$pass,$db_name)) {
return(1);
}
$i++;
usleep(100000);
}
cacti_log("ERROR: Cannot connect to MySQL server on '$host'. Please make sure you have specified a valid MySQL database name in 'include/config.php'.");
die("<br>Cannot connect to MySQL server on '$host'. Please make sure you have specified a valid MySQL database name in 'include/config.php'.");
return(0);
}
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
cactid
Larry,
I have applied the patch and am testing. My initial findings are that when I am using the connect vs the pconnect, I am getting broken graph links when the poller is running. It seems once the poller finishes, things go back to normal. If I am running the pconnect, I never get broken graph links.
I will let you know if I get the message again.
Regards,
Willie
I have applied the patch and am testing. My initial findings are that when I am using the connect vs the pconnect, I am getting broken graph links when the poller is running. It seems once the poller finishes, things go back to normal. If I am running the pconnect, I never get broken graph links.
I will let you know if I get the message again.
Regards,
Willie
Larry,
Good and bad news :
- the good news :
seems that for the moment my connection problems are solved.
- the bad news :
After implementing the 4 pre-patched files and modifying the database.php file, I'm getting the following strange thing :
in my log I see for every polling a recurring recache event -> WARNING: Recache Event Detected for Host, and it's always for the same Host ?!?
(see attachement)
It's like the Recache system has done the recache but forgot the clearing of it. OR it needs to do a recache but can't do it. All graphs for the host seem to be OK.
/Tap
Good and bad news :
- the good news :
seems that for the moment my connection problems are solved.
- the bad news :
After implementing the 4 pre-patched files and modifying the database.php file, I'm getting the following strange thing :
in my log I see for every polling a recurring recache event -> WARNING: Recache Event Detected for Host, and it's always for the same Host ?!?
(see attachement)
It's like the Recache system has done the recache but forgot the clearing of it. OR it needs to do a recache but can't do it. All graphs for the host seem to be OK.
/Tap
- Attachments
-
- cacti.txt
- (2.6 KiB) Downloaded 218 times
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Tap & Willie,
The bug with Recache is now fixed. There is a new lib/data_query.php file that corrects the problem. It can be found at the following link:
http://www.cacti.net/downloads/patches/ ... e-patched/
It should be there by morning. Otherwise, grap it from CVS under the main section.
Larry
The bug with Recache is now fixed. There is a new lib/data_query.php file that corrects the problem. It can be found at the following link:
http://www.cacti.net/downloads/patches/ ... e-patched/
It should be there by morning. Otherwise, grap it from CVS under the main section.
Larry
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Who is online
Users browsing this forum: No registered users and 1 guest