à la mode

Version 1.0.1, 11th April 2015

Copyright © 2015 Mark G. Daniel
This program, comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it under the
conditions of the GNU GENERAL PUBLIC LICENSE, version 3, or any later version.
http://www.gnu.org/licenses/gpl.txt

Contents




à la mode  (pronounced "ah-la-mode")  is a browser-based WASD Web server monitor with a sufficiently small resource footprint** not to impact server or system performance. à la mode is intended as a general tool for server behaviour and throughput observation, not for request or behaviour analysis. That is the purpose of tools such as WATCH. While à la mode can be used for checking counters and request activity on sites with any level of traffic, the graphs are more impressive when observing medium to busy sites. ** YMMV with platform and selected items but on an AlphaServer DS20E and HP rx2660 significantly less than 0.001 of a CPU.

à la mode provides textual and graphical data showing

à la mode is available for use with WASD v10.4.0 and later, and should work with all relatively modern browsers. Developed against Chrome, Firefox, MSIE (10+), and Safari, on OS X and Windows platforms, it uses HTML5 elements including SVG for graphing and will not work with the HTML4 generation of browsers.

Etymology:  WASD has produced a Spanish sounding application (Monitor de Sistema), so why not one with a French flavour? Although rather than meaning "fashionable" (which cannot be said of VMS or WASD), this application's name is intended to be reminscent of the North American usage, "on the top or side of" (in the sense that it's not an integral part of the WASD package). Not being much of a dessert person I might even prefer the cookery usage of "meats braised with vegetables in wine" but that's too much of a stretch :-)  Whatever the force-fit it seemed less prosaic than "WASDmon".

Usage

à la mode is activated by accessing the URL for its script location. This is usually something like (and may well open à la mode on this system)
http://the.site.name/cgiplus-bin/alamode
opening an in-line monitor, though can be a
a bookmarklet
opening a stand-alone window.

à la mode opens displaying the textual system and server information at the top left and system resource and server instantaneous utilisation bar graphs at the top right, seen on the image below. Basic system resources monitored are CPU, buffered I/O, disk (FCP) and network interface (NI), while server utilisation metrics include per-second file, script, proxy, WebDAV, and other requests, current number of connections and of those processing, responses OK (e.g. 200s) and not OK (e.g. 500s). Checkboxes below the system information allow various aspects to be toggled on/off. Sections open revealing additional information, and close hiding that information again. Values in graphs are adjusted to meaningful units, and maxima, if not fixed, represent values of the last five, or fifteen, minutes. Checkboxes activate the described functionality. Server directives (/DO=) will be displayed in blue and alerts in red immediately below the block of textual information, and can be cleared by clicking over them. Alerts include server (re)starts, script hard limits being reached, excessive 403 and 5nn responses, and other messages. Tooltips are provided for all major elements of the report.

 (left) Adjacent to the node name, the checkbox minimises the per-node display. When unchecked, the node name, host name, VMS time, processing synopsis, and any recent alert, are displayed in place of the full display.
Click and hold to enlarge ... or ... alamode.png

(Safari 8 on OS X, showing standalone à la mode)

disables data collection, closing the connection to the data source script.
disables data update but continues to collect and store data. Pausing the update allows a specific report to be examined without disturbance. Re-checking the box updates the display from the point it was disabled.
disable in the case of excessive alerting.
disable pop-up tooltips.
opens the line graphs seen at the lower half of the image. These provide five, or fifteen, minute summaries of the instantaneous system data shown in the bar graphs. Appropriate graphs contain an average. Some display a ↷ character following the label indicating additional or alternate data may be displayed by clicking on the graph.

expands data collection and the history graphs from 5 to 15 minutes. The complementary checkbox returns to a 5 minute history display but continues to collect over 15 minutes.
displays tabular data showing counts and percentages of total for all HTTP methods (e.g. GET, HEAD) and major server processing modules (e.g. DCL, Proxy).
display the server processes (and multiple instances if used) bar graphs showing process status and quota usage.
display additional tabular data on DCL and DECnet scripting, as well as history graphs for DECnet scripting, DCL process creation and deletion, and CGIplus/RTE (persistent-process) scripting.
displays tabular proxy processing data.
provides the last request's essential data including time, status, network totals, duration, client IP and domain name, service connected to and request made.
displays tabular WebDAV processing data.
deletes all current and stored data
invoke system print dialogue for this monitor
  (top left) The unlabeled checkbox located in the top-left of the monitor displays a section allowing the URLs for multiple à la mode sites (one per line) to be configured into a single display. Do not try to mix http:// and https:// specifications in any combination; browsers often block content with mixed security domains. Note that MonDeSi and à la mode URLs can be combined on the one display in either application, as well as DCLinabox terminal URLs.
activates à la mode in the same window
activates à la mode in a new, independent window. This window is sized precisely for the display and so resembles more a standalone application than a web page.
JavaScript link for a standalone à la mode suitable for embedding as an anchor or usefully, as a bookmarklet for addition to a browser's bookmarks/favorites
the input elements of the configuration page
invoke system print dialogue for entire browser window

Comment

à la mode in understandably sensitive to the structure of the WASD global section. When this structure changes between versions à la mode at the very least will required rebuilding.

à la mode does not lock the global section when reading values. This introduces the possibility of inconsistent resultant data. Atomic reads are OK (e.g. a longword or quadword (on non-VAX). Data with relationships (e.g. peak processing and current processing count) with processing potentially occuring between the individual reads are an example. Another is the URI of the latest request data (read character by character and therefore subject to overwriting during the copy). Rather than introduce the expense of a lock to mitigate the risk (and potentially introducing unnecessary waits into server performance), for an observational application such as this it is considered an acceptable tradeoff.

à la mode accesses the WASD global lock environment used to coordinate and control WASD instances within a single system and across a cluster. As a consequnce of participating in the control lock environment directives sent to the WASD envionment will report additional "instances" being notified.

$ httpd/do=map
%HTTPD-I-DO, 2 instances notified; KLAATU::WASD:80-70, KLAATU::WASD:80

The "instances" relating to à la mode and those to servers should easily be differentiated by process name.

Installation

Is relatively straight-forward.

Update

An update follows the above installation steps, generally without the need to configure the application or modify the startup procedures (though check the release notes for any modification requirements). Instead ...

And remember that the more recent JavaScript will need to be (re)loaded into browsers (perhaps requiring browser cache clearing) and that a WASD CGIplus/WebSocket application will require any currently instantiated processes flushed with $ HTTPD/DO=DCL=DELETE (caution! - peremptorily removes all script processes).

Configuration

WebSocket access requires CGIplus. The script internally ensures this for the standard script activation path but this can also be implemented using a mapping rule.

redirect /cgi-bin/alamode* ///cgiplus-bin/alamode*
...
exec+ /cgiplus-bin/* /cgi-bin/*

Other à la mode configuration items are set using logical names.

Network Devices are automatically scanned for by à la mode, with any found used for NI statistics. If the system admin wishes to tailor the source of the statistics the multi-valued logical name ALAMODE_NI can be used to specify one or more network interfaces. Define this logical name system-wide (or in a script wrapper procedure) as required.

$ DEFINE /SYSTEM ALAMODE_NI EWA0:,EWB0:

This logical name must exist as à la mode initialises. If undefined or the specified device(s) cannot be accessed the NI datum is greyed-out.

The utility must be INSTALLed with required privileges. Concurrrent access to Network Interface (NI) data requires SHARE privilege, required if multiple utilities or instances of a utility are accessing the NI devices. SYSLCK is rquired for access to the server locks; SYSPRV for access to global sections data; and WORLD is required to access the instance (server process) data.

$ INSTALL ADD CGI-BIN:[000000]ALAMODE.EXE /PRIV=(SHARE,SYSLCK,SYSPRV,WORLD)

Access Control

As à la mode provides some insight into a server's processing and request detail the application insists on authorisation. It is suggested to place the script executable under the same access control as the server administration menu. For example:

["VMS credentials"=WASD_VMS_RW=id]
/httpd/-/admin/* r+w,https:
/cgi*-bin/alamode* read,https:

At the very least, providing general access to a specified client address range:

[WORLD]
/cgi*-bin/alamode* read,192.168.1.0/24,https:

If the username is WORLD then authenticated requests have the username and request URI display obfuscated (i.e. *********** out).

At the time of writing (early 2015) not all browsers (Chrome, Firefox and MSIE - not Opera or Safari) implement HTTP authorisation over WebSocket. WASD users employing WebSocket and authorisation are currently required to disable WebSocket for any other than these!

To disable WebSocket for all but selected user-agents define a multi-valued logical name with zero followed by values containing unique strings found in capable user-agent strings.

$ DEFINE /SYSTEM ALAMODE_WEBSOCKET 0,"Chrome","Firefox","MSIE"

Disabling WebSocket adds a little latency and server overhead to some actions, such as per-process display, but does not affect overall functionality.

Problems?

Releases

v1.0.1  11-APR-2015
•  workaround; establish server BYTLM from SYSUAF (per JPP)
•  bugfix; proxy graph data without Proxy[x]
•  bugfix; alamUsedBar() WSET calculation
•  bugfix; sys$gettim_prec defined beginning IA64 V8.4 breaking compile on earlier VMS (per JPP)
v1.0.0  05-APR-2015
•  initial

Acknowlegements