This page looks plain and unstyled because you're using a non-standard compliant browser. To see it in its best form, please upgrade to a browser that supports web standards. It's free and painless.

Blog About Dedicated Servers

« | »

Install HotSaNIC (updated)

Luigi Ramone | 15 December, 2005 20:26

HotSaNIC is a very nice tool which combines all sorts of very important system graphs into a simple and easy to understand webpage. It allows the admin to take a quick glance at the graphs to see what may or may not be working with the system. With the new APPS graph it is also possible to watch as more processes are started which can be helpful in tracking down why the server load is increasing. For instance if you see a huge load spike but you see that the number of exim processes has gone up significantly at the same time you can start to investigate.


First, we will need to install RRDtool


-----command-----
cd /usr/local/src/
wget http://people.ee.ethz.ch/~oetiker/w.../rrdtool.tar.gz
tar -zxf rrdtool.tar.gz
cd rrdtool*
./configure
make
make install
make site-perl-install
cd ..
rm -fr rrdtool*

-----command-----

Now we will install and configure HotSaNIC

-----command-----
cd /usr/local
wget http://internap.dl.sourceforge.net/...-0.5.0-pre5.tgz
tar -zxf hotsanic-0.5.0-pre5.tgz
rm -rf hotsanic-0.5.0-pre5.tgz
cd HotSaNIC
./setup.pl

-----command-----

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

Module found: APCUSV Do you want to use this module?
Choose 'n'

Module found: APPS Do you want to use this module?
Choose 'y'

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

Module found: BIND Do you want to use this module?
Choose 'n'

Module found: DISKIO Do you want to use this module?
Choose 'y'

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

Module found: DNET Do you want to use this module?
Choose 'n'

Module found: MAILQ Do you want to use this module?
Choose 'n' (they only support postfix right now)

Module found: NETSTAT Do you want to use this module?
Choose 'n'

Module found: NETWORKS Do you want to use this module?
Choose 'n'

Module found: PART Do you want to use this module?
Choose 'y'

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

Module found: SENSORS Do you want to use this module?
Choose 'n'

Module found: SHOUTCAST' Do you want to use this module?
Choose 'n'

Module found: SYSTEM Do you want to use this module?
Choose 'y'

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

Module found: TRAFFIC Do you want to use this module?
Choose 'y'

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

Module found: WORMS Do you want to use this module?
Choose 'n'

Found: eth0 - (y)es or (n)o
Choose 'y' (If you are prompted for any other interfaces starting with 'eth0' choose 'n')

Found: lo - (y)es or (n)o
Choose 'n'

0 /usr/local/cpanel/bin/rrdtoolinstall
1 /usr/local/cpanel/bin/rrdtoolcheck
2 /usr/local/cpanel/3rdparty/bin
by just pressing ŽENTERŽ, item "0" will be selected.
select item 0 ... 2? >

Select 0, we are going to change this below anyways.


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....)

Now we are going to start the manual configuration of hotsanic.

-----command-----
cd /usr/local/HotSaNIC/var/settings
pico -w main
-----command-----

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.49/bin"

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

WEBDIR="not configured"

change to

WEBDIR="/home/username/public_html/stats/"
Note you are going to put this to someplace that is acessible to the internet. I would recommend setting it to a subdomain or a directory within a domain.

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. If may already be changed, if so do not worry.

CONVERTPATH="not configured"

change to

CONVERTPATH="/usr/bin/convert"

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

pico mod_traffic

Find and change this line:

SWAPIO="no"

change to

SWAPIO="yes"

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

pico -w mod_system

Go to the bottom and where you see all the IRQ= lines that are not commented out simply delete them.

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


-----command-----
cat /proc/stat |grep disk_io
-----command-----

It is going to report something like this

disk_io: (8,0)14081770,10200468,182341484,3881302,1004096 78) (8,1)703,442,15844,261,3586)

Edit the disk_io config file

-----command-----
pico -w mod_diskio
-----command-----

At the bottom add:

DEV=8_0,sda
DEV=8_1,sda

If your system has something other then the (8,0) and (8,1) as listed above make sure to put that in the config above. Again, to save and exit press [ctrl -x] Y then [enter]. At the prompt type.

-----command-----
pico -w mod_apps
-----command-----

This mod is going to allow you to track how many of a given service is running. I would say that apache, mysql, and email are the most important. Note that exim is what cPanel uses, if you are using ensim replace it with sendmail. Add the following to the bottom:

APP=httpd,Apache
APP=mysqld,Mysql
APP=exim,Exim

Again, to save and exit press [ctrl -x] Y then [enter]. Note that below when you make the directory it needs to be what you put in the configuration file above. At the prompt type.


-----command-----
cd /usr/local/HotSaNIC
mkdir /home/username/public_html/stats
./rrdgraph start
./makeindex.pl
./diagrams.pl
./convert.pl
-----command-----

You now have HotSaNIC installed

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

(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.

-----command-----
pico /etc/rc.local
-----command-----

Add this line:

/usr/local/HotSaNIC/./rrdgraph start

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

Credits: John W

Add comment

Topic

Text

Your name

Your email address (if any)

Your personal page (if any)


authimage




Powered by Boonic, Bloogo & pLog
This Blog does not have any affiliation nor relation with the mentioned companies. All the logotipos, trade names and images are property of the companies that registered them.