how to check mysql services?
Moderators: Developers, Moderators
how to check mysql services?
Any idea how to check mysql services in CACTi?
- fmangeant
- Cacti Guru User
- Posts: 2345
- Joined: Fri Sep 19, 2003 8:36 am
- Location: Sophia-Antipolis, France
- Contact:
Hi
if you want to graph MySQL usage, nice templates are available here : http://forums.cacti.net/viewtopic.php?t=11010
if you want to graph MySQL usage, nice templates are available here : http://forums.cacti.net/viewtopic.php?t=11010
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
I need to know if mysql is still running or not cos rrd stopped updating even though its still polling periodically.fmangeant wrote:Hi
if you want to graph MySQL usage, nice templates are available here : http://forums.cacti.net/viewtopic.php?t=11010
issue indicated at http://forums.cacti.net/viewtopic.php?t=15379
Depends on your distribution of linux. Most have init scripts that allow you to check the status of a running service with:
Or, you could always check manually for a running process:
Finally, you could always try to manually connect to your mysql server from your localhost using the user/pw you created when you set up cacti:
Code: Select all
/etc/init.d/mysql status
Code: Select all
ps auxw | grep mysql
Code: Select all
mysql -u youruser -p
As a matter of fact, if the problem is that the graphs have stopped graphing... you may want to get into the local mysql console and run this query:
If it's some huge number, you can run the following query to try to get it working again:
Note that the truncate command is dumping everything in that table, and I believe that you'll be losing data for your graphs... so if it starts graphing again you'll have a blank spot in the graph. However, I've had good luck getting my graphs to start again by doing this. So, yeah, use at your own risk.. but if your cacti server is in development anyway, no harm no foul right?
Code: Select all
select count(*) from poller_output;
Code: Select all
truncate table poller_output;
Last edited by Matt`G on Wed Aug 23, 2006 9:53 am, edited 1 time in total.
How to start CACTI db if its not running?Matt`G wrote:As a matter of fact, if the problem is that the graphs have stopped graphing... you may want to get into the local mysql console and run this query:If it's some huge number, you can run the following query to try to get it working again:Code: Select all
select count(*) from poller_output;
Note that the truncate command is dumping everything in that table, and I believe that you'll be losing data for your graphs... so if it starts graphing again you'll have a blank spot in the graph. However, I've had good luck getting my graphs to start again by doing this. So, yeah, use at your own risk.. but if your cacti server is in development anyway, no harm no foul right?Code: Select all
truncate table poller_output
If mysql is running, the cacti DB is running. If mysql is not running, try starting it with:ivia wrote:How to start CACTI db if its not running?
Code: Select all
/etc/init.d/mysql start
BTW, I should have been more specific in my last post... Once you log into MySQL console as suggested a couple posts up, you need to issue this command:
Code: Select all
use cacti;
Thanks to all, cacti is working now by 'truncate table poller_output'Matt`G wrote:As a matter of fact, if the problem is that the graphs have stopped graphing... you may want to get into the local mysql console and run this query:If it's some huge number, you can run the following query to try to get it working again:Code: Select all
select count(*) from poller_output;
Note that the truncate command is dumping everything in that table, and I believe that you'll be losing data for your graphs... so if it starts graphing again you'll have a blank spot in the graph. However, I've had good luck getting my graphs to start again by doing this. So, yeah, use at your own risk.. but if your cacti server is in development anyway, no harm no foul right?Code: Select all
truncate table poller_output;
Who is online
Users browsing this forum: No registered users and 5 guests