Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

phpMyAdmin - Status Monitor - System Resources not updating

Tags:

phpmyadmin

I have recently upgraded my phpMyAdmin from 3.3x to 4.0.7. Everything is working great - except for the nifty Status --> Monitor --> System resource charts. The database charts are working fine. I've checked online resources and can't find any reference to a configuration parameter or specific permissions that need to be changed in order to enable these.

Any ideas on how to enable the "System CPU Usage", "System Memory", and "System Swap" monitor charts?

OS: CentOS 6.4 | PHP: 5.3.27 | Database: MariaDB 5.5.32 | phpMyAdmin: 4.0.7

like image 306
Beto Avatar asked Dec 09 '22 12:12

Beto


2 Answers

FIXED! Tyron's script revealed the problem: an error message thrown when attempting to access the /proc/meminfo and /proc/stat files via the script (and phpMyAdmin)

open_basedir restriction in effect. File(/proc/meminfo) is not within the allowed path

With this clue, I was able to tweak the account's php.ini settings (this is a cPanel server, so used the PHP open_basedir Tweak) and voila! the data is available. THANK YOU!

like image 65
Beto Avatar answered Feb 23 '23 03:02

Beto


It's possible that CentOS is simply not supported, though some googling suggest that it should work. Two conditions have to apply for it to work:

  • /proc/meminfo and /proc/stat need to be readable

  • the constant PHP_OS (which is according to google populated by the uname command) has to be set to Linux in your case

If both of these conditions apply to your system: Do you see any errors in your Browsers Javascript console when you open the monitor?

The code responsible for it is in libraries/sysinfo.lib.php, if you're interested.

like image 37
Tyron Avatar answered Feb 23 '23 03:02

Tyron