• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Server microstats, show server load in footer 1.1

No permission to download

dbembibre

Active member
#1
dbembibre submitted a new resource:

Server microstats, show server load in footer - Server microstats, show server load in footer only for admins

This is a simple add-on to show in your footer area the server load.
This add-on only works on linux and Unix.

You need to allow access to the virtual files /proc/loadavg in your php allow path.
I have this in my vhost.conf

Code:
<IfModule mod_php5.c>
            php_admin_flag engine on
            php_flag xcache.cacher 1
            php_flag xcache.optimizer 1
            php_admin_value open_basedir "/var/www/vhosts/site.com/httpdocs:/tmp:/proc/loadavg"</IfModule>
The add-on...
Read more about this resource...
 

dbembibre

Active member
#7
Is there a way to get the stats of a second server? I have just separated out my DB and webserver and would like to know the load and stats of that one as well.
Is not posible because the executed php file is who read the load in the virtual file structure /proc. :( I can't read the server load of other machine.
 

kingston

Well-known member
#8
Is not posible because the executed php file is who read the load in the virtual file structure /proc. :( I can't read the server load of other machine.
Really wanted to put this up top in the admin bar. I monitor our load pretty closely as we have spikes all the time and I am trying to improve how well the site responds. I tried embedding the code in the moderation bar and it is not working. any advice?
 

dbembibre

Active member
#11
@dbembibre sorry to bother you but how can I move this into a different template? I tried and the text didnt show up. Thanks for the help.
Dont worry im on holidays and dont see this. I upload an update with the things that you need, but if you want you can edit by hand.

Open /Library/microsostats/Listener.php and change the hookname to moderator_bar.

PHP:
if ($hookName == 'moderator_bar')
Open your_style/templates/ micrsotats_label and replace with this:

PHP:
<xen:if is="{$visitor.is_admin}">
<span class="itemCount " title="">{$serverload}</span>
</xen:if>
You see something like this

Captura.JPG
 

kingston

Well-known member
#12
Dont worry im on holidays and dont see this. I upload an update with the things that you need, but if you want you can edit by hand.

Open /Library/microsostats/Listener.php and change the hookname to moderator_bar.

PHP:
if ($hookName == 'moderator_bar')
Open your_style/templates/ micrsotats_label and replace with this:

PHP:
<xen:if is="{$visitor.is_admin}">
<span class="itemCount " title="">{$serverload}</span>
</xen:if>
You see something like this

View attachment 54673
Thank you. When trying to monitor it was annoying to have to scroll down to the bottom every time. This is great!
 
#18
There is only one file and the xml file and it's in the right place. Edit seems to be working now and I dunno why cause I didn't change anything lol ! Just one of them days I guess
 
Last edited: