Copyright © 2015-2024 Mark G. Daniel
Licensed under the Apache License, Version 2.0 (the "License");
https://www.apache.org/licenses/LICENSE-2.0
Software distributed under the License is on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
à 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
Versions of à la mode are available for use with WASD v10.4.0 and later, and should work with all relatively modern browsers. Developed against Chrome, Firefox, MS Edge (10+), and Safari, on macOS (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".
à 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/alamodeopening an in-line monitor, though can be a a bookmarkletopening 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.
|
à la mode is understandably sensitive to the structure of the WASD global section. When this structure changes between versions à la mode at the very least will require rebuilding. The version string of à la mode tracks the version string of the corresponding WASD server. Where code or other major changes require changes in à la mode code the version will be bumped. Otherwise it is forward-compatible, with possible rebuild/link. The "tweak" of the version (third period-delimited character) is the "bugfix" and/or functionality update within the version of WASD it is released against.
à 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 consequence 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.
Is relatively straight-forward.
http://wasd.vsm.com.au/wasd/
$ SET DEFAULT WASD_ROOT:[000000] $ UNZIP <location>:ALAMODEnnn.ZIP $ UNZIP <location>:ALAMODEnnn-<platform>.ZIP
$ SET DEFAULT [SRC.ALAMODE] $ @BUILD_ALAMODE LINK
$ COPY WASD_EXE:ALAMODE.EXE CGI_EXE:
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 ...
$ INSTALL REPLACE CGI-BIN:[000000]ALAMODE.EXE
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).
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.
Display checkboxes can be configured by the request query string (see Usage) with default values configured using the logical name ALAMODE_QUERY as defined on the system executing à la mode. A request keyword overrides any equivalent found in the logical name value. For example the following definition ensures a history display is enabled unless overriden by a request ?history=0. This example also enables the status display.
$ DEFINE /SYSTEM ALAMODE_QUERY "history=1&status=1"
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.
Excessive HTTP statuses may be alerted by defining one or more of the following logical names (these must exist as à la mode initialises).
$ DEFINE /SYSTEM ALAMODE_ALERT_NNN "200=5,304=10,401=15"where more than five 200 status per minute is alerted, more than ten 304s, and more than fifteen 401s.
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)
à la mode may be proctored into existence.
# WASD_CONFIG_GLOBAL [DclScriptProctor] 1 /cgiplus-bin/alamode /cgiplus-bin/alamode
https://en.wikipedia.org/wiki/Geolocation
à la mode provides for a basic free geolocation service for the request host data. To enable use of geolocation define a logical name containing an asterisk for the default service, or the URL for an alternate service (see GEOLOCATE.C in the source directory).
$ DEFINE /SYSTEM ALAMODE_GEOLOCATE "*"
The URI can be to the runtime directory (as above), an absolute URI elsewhere on the site, or a fully qualified URL for a completely independent server.
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 (mid 2017) not all (the major) browsers (Chrome, Edge, Firefox, Opera - not 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","Edge","Firefox","Opera"
Disabling WebSocket adds a little latency and server overhead to some actions, such as per-process display, but does not affect overall functionality.