WSMon
WebSite Server Monitor Applet

Robert B. Denny
Version 0.1 (experimental) 22-Mar-96
Introduction

This applet monitors a remote WebSite server (only), displaying three moving graphs which display:

If you are reading this page from a WebSite powered site, you should begin to see the graphs appearing by now. This document sets the applet to sample every 10 seconds. Normally, you would set this to at least 30 seconds between samples. The full-scale values for each graph are adjustable via applet parameters:
You're viewing this page with a browser that doesn't understand the APPLET tag. You need to upgrade to a Java-enabled browser in order to view this Java applet. Right now, this means Netscape 2.0. Expect more browsers to support Java in the future!

Downloading and Installing

There are three steps to making WSMon available from your site:

  1. Download the package
  2. Unzip it into a web-visible directory, for example /java/
  3. Using a Java compatible browser, fetch the URL http://your.site.name/java/wsmon.html
Customizing

To display the monitor graph within an HTML document, you must insert the <applet> tag and its parameters like this:

<applet code="WSMon.class" width=479 height=92>
	<param name=num_samples     value=16>
	<param name=sample_interval value=10>
	<param name=max_req_rate    value=5>
	<param name=max_byte_rate   value=16384>
	<param name=max_conns       value=20>
<blockquote>
<em>
You're viewing this page with a browser that doesn't understand the APPLET tag.
You need to upgrade to a Java-enabled browser in order to view this Java
applet. Right now, this means Netscape 2.0. Expect more browsers to support
Java in the future!
</em>
</blockquote>
</applet>
The size of this applet is fixed. Maybe some day, I'll change it so its size is variable. For the time being, use the height and width values shown above. The <param...> lines set the applet's parameters. The default values are set for sites with a very high traffic level. You will probably want to set them lower. The parameters are:
num_samples
The number of sample points across each graph. There is not much point in setting this to a value exceeding the number of screen pixels within the width of a graph. The default is 60.
sample_interval
The time, in seconds, between samples. Don't set this too short. Each sample requires completion of an HTTP request to the server. Take into account network delays. Also, the data volume gets updated only on completion of an HTTP request by the server, so you will not see the effects of a large data transfer until it's over. Then it will all show at once. It's best to set the sample interval to at least 30 sec. The default is 30 sec.
max_req_rate
The full-scale value for the requests/sec. graph (default 30)
max_byte_rate
The full-scale value for the KBytes/sec. graph (default 150)
max_conns
The full-scale value for the current connections graph (default 60)
server_host (not shown above)
The DNS host name or IP address of the host to monitor. This is configurable only if the WSMon classes are loaded from a local file path, resulting in the applet being trusted (see below). Defaults to the host from which the applet classes were loaded (in accordance with Java security policy).
The non-applet HTML within the <applet> tag (the stuff in <blockquote> above) will be displayed by non-Java browsers. You can put anything in there you want.

Monitoring Specific Servers

In order to monitor a server or servers other than the one from which the applet classes are loaded, you must load the classes from your local hard disk. By loading classes locally, you inform the Java security monitor that the applet is trusted and may fetch documents from any server host. A detailed explanation of the local Java environment is beyond the scope of this document. There are a few key things you need to know:

Final Notes

Please don't email me with feature enhancement requests. I have a crushing email load as it is. I already have an infinitely long list of things that would be cool to do. Instead, use this app as an opportunity to learn Java and add the feature(s) yourself. I have included the sources. If you modify the graphical layout to be resizable, let me know. This is one feature I really want. I just don't have the time to work on this any more for the time being.


Robert B. Denny