Robert B. Denny
WebSite Server Monitor Applet
Version 0.2 (experimental) 03-May-96
WebSite 1.1e or later, WebSite Pro Preview (beta C) or later
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:
- number of requests per second
- response data volume in KBytes/sec
- number of current connections
Downloading and Installing
There are three steps to making WSMon available from your site:
- Download the
- Unzip it into a web-visible directory, for example /java/
- Using a Java compatible browser, fetch the URL
To display the monitor graph within an HTML document, you must insert
the <applet> tag and its parameters like this:
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
<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>
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!
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.
- 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.
- 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.
- The full-scale value for the requests/sec. graph (default 30)
- The full-scale value for the KBytes/sec. graph (default 150)
- 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
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).
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
- The <applet> tag must specify
codebase=... that has a local file path in it.
- You must have the Java Developer's Kit 1.0 or later installed, and
your CLASSPATH environment variable appropriately configured.
The foundation class package that comes with the Netscape Navigator 2.0
browser appears to have the trusted applet feature of the security
- You can embed several copies of the applet in a single HTML
document, providing you with a view of the activity on several servers
- If you do have the JDK, you can use the applet viewer to display
stats on one or more servers without the overhead of running a
full-blown browser. The applet viewer is quite lightweight.
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