Thursday, July 29, 2010

LoadAVG

lightweight load, memory & transfer monitoring

Logging

Posted by admin On December - 22 - 2009

The LoadAVG Logger

This page is being set up for help configuring the loadavg logger. The logger is a critical part of running loadavg, as it sits in the background and collects data every 6 minutes on the health of your system and stores it in the loadavg log files.

Setting up the LoadAVG Logger

The logger needs to run as a cron job on your machine and must be set to run exactly every 6 minutes. Do NOT attempt to change the timing, it simply will not work correctly.

Use “crontab -e” to edit the crontab and insert a line something like this:

*/6 * * * * /PATH/TO/php -q /PATH/TO/logger.php >/dev/null 2>&1

Edit the paths to php and logger.php as necessary.

If logger cannot function then loadavg will not be able to collect data! There is a quick test that you can run to make sure logger is running properly and has the right permissions and that is to call it directly as follows:

/PATH/TO/php -q /PATH/TO/logger.php

If you see nothing in the output then you are looking good, if you see a few warnings then this is also ok, but if you see errors or safe mode restrictions then you have problems!

Safe Mode

Safe mode is a default php setting that prevents people form uploading and running renegade scripts on your server. You can only modify this setting via the core php settings file, php.ini

Since the LoadAVG logger runs as a cron job, and is a php executable, you will need to make sure that safe mode is turned off on your system or it wont be able to function.

There are two ways to do this, the first is a brute force method and is not the saest way if you are on ashares server. This is to disable safe mode globally in php.ini. To do so edit php.ini (usually found at /etc/php.ini) and set the variable:

safemode = off

The other way is to add the location of the logger.php script to your safe mode executables directory. To do this, edit php.ini and update the following variable:

safe_mode_exec_dir = /path/to/logger.php

Shared Servers

If you are on a shared server, you will need to contact your systems administration team and let them know that you need to set p a cron job and that the logger script will need to have safe mode disabled and they can assist you in the process.

Popularity: 20% [?]

Add A Comment

ERROR: si-captcha.php plugin says GD image support not detected in PHP!

Contact your web host and ask them why GD image support is not enabled for PHP.

ERROR: si-captcha.php plugin says imagepng function not detected in PHP!

Contact your web host and ask them why imagepng function is not enabled for PHP.