|
Example is realized on Perl script. Operation of this script is tested in OS SuSE Linux, however they
should operate in any other Unix like OS. Interface with the controller is allocated in special module TeleServ.pm.
You should copy this file in any directory and you should define environment variable PERLLIB. The easiest way is
to add to the file /etc/profile the following string:
PERLLIB=”the name of your directory”
export PERLLIB
You can indicate directory where modules would be searched in the script adding at the beginning of the script the
following directive:
use libs “the name of your directory”
This way is more preferable because the script is run as a CGI program under web server Apache.
Information about current values of fan rotation speed, values of voltage and temperature of remote host could be
obtained in your computer browser window. To get it, both web server and script monitoring.cgi that provides such
service should be installed and run. This script is tested with installed web server Apache on controlled (remote)
host. Execution of CGI programs should be enabled in Apachе settings (refer to documentation of web server for
instructions). Script monitoring.cgi should be copied to controlled host in directory where CGI program are located.
To test it you can run web browser and enter local URL of script in the address string, for example:
http://127.0.0.1/cgi-bin/monitoring
The following page with table should appear:
If the host is connected to the net, URL of script should be entered in the address string of your browser.
Then you can watch the same page. The script updates information on the screen of browser automatically.
|
|
|