About Install Download FAQ |
1. INSTALL Run "make" at first, you can find the "hwmonitor" and "hwclient" bin files. Copy the floowing file to your prefix path: hwmonitor hwclient hwmonitor.conf hwclient.conf For example, I copy these into "/server/hwmonitor".
2. MAKE A HWMONITOR DAEMON (How can I run a predefine command remotely)
(FORMAT: <predefine-command> = <real command line>) hw_date = date
/server/hwmonitor/hwmonitor /server/hwmonitor/hwmonitor.conf For example, run predefine command "hw_date" (real command is 'date') and get the date info from remote server: root@game:~# telnet 172.16.1.210 1000 Trying 172.16.1.210... Connected to 172.16.1.210. Escape character is '^]'. hw_date Thu Feb 23 11:10:57 HKT 2012 Connection closed by foreign host. root@game:~#Line "Thu Feb 23 11:10:57 HKT 2012" is the output. I use this function to confirm each server time is sync (Write a shell or PHP/ruby/perl/etc. command to connect to each hwmonitor listen_ip/port, get the info and show me at once. read FAQ document for the detail.)
3. MAKE A HWCLIENT DAEMON (How can I get the server load average and IO idle value into a text file. How can I use "hwclient" ) I just wont to know each server information at first, and, "Can I use hwmonitor to know each remote-server worked fine? I'm not 24 hours online, let it do something, use a simple client to get server load average' each 60 seconds and write the info into a text file ...", so "hwclient" to appear. "hwclient" is a extend function, get remote-server load average (from "top" command output) and IO idle (from "iostat" command output) each 60 seconds. It connect to multi remote-server(define servers into the hwclient.conf [monitor_server] group) and write the information to different file. -- * hwclient depend on 'sed' and 'iostat' command, confirm these commands exist. * --
root@game:~# telnet 172.16.1.210 1000 Trying 172.16.1.210... Connected to 172.16.1.210. Escape character is '^]'. hw_average 0.00,0.10,0.07,1,94.31,2012-02-23,11:54:43 Connection closed by foreign host. root@game:~#Output info like: "0.00,0.10,0.07,1,94.31,2012-02-23,11:54:43"if the string like: "0.00,0.10,0.07,1,,2012-02-23,11:54:43" (The five value empty)check the "iostat" command exist (include in 'sysstat' package).
server = web1, 172.16.1.210, 1000, hw_average
o. Run "
hwgraphic is hwmonitor [http://hwmonitor.sf.net] extend module and use to show the server load-average/IO idle chart, it writen
in PHP.
o. Copy hwgraphic_PHP/* into you webroot. modify the config.php:
o. Visit http://hwgraphic-install-url/list.php
|
||||
-- Go Top -- |