[Release] Load Monitor 0.1 - Your server loads in a fancy chart :)

futurevision

Verified User
Joined
Nov 26, 2008
Messages
51
Because I had no clue about the loads on my servers and I didn't find a plugin which can tell me this I decided to create my own.

What does it do?
With a cron job it collects the data from the 'top' command and saves it into a database. The plugin shows the results in a nice chart (using Google Chart), you can click on a specific time to view the snapshot of 'top'.

How to install
Download the plugin from this url: http://future-vision.nl/da/load_monitor.tar.gz then install using DA plugin manager.

After you've installed the plugin you will have to add a cron job to crontab, there is a script available to do this but I recommend to do this manually, just call the ./add.sh in the scripts folder in the interval you want. Specific commands and example are available in the Help section of the plugin.

What does it look like?
http://future-vision.nl/da/load_monitor_1.jpg
http://future-vision.nl/da/load_monitor_2.jpg

What does it cost?
Nothing, consider it my small contribution to the community :eek: Also no crappy ioncube loaders or anything is required, I don't have any secrets hidden in the plugin.

Support? Bugs? Issues? Tips? Ideas?
I've built the plugin on a XEN VPS running Debian 6 64-bit and I've tested it too on a dedicated CentOS 5.5 32-bt server and it's working fine on both.

You can post bugs/issues/ideas here but don't expect me to fix them quickly or at all, I'm doing this in my spare time for fun. I'm not responsible for any screw ups on your server although I don't really know what could go wrong with it.

Have fun with it, hope you like my plugin.
 
Last edited:

scsi

Verified User
Joined
Aug 19, 2008
Messages
4,695
install_cron.sh has a bug

/usr/local/bin/php -f instal_cron.php

Shouldnt it be install_cron.php ?
 

SeLLeRoNe

Super Moderator
Joined
Oct 9, 2004
Messages
6,789
Location
A Coruña, Spain
Does it create the database? Is a MySQL DB or it store in a file?

On screen 2 looks like he save all the top output for a determined time (that i suppose can be changed with the crontab runs), is correct or did i missunderstood?

Thanks for this plugin, looks useful.

Regards
 

scsi

Verified User
Joined
Aug 19, 2008
Messages
4,695
It uses sqlite and it creates it when you install it.
 

futurevision

Verified User
Joined
Nov 26, 2008
Messages
51
That seems to be a bug, yeah... ill fix that :) -> fixed

As stated it indeed uses sqlite database, that way no credentials of your server are needed for the plugin.

BTW.... the 'top' is completely parsed so only the data itself is saved and re-build when you view the details. Not the entire output is being saved as it would take much more space. It is quite easy to add more data to the main chart (like nr. of processes etc) if anyone wants.
 
Last edited:

SeLLeRoNe

Super Moderator
Joined
Oct 9, 2004
Messages
6,789
Location
A Coruña, Spain
Thanks for this plugin, looks very nice and useful :)

Ive just one last question, there is a way to install it using ssh? Ive checked the install.sh file but doenst suppose to get started from ssh (doesnt create folders and neither copy files in plugins folder (as for example csf does)).

Maybe scsi shuold help me with that for manage to install (maybe just untar and put in correct path and mange directadmin to "notice" that)?

Thanks both

Regards
 

SeLLeRoNe

Super Moderator
Joined
Oct 9, 2004
Messages
6,789
Location
A Coruña, Spain
Neveermind, ive noticed that create the folder and unzip the files and start the db creation is quite enough.

Regards
 

futurevision

Verified User
Joined
Nov 26, 2008
Messages
51
Yeah, just unpack it in the /usr/local/directadmin/plugins/, run ./install.sh in the scripts folder and you are good to go. (then add the cron job to crontab offcourse)
 
Last edited:

csgo

Verified User
Joined
Feb 29, 2012
Messages
50
Here's what I got:

Details

load_monitor successfully downloaded
plugin.tar.gz extracted
No install.sh script was found. Script not executed.
Error with install script
 

futurevision

Verified User
Joined
Nov 26, 2008
Messages
51
I've done a small update in the package, try again please. For some reason the install.sh script was packed without the correct permissions.
 

SeLLeRoNe

Super Moderator
Joined
Oct 9, 2004
Messages
6,789
Location
A Coruña, Spain
Something that would required a re-install of it?

there is not update script, so, let me know if i need to reinstall it or what to change :)

Thanks
 

csgo

Verified User
Joined
Feb 29, 2012
Messages
50
Same result:

Details

load_monitor successfully downloaded
plugin.tar.gz extracted
No install.sh script was found. Script not executed.
Error with install script
 

futurevision

Verified User
Joined
Nov 26, 2008
Messages
51
I'll look into it tomorrow if I have time. Can you guys tell me if the install.sh exists and what permissions the file has? That might help me.
 

SeLLeRoNe

Super Moderator
Joined
Oct 9, 2004
Messages
6,789
Location
A Coruña, Spain
In the tar.gz file i had downloaded yeterday i have:

-rwx------ 1 diradmin diradmin 167 3 apr 21:44 install.sh

Regards
 

nobaloney

NoBaloney Internet Svcs - In Memoriam †
Joined
Jun 16, 2003
Messages
26,119
Location
California
I'll be very happy to see this, but will wait until it's verified as working. I use the KDE System Monitor on my local desktops but of course don't run it on my servers.

Jeff
 

SeLLeRoNe

Super Moderator
Joined
Oct 9, 2004
Messages
6,789
Location
A Coruña, Spain
Jeff it is working, is on my server from 12 hours now and is working fine.

Also, i would suggest you munin for have some nice/useful graphs of services.

Best regards
 

futurevision

Verified User
Joined
Nov 26, 2008
Messages
51
Sorry guys, I packed the wrong dir so it didn't extract like it should. For the ones with problems: Delete the current plugin from DA (or wipe the /usr/local/directadmin/plugins/load_monitor/ dir) and retry with url http://future-vision.nl/da/load_monitor.tar.gz and then follow instructions I've posted to install cron job. Have fun.
 

SeLLeRoNe

Super Moderator
Joined
Oct 9, 2004
Messages
6,789
Location
A Coruña, Spain
Ive added a new line in admin/index.php that maybe someone else can be found useful.

7 => '00:00 - 23:59'

and add a "," at the end of

6 => '20:00 - 23:59'

This will let you check a full day graph :)

Regards
 

futurevision

Verified User
Joined
Nov 26, 2008
Messages
51
Good idea, though you mean index.html instead of index.php. Also make the change in details.html or the back button won't function properly.

I've put it into the package also now (moved to array to scripts/bootstrap.php so it's only in 1 place from now on).
 
Top