Neeraj Agarwal wrote:
On Sun, Mar 28, 2010 at 2:04 AM, Marc Delisle <marc@infomarc.info mailto:marc@infomarc.info> wrote:
Neeraj Agarwal a écrit : > On Sun, Mar 28, 2010 at 1:53 AM, Marc Delisle <marc@infomarc.info <mailto:marc@infomarc.info>> wrote: > >> Neeraj Agarwal a écrit : >> >>>>> Can use fopen() to read through the logs and generate data. >>>> You are thinking about a process external to phpMyAdmin here, I guess. >>>> This is not in the scope of the GSoC projects for phpMyAdmin. >>>> >>> No, not an external project. In the PMA package itself, we can read and >>> scan the MySQL logs and get our data. >> How? you only have access to data that the web server itself has access. >> Also, the web server can be on a different machine than the MySQL >> server, how do you fopen() that? >> >>> >>>> > >>>>> Or I think the way of creating a separate PHP library which can capture >>>> all >>>>> data upto a certain extent would do it too. We will anyway have to >>>> maintain >>>>> the data to build the graphs. >>>> I don't get your point. What would be calling this PHP library in order >>>> to capture this data? You mean all data passing through phpMyAdmin? This >>>> does not reflect the complete server activity. >>>> >>> All the user's code would be calling this PHP library in order for us to >>> capture the data. As its done with many different CMS which reports SQL >>> stats to administrator for diagnosis basis. >> You cannot ask developers of all apps running on a server to modify >> their apps in order to capture and store statistical data! This is just >> not practical and would work in a limited number of situations. >> >> >> -- >> Marc Delisle >> http://infomarc.info > > I understand. What alternative would you suggest? I don't see any way we can show historic data (except limited historic data that would be captured and stored only via phpMyAdmin but I doubt this is useful). Anyway, other tools like Cacti exist just for this purpose. See Baron's templates at http://www.xaprb.com/blog/2008/04/27/improved-cacti-monitoring-templates-for-mysql/
Many people uses phpMyAdmin so if we build the functionality into this then it would be great.
So, we are now oriented to generate graphs only for current status, aren't we?
I will try to think of something more and let you know until that we are left with current system status. We can generate excellent graphs using GD2 library as well as using JS to make it more rich.
Having read the discussion I fully agree with Marc that graphing historic data poses a serious problem. Making pma keep track of ongoing activity would duplicate way too much from tools like cacti and nagios.
The next best thing might be something like the mytop utility. It would keep polling the database to store its data in session or javascript variables.
Something Martynas suggested is to present charts for query results. The definition of such a graph could be stored in the pmadb.