Can't find any stats into the pinba database

86 views
Skip to first unread message

omar.belkhodja

unread,
Apr 9, 2011, 10:30:51 AM4/9/11
to Pinba Engine development list
Hello,

I have installed pinba with the php extension. I have checked that
almost everything is working fine (see below). But I don't understand
why I don't find anything in the database.

Do I need to add some php into all my php scripts to have something
writen into the database ?
Is there something else to do ?

Thanks !


# php -i
pinba

Pinba support => enabled
Extension version => 1.0.0-dev
Google Protocol Buffers version => 2.4.0

Directive => Local Value => Master Value
pinba.enabled => 1 => 1
pinba.server => 127.0.0.1:30002 => 127.0.0.1:30002



# mysql> show plugins;
+------------+----------+----------------+--------------------
+---------+
| Name | Status | Type | Library |
License |
+------------+----------+----------------+--------------------
+---------+
| PINBA | ACTIVE | STORAGE ENGINE | libpinba_engine.so |
GPL |
+------------+----------+----------------+--------------------
+---------+


# netstat --listen | grep 30002
udp 0 0 *:30002 *:*


Antony Dovgal

unread,
Apr 10, 2011, 2:59:42 AM4/10/11
to pinba-...@googlegroups.com
On 04/09/2011 06:30 PM, omar.belkhodja wrote:
> Hello,
>
> I have installed pinba with the php extension. I have checked that
> almost everything is working fine (see below). But I don't understand
> why I don't find anything in the database.

Where exactly did you look?
Have you created all the default tables?
What do you get with 'SELECT * FROM pinba.info'?

--
Wbr,
Antony Dovgal
---
http://pinba.org - realtime statistics for PHP

omar.belkhodja

unread,
Apr 10, 2011, 6:44:56 AM4/10/11
to Pinba Engine development list
Hello,

mysql> SELECT * FROM pinba.info;
Empty set (0.01 sec)


BUT

When I have installed the plugin for mysql the first time, I had a big
crash issue. This is the situation I was having :

# mysql -uroot -p pinba < default_table
Enter password:
ERROR 2013 (HY000) at line 3: Lost connection to MySQL server during
query

The connection was lost because of the server crash.
So what I did after that, is that I have copy/paste all the table
creation commands that was within the file, after having removed/
created the database again. I did not have a crash after that, but
nothing worked regarding pinba.

Now, I have tried again the command (mysql -uroot -p pinba <
default_table), and I have again the same issue.

So, we can assume that with copy/paste, I have missed some tables. But
creating the whole tables, makes mysql server crash. On a few forums,
it is said that the crash due to some plugin, is generally due to the
fact that the plugin is not compiled with the same version of mysql
server code. I don't know how to be sure of that, because the mysql
server version installer on my machine, comes from a binary package...

Another possible source of the problem could be the dependant
libraries I have used. Please find below the configuration I have
used :

Ubuntu 10.04.2 LTS \n \l
pinba_engine-0.0.6
pinba_extension-201104091455
judy-1.0.5
libevent-2.0.10-stable
protobuf-2.4.0a
mysql-dfsg-5.1-5.1.41


The mysql source code was retreived using the following command :
apt-get source mysql-server

And the configuration of pinba was done as following :
./configure --with-mysql=../mysql-dfsg-5.1-5.1.41 --libdir=/usr/lib/
mysql/plugin


Any ideas ?
Thanks !

Omar Belkhodja

unread,
Apr 10, 2011, 9:44:43 AM4/10/11
to Pinba Engine development list
Hello all,

I have good news : I managed to let it work !

The thing was that mysql compilation was not done as the original binary files installed, as indicated in the mysql forums. So how I managed to compile mysql in the same manner as the original .deb binaries. Here is the procedure :

1) Get the source code and start compilation
apt-get -b source mysql-server

2) Stop the compilation after a few seconds (no need to have it all finished).
check the content of the file config.log, using the following command (please adapt to you mysql directory, that have been created after execution of the command apt-get -b source ...)

# cat mysql-dfsg-5.1-5.1.41/builddir/config.log | grep "\./configure" | head -1

$ ../configure --build=i486-linux-gnu --host=i486-linux-gnu --prefix=/usr --exec-prefix=/usr --libexecdir=/usr/sbin --datadir=/usr/share --localstatedir=/var/lib/mysql --includedir=/usr/include --infodir=/usr/share/info --mandir=/usr/share/man --with-server-suffix=-3ubuntu12.10 --with-comment=(Ubuntu) --with-system-type=debian-linux-gnu --enable-shared --enable-static --enable-thread-safe-client --enable-assembler --enable-local-infile --with-pstack --with-fast-mutexes --with-big-tables --with-unix-socket-path=/var/run/mysqld/mysqld.sock --with-mysqld-user=mysql --with-libwrap --without-readline --with-ssl --without-docs --with-extra-charsets=all --with-plugins=max --without-ndbcluster --with-embedded-server --with-embedded-privilege-control build_alias=i486-linux-gnu host_alias=i486-linux-gnu CC=gcc CFLAGS=-O3 -DBIG_JOINS=1  -fno-strict-aliasing LDFLAGS=-Wl,-Bsymbolic-functions CPPFLAGS= CXX=g++ CXXFLAGS=-O3 -DBIG_JOINS=1 -felide-constructors -fno-exceptions -fno-rtti  -fno-strict-aliasing --no-create --no-recursion


3) go to the mysql directory and create a script (something like my_configuration.sh) with the content below. Please adapt it according to the result of the previous line, and note that :
- I have removed both "--no-create --no-recursion"
- I have copied the variables build_alias,.... into separated lines. I have also added some " for the long variables

build_alias=i486-linux-gnu
host_alias=i486-linux-gnu
CC=gcc
CFLAGS="-O3 -DBIG_JOINS=1  -fno-strict-aliasing"
LDFLAGS="-Wl,-Bsymbolic-functions"
CPPFLAGS=
CXX=g++
CXXFLAGS="-O3 -DBIG_JOINS=1 -felide-constructors -fno-exceptions -fno-rtti  -fno-strict-aliasing"

./configure --build=i486-linux-gnu --host=i486-linux-gnu --prefix=/usr --exec-prefix=/usr --libexecdir=/usr/sbin --datadir=/usr/share --localstatedir=/var/lib/mysql --includedir=/usr/include --infodir=/usr/share/info --mandir=/usr/share/man --with-server-suffix=-3ubuntu12.10 --with-comment=\(Ubuntu\) --with-system-type=debian-linux-gnu --enable-shared --enable-static --enable-thread-safe-client --enable-assembler --enable-local-infile --with-pstack --with-fast-mutexes --with-big-tables --with-unix-socket-path=/var/run/mysqld/mysqld.sock --with-mysqld-user=mysql --with-libwrap --without-readline --with-ssl --without-docs --with-extra-charsets=all --with-plugins=max --without-ndbcluster --with-embedded-server --with-embedded-privilege-control

4) go to the mysql directory and run "make"

5) go back into pinba's directory and launch

./configure --with-mysql=../mysql-dfsg-5.1-5.1.41  --libdir=/usr/lib/mysql/plugin

That's all :) 

Hope this could help someone else ! It could be great if this is added to some wiki...

Omar



2011/4/10 omar.belkhodja <omar.be...@gmail.com>
--
---
Pinba Engine development mailing list
To unsubscribe, send an email to pinba-engine...@googlegroups.com

Александр Сахарчук

unread,
Apr 10, 2011, 4:22:57 AM4/10/11
to Pinba Engine development list
>Do I need to add some php into all my php scripts to have something
>writen into the database ?
Yes, read this link http://pinba.org/wiki/Manual:PHP_extension
there are list php api for pinba.

Александр Сахарчук

unread,
Apr 10, 2011, 4:05:29 AM4/10/11
to Pinba Engine development list
>Do I need to add some php into all my php scripts to have something
>writen into the database ?
Yes, you need add commands to gather and send statistics data.
Read this links - http://pinba.org/wiki/Manual:PHP_extension


On 9 апр, 17:30, "omar.belkhodja" <omar.belkho...@gmail.com> wrote:

Antony Dovgal

unread,
Apr 11, 2011, 8:20:24 AM4/11/11
to pinba-...@googlegroups.com
On 04/10/2011 05:44 PM, Omar Belkhodja wrote:
> Hello all,
>
> I have good news : I managed to let it work !
>
> The thing was that mysql compilation was not done as the original binary files installed, as indicated in the mysql forums. So how I managed to compile mysql in the same manner as the original .deb binaries. Here is the procedure :
> That's all :)
<..>

> Hope this could help someone else ! It could be great if this is added to some wiki...

Doesn't the note here cover it?
http://pinba.org/wiki/Manual:Installation#Installation_requirements

"Make sure you use the same configure options for the sources and MySQL server you're going to use (if you don't build it yourself using the same sources), otherwise you might experience unpredictable crashes and other problems. Pay special attention to these options: --with-big-tables, --with-debug."

Reply all
Reply to author
Forward
0 new messages