Web Hosting Talk







View Full Version : Hotsanic bandwidth and system graphing


webmazter
09-14-2004, 09:50 AM
How To Install HotSaNIC

(03/25/04)

First, we will need to install or update ImageMagick
From root

wget http://www.imagemagick.net/download/linux/redhat-9.x/i386/ImageMagick-5.5.7-10.i386.rpm
wget http://www.imagemagick.net/download/linux/redhat-9.x/i386/ImageMagick-Magick++-5.5.7-10.i386.rpm
wget http://www.imagemagick.net/download/linux/redhat-9.x/i386/ImageMagick-debuginfo-5.5.7-10.i386.rpm
wget http://www.imagemagick.net/download/linux/redhat-9.x/i386/ImageMagick-devel-5.5.7-10.i386.rpm
wget http://www.imagemagick.net/download/linux/redhat-9.x/i386/ImageMagick-perl-5.5.7-10.i386.rpm

rpm -Uvh *.rpm
rm -f ImageMagick-5.5.6*.rpm

Next, we will need to install RRDtool

wget http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/rrdtool-1.0.46.tar.gz
tar zxvf rrdtool-1.0.46.tar.gz
cd rrdtool-1.0.46
./configure
make
make install
make site-perl-install
cd ..
rm -fr rrdtool-1.0.46*

Now we will install and configure HotSaNIC

cd /usr/local
wget http://umn.dl.sourceforge.net/sourceforge/hotsanic/hotsanic-0.5.0-pre5.tgz
tar zxvf hotsanic-0.5.0-pre5.tgz
rm -f hotsanic-0.5.0-pre5.tgz
cd HotSaNIC
./setup.pl

You will be asked a number of questions during the install script.

Module found: APCUSV

Description:
Records some APC-UPS specific readouts:
- load percentage
- battery percentage
- time left when on battery
- output voltage
- system temperature
- battery voltage
Do you want to use this module? (Y/n) >
Choose 'n'

Module found: APPS

Description:
Records the number of instances of the specified applications.
Do you want to use this module? (Y/n) >
Choose 'y'
Do you want to show this module's graphs on the webpage? (Y/n) >
Choose 'y'

Module found: BIND

Description:
Records statistics from the ISC BIND nameserver
Do you want to use this module? (Y/n) >
Choose 'n'

Module found: DISKIO

Description:
Records I/O statistics for harddisks.
Do you want to use this module? (Y/n) >
Choose 'y'
Do you want to show this module's graphs on the webpage? (Y/n) >
Choose 'y'

Module found: DNET

Description:
Records stats for Distributed.net personal proxies

Do you want to use this module? (Y/n) >
Choose 'n'

Module found: MAILQ

Description:
Records outbound mail status.
Currently supported mail-systems: postfix
Do you want to use this module? (Y/n) >
Choose 'n'

Module found: NETSTAT

Description:
Records network socket-states.
Do you want to use this module? (Y/n) >
Choose 'y'
Do you want to show this module's graphs on the webpage? (Y/n) >
Choose 'y'

Module found: NETWORKS

Description:
Records IP- and protocol-based traffic stats.
ipchains/iptables required!
Do you want to use this module? (Y/n) >
Choose 'n'

Module found: PART

Description:
Records partition usages.
Do you want to use this module? (Y/n) >
Choose 'y'
Do you want to show this module's graphs on the webpage? (Y/n) >
Choose 'y'

Module found: PING

Description:
Records min/avg/max ping-times for configured hosts
Do you want to use this module? (Y/n) >
Choose 'n'

Module found: SENSORS

Description:
Records stats for configured hardware sensors
LM-Sensors required!
Do you want to use this module? (Y/n) >
Choose 'n'

Module found: SHOUTCAST

Description:
Records remote stats for ShotCast servers

Note: The console-webbrowser "lynx" has to
be installed to use this module.
Do you want to use this module? (Y/n) >
Choose 'n'

Module found: SYSTEM

Description:
Records system specific data:
- cpu usage
- irqs
- loadavg
- memory / swap
- # of processes
- uptime
- # of users
Do you want to use this module? (Y/n) >

Choose 'y'
Do you want to show this module's graphs on the webpage? (Y/n) >
Choose 'y'

Module found: TRAFFIC

Description:
Records usage of ethernet devices (input / output)
Do you want to use this module? (Y/n) >
Choose 'y'
Do you want to show this module's graphs on the webpage? (Y/n) >
Choose 'y'

Module found: WORMS

Description:
Records stats for worm-impacts on local webserver
Do you want to use this module? (Y/n) >
Choose 'n'

You are now back at the command prompt. (If it asks you more questions, just accept the default answers.. we are using these settings below....)

-Let's configure HotSaNIC by entering the following.-

cd var/settings
pico main


press [ctrl -w] then type 'binpath' then press [enter]. Find and change this line.

BINPATH="not configured"

change to

BINPATH="/usr/local/rrdtool-1.0.46/bin"

press [ctrl -w] again then type 'webdir' then press [enter]. Find and change this line.

WEBDIR="not configured"

change to

WEBDIR="/var/www/html/HotSaNIC"

press [ctrl -w] again then type 'ctime' then press [enter]. Find and change this line.

CTIME="24"

change to

CTIME="4"

press [ctrl -w] again then type 'convertpath' then press [enter]. Find and change this line.

CONVERTPATH="not configured"

change to

CONVERTPATH="/usr/bin/convert"

Finally, to save and exit press [ctrl -x] Y then [enter]. At the prompt type.

cd /usr/local/HotSaNIC
mkdir /var/www/html/HotSaNIC
./rrdgraph start
./makeindex.pl
./diagrams.pl
./convert.pl

You now have HotSaNIC installed

To view HotSaNIC go to http://yourIPaddress/HotSaNICs/

(it will take a few mins for the graphs to generate data.

Now, Lets set HotSaNIC up so it will start when you reboot your server.

pico /etc/rc.local

Add this line:

/usr/local/HotSaNIC/./rrdgraph start

Then [ctrl -x] Y then [enter] to save

All Done!

one1coolone1
09-22-2004, 03:01 AM
Thanks a lot!

This is very nice, was so simple to install. Had to change a little bit to install on RH9

webmazter
09-22-2004, 03:05 AM
thought it would be well liked thanks for trying it.

one1coolone1
09-30-2004, 04:03 PM
hotsonic is awesome!

webmazter
09-30-2004, 04:06 PM
hotsanic even

terran11355@
10-08-2004, 12:39 PM
Originally posted by webmazter
How To Install HotSaNIC

(03/25/04)

First, we will need to install or update ImageMagick
From root

wget http://www.imagemagick.net/download/linux/redhat-9.x/i386/ImageMagick-5.5.7-10.i386.rpm
wget http://www.imagemagick.net/download/linux/redhat-9.x/i386/ImageMagick-Magick++-5.5.7-10.i386.rpm
wget http://www.imagemagick.net/download/linux/redhat-9.x/i386/ImageMagick-debuginfo-5.5.7-10.i386.rpm
wget http://www.imagemagick.net/download/linux/redhat-9.x/i386/ImageMagick-devel-5.5.7-10.i386.rpm
wget http://www.imagemagick.net/download/linux/redhat-9.x/i386/ImageMagick-perl-5.5.7-10.i386.rpm

rpm -Uvh *.rpm
rm -f ImageMagick-5.5.6*.rpm

Next, we will need to install RRDtool

wget http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/rrdtool-1.0.46.tar.gz
tar zxvf rrdtool-1.0.46.tar.gz
cd rrdtool-1.0.46
./configure
make
make install
make site-perl-install
cd ..
rm -fr rrdtool-1.0.46*

Now we will install and configure HotSaNIC

cd /usr/local
wget http://umn.dl.sourceforge.net/sourceforge/hotsanic/hotsanic-0.5.0-pre5.tgz
tar zxvf hotsanic-0.5.0-pre5.tgz
rm -f hotsanic-0.5.0-pre5.tgz
cd HotSaNIC
./setup.pl

You will be asked a number of questions during the install script.

Module found: APCUSV

Description:
Records some APC-UPS specific readouts:
- load percentage
- battery percentage
- time left when on battery
- output voltage
- system temperature
- battery voltage
Do you want to use this module? (Y/n) >
Choose 'n'

Module found: APPS

Description:
Records the number of instances of the specified applications.
Do you want to use this module? (Y/n) >
Choose 'y'
Do you want to show this module's graphs on the webpage? (Y/n) >
Choose 'y'

Module found: BIND

Description:
Records statistics from the ISC BIND nameserver
Do you want to use this module? (Y/n) >
Choose 'n'

Module found: DISKIO

Description:
Records I/O statistics for harddisks.
Do you want to use this module? (Y/n) >
Choose 'y'
Do you want to show this module's graphs on the webpage? (Y/n) >
Choose 'y'

Module found: DNET

Description:
Records stats for Distributed.net personal proxies

Do you want to use this module? (Y/n) >
Choose 'n'

Module found: MAILQ

Description:
Records outbound mail status.
Currently supported mail-systems: postfix
Do you want to use this module? (Y/n) >
Choose 'n'

Module found: NETSTAT

Description:
Records network socket-states.
Do you want to use this module? (Y/n) >
Choose 'y'
Do you want to show this module's graphs on the webpage? (Y/n) >
Choose 'y'

Module found: NETWORKS

Description:
Records IP- and protocol-based traffic stats.
ipchains/iptables required!
Do you want to use this module? (Y/n) >
Choose 'n'

Module found: PART

Description:
Records partition usages.
Do you want to use this module? (Y/n) >
Choose 'y'
Do you want to show this module's graphs on the webpage? (Y/n) >
Choose 'y'

Module found: PING

Description:
Records min/avg/max ping-times for configured hosts
Do you want to use this module? (Y/n) >
Choose 'n'

Module found: SENSORS

Description:
Records stats for configured hardware sensors
LM-Sensors required!
Do you want to use this module? (Y/n) >
Choose 'n'

Module found: SHOUTCAST

Description:
Records remote stats for ShotCast servers

Note: The console-webbrowser "lynx" has to
be installed to use this module.
Do you want to use this module? (Y/n) >
Choose 'n'

Module found: SYSTEM

Description:
Records system specific data:
- cpu usage
- irqs
- loadavg
- memory / swap
- # of processes
- uptime
- # of users
Do you want to use this module? (Y/n) >

Choose 'y'
Do you want to show this module's graphs on the webpage? (Y/n) >
Choose 'y'

Module found: TRAFFIC

Description:
Records usage of ethernet devices (input / output)
Do you want to use this module? (Y/n) >
Choose 'y'
Do you want to show this module's graphs on the webpage? (Y/n) >
Choose 'y'

Module found: WORMS

Description:
Records stats for worm-impacts on local webserver
Do you want to use this module? (Y/n) >
Choose 'n'

You are now back at the command prompt. (If it asks you more questions, just accept the default answers.. we are using these settings below....)

-Let's configure HotSaNIC by entering the following.-

cd var/settings
pico main


press [ctrl -w] then type 'binpath' then press [enter]. Find and change this line.

BINPATH="not configured"

change to

BINPATH="/usr/local/rrdtool-1.0.46/bin"

press [ctrl -w] again then type 'webdir' then press [enter]. Find and change this line.

WEBDIR="not configured"

change to

WEBDIR="/var/www/html/HotSaNIC"

press [ctrl -w] again then type 'ctime' then press [enter]. Find and change this line.

CTIME="24"

change to

CTIME="4"

press [ctrl -w] again then type 'convertpath' then press [enter]. Find and change this line.

CONVERTPATH="not configured"

change to

CONVERTPATH="/usr/bin/convert"

Finally, to save and exit press [ctrl -x] Y then [enter]. At the prompt type.

cd /usr/local/HotSaNIC
mkdir /var/www/html/HotSaNIC
./rrdgraph start
./makeindex.pl
./diagrams.pl
./convert.pl

You now have HotSaNIC installed

To view HotSaNIC go to http://yourIPaddress/HotSaNICs/

(it will take a few mins for the graphs to generate data.

Now, Lets set HotSaNIC up so it will start when you reboot your server.

pico /etc/rc.local

Add this line:

/usr/local/HotSaNIC/./rrdgraph start

Then [ctrl -x] Y then [enter] to save

All Done!



After I installed it and point to http://ipaddress/HotSaNICs/

Nothing happened? why?


Thanks

sean

webmazter
10-08-2004, 03:29 PM
http://ipaddress/HotSaNIC/

terran11355@
10-08-2004, 06:36 PM
Originally posted by webmazter
http://ipaddress/HotSaNIC/


Thanks

I found the problem from my hosting company.

If you choose the webdir /var/www/html/HotSaNIC

For me /var/www/html/HotSaNIC ( /usr/local/HotSaNIC ) does't equal to http://ipaddress/HotSaNIC

copied to /usr/local/apache/htdocs/HotSaNIC

works!


sean

webmazter
10-08-2004, 06:49 PM
glad to hear it sean iv heard many good things from this thread.
says it really shows lots of stats and its more then they could of wanted its really a good program and nothing ever breaks once its running.
here is one of mine with just a few modules.
http://blackspot.piratehosting.net/HotSaNIC/

terran11355@
10-08-2004, 07:14 PM
Originally posted by webmazter
glad to hear it sean iv heard many good things from this thread.
says it really shows lots of stats and its more then they could of wanted its really a good program and nothing ever breaks once its running.
here is one of mine with just a few modules.
http://blackspot.piratehosting.net/HotSaNIC/


Hi webmazter,

it is good program,


BTW, what is the best way of uninstalling this script since i want to install again by myself?

just delete the whole folder? or something i need to do


Thanks

sean

webmazter
10-08-2004, 07:34 PM
/usr/local/HotSaNIC/./rrdgraph stop
then remove the html and program file folder

WFWH
10-22-2004, 03:36 AM
This is not showing up at all for me? anyhelp? I did all the install files and such, but when i try the page will not show up :-/

webmazter
10-22-2004, 04:01 AM
cd /var/www/html/HotSaNIC
ls
do you see files?

WFWH
10-22-2004, 11:12 AM
sorry I was looking at the wrong ip :-p got it :-D

WFWH
10-24-2004, 04:26 AM
ok maybe this is always like this, but seems to be eating alot of cpu resources.... Here is what i have under CPU/Memory/MySQL Usage in WHM


User %CPU %MEM Mysql Processes

root 9.32 6.16 2.0
Top Process %CPU 58.0 perl ./diagrams.pl
Top Process %CPU 36.7 gzip
Top Process %CPU 12.9 gzip

So looks like perl ./diagrams.pl is taking up 58%

So is this like this for everyone? how do i fix this?

Thanks

hookgr
12-10-2004, 08:25 AM
I RECOMMEND FOR THOSE THAT IT DOESNT WORK AT THIS WEBDIR, NOT TO CHANGE ANYTHING ON ABOVE INSTALLATION !!!

JUST RUN THIS AFTER ALL ABOVE SETUP:

ln -s /var/www/html/HotSaNIC stats

AND THEN YOU WILL ACCESS THE STATS AS:

HTTP://IP-ADDRESS/stats/

that's all folks !!!

perldrops
12-21-2004, 12:08 PM
Good walkthrough...I've been looking for something like this!

webmazter
12-31-2004, 05:44 PM
1,034 views so far, looks like this tut is popular thanks guys i really enjoy the responses

hookgr
12-31-2004, 07:24 PM
I RECOMMEND FOR THOSE THAT IT DOESNT WORK AT THIS WEBDIR, NOT TO CHANGE ANYTHING ON ABOVE INSTALLATION !!!

JUST RUN THIS* AFTER ALL ABOVE SETUP:

ln -s /var/www/html/HotSaNIC stats

*
(command should be run in the default webdir of apache...
***this should be: /usr/local/apache/htdocs/
in most default cpanel installations...)

AND THEN YOU WILL ACCESS THE STATS AS:

HTTP://IP-ADDRESS/stats/

that's all folks !!!

Sorry for double posting...
edit is not allowed!

yourmail
01-24-2005, 03:47 AM
This didnt worked in CentOS 3.3 / CPanel...

Can you plz tell me what changes do apply for CentOS ???

webmazter
01-24-2005, 09:46 AM
Read the post above yours here by "hookgr"

yourmail
01-24-2005, 09:38 PM
i mean the installation just failed...

i mean everything accomplished, but some images are broken !!!

what should i do ???

how i do remove everything done in this tutor. and start over ???


why some images are broken ?

webmazter
01-24-2005, 09:43 PM
rerun the execute commands again at the end of the tutorial they will become complete images.
./rrdgraph start
./makeindex.pl
./diagrams.pl
./convert.pl


Just remove the hotsanic dir and its removed.

yourmail
01-24-2005, 10:42 PM
i did it more than 3 times...

no way to work,,,

any success froma CentOS user ???

webmazter
01-24-2005, 10:49 PM
i have 2 centos no problems at all.

yourmail
01-24-2005, 11:27 PM
why the images are corrupt to me ?

webmazter
01-24-2005, 11:28 PM
because you didnt rerun the last steps again.

yourmail
01-24-2005, 11:45 PM
also,if someone changes hardware, for example,he adds hdd, how he renews the hotsanic ???

webmazter
01-24-2005, 11:49 PM
rerun setup.pl
and the final steps

yourmail
01-25-2005, 12:09 AM
i did as you said, corrupt images got fixed,

also,i have now hdb, and the 3 hda parts i had, now are 2...

i rerunned ./setup.pl, and then last 4 final steps again,
but disks dont seem up to get fixed !!!

i see the old 3 parts of hda, the third that doesnt exist is just shown as total green, and no of hdb...

also,i had 10 ip for eth traffic monitoring...

now i have 14...

the next 4 ips/eth's didnt got included after rerun ....

what to do ???

yourmail
01-25-2005, 05:00 PM
?????????????????????????????????????????????????

F7IntrnetSlutions
03-12-2005, 11:27 PM
error: Failed dependencies:
libMagick.so.5 is needed by ImageMagick-perl-5.5.7-10


I get that when I do the first command.

webmazter
03-12-2005, 11:30 PM
thats been happening alot.
ive redone one system without the perl rpm and it works without it.
you can goto the next step

webmazter
03-12-2005, 11:32 PM
yourmail
only eth:0 gets graphed on servers with one nic card.
i am unsure about harddrives i dont use that myself.

F7IntrnetSlutions
03-13-2005, 01:44 AM
not sure who you were referencing to, but I tried to go onto step 2 after downloading the wget stuff and nothing. Would there be a reason I am getting that error?

webmazter
03-13-2005, 01:50 AM
you should skip the ImageMagick-perl-5.5.7-10
install the others.
some will give errors just redo them after u get the rest to fit.

F7IntrnetSlutions
03-13-2005, 03:08 AM
http://67.18.207.42/stats/

can not get my images to show. What issues woulc cause this? I did what you said and did the last steps in the process and nothing still. Guessing I did something some where

webmazter
03-13-2005, 03:14 AM
email me your config file var/settings/main
send this file to webmazter@gmail.com
i will check it for you.

F7IntrnetSlutions
03-13-2005, 03:22 AM
Originally posted by webmazter
cd /var/www/html/HotSaNIC
ls
do you see files?

root@***** [/var/www/html/HotSaNIC]# dir
./ apps/ HotSaNIC.gif netstat/ rrdtool.gif traffic/
../ diskio/ index.html part/ system/


that is all the files I have in that area. I think I am missing pictures or something, but I just have red x's.

webmazter
03-13-2005, 03:27 AM
thats what i assumed.
i see your paths are changed from your url.
you should check those over with what your main file is configured for.

F7IntrnetSlutions
03-13-2005, 03:35 AM
ok sorry you confused me there? what should I do? (I apologize if I am not getting this)

webmazter
03-13-2005, 03:41 AM
easiest way is email your main file and ill check it for you.

F7IntrnetSlutions
03-13-2005, 03:43 AM
web can you tell me how to do this?

I am eager to do this, just dont know how ;)

webmazter
03-13-2005, 03:45 AM
either your not readin my replys or your avoiding them.
check your paths or email your main file.

F7IntrnetSlutions
03-13-2005, 03:45 AM
no I am asking how can I email you the file? how can I take the file to my desktop in order to email you

F7IntrnetSlutions
03-13-2005, 04:10 AM
I want to email you the file, but I do not know how to take the file from SSH and send it to you. So I am stuck :( again I apologize, I am reading what you are writing.

webmazter
03-13-2005, 04:16 AM
ill send u a pm

Sillysoft
03-14-2005, 12:28 PM
How do I activate what apps I want to show in Hotsanic if I didnt select that app during initial install?

Thanks
Silly

fancy claps
06-01-2005, 04:36 AM
i just tried installing this and everything is working except the images aren't working.

the problem is when running the diagrams.pl, i get errors like this for each module:

----- modules/system -----
Can't locate RRDs.pm in @INC (@INC contains: ../../lib /usr/lib/perl5/5.8.6/i686-linux /usr/lib/perl5/5.8.6 /usr/lib/perl5/site_perl/5.8.6/i686-linux /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl .) at ./diagrams.pl line 9.
BEGIN failed--compilation aborted at ./diagrams.pl line 9 (#1)
(F) You said to do (or require, or use) a file that couldn't be
found. Perl looks for the file in all the locations mentioned in @INC,
unless the file name included the full path to the file. Perhaps you
need to set the PERL5LIB or PERL5OPT environment variable to say where
the extra library is, or maybe the script needs to add the library name
to @INC. Or maybe you just misspelled the name of the file. See
perlfunc/require and lib.

Uncaught exception from user code:
Can't locate RRDs.pm in @INC (@INC contains: ../../lib /usr/lib/perl5/5.8.6/i686-linux /usr/lib/perl5/5.8.6 /usr/lib/perl5/site_perl/5.8.6/i686-linux /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl .) at ./diagrams.pl line 9.
BEGIN failed--compilation aborted at ./diagrams.pl line 9.
at ./diagrams.pl line 9


so obviously it's something with PERL but how do i fix this? im running centos 3.4/cpanel.

webmazter
07-10-2005, 04:16 AM
sorry never seen that error before.
must be server specific.

jamesyeeoc
07-10-2005, 11:46 AM
skyler.insler - The RRDs.pm file is part of the RRDTool package. If you don't already have it installed, then you will need to download and install it. Their home page is at:

http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/

----- modules/system -----
Can't locate RRDs.pm in @INC

Looks like you skipped the step just after the ImageMagick install:

Next, we will need to install RRDtool (see very first post)