/*****************************************************************************/ /* tips.js Tooltips, includes both the tooltip code and the tip text. COPYRIGHT --------- Copyright (C) 2014-2023 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 VERSION ------- 24-APR-2014 MGD initial */ /*****************************************************************************/ var mdsi_ToolTipDisabled = false, // set to true to disable tooltips mdsi_ToolTipDelay = 800, // mSecs mdsi_ToolTipOutDelay = 200; // mSecs ////////// // TIPS // ////////// function mdsiToolTipInit () { if (mdsi_ToolTipDisabled) return; if (mdsi_ToolTipArray.length) return; ///////////// // control // ///////////// mdsiToolTipAdd('controlCollect','Collect server data.'); mdsiToolTipAdd('controlUpdate', 'Update displayed data. Deselecting this option allows the displayed data \ to be examined without change while maintaining collection for update \ when reselected.'); mdsiToolTipAdd('controlHistory', 'Display activity history (line) graphs, 5 minutes by default, \ 15 minutes selectable.'); mdsiToolTipAdd('controlHeight2', 'Double the height of the history graphs.'); mdsiToolTipAdd('controlMinutes', 'Store and display 5 (default) or 15 minutes of activity data.'); mdsiToolTipAdd('controlAlerts', 'Display alerts. Normally enabled but can be disabled if overloaded.'); mdsiToolTipAdd('controlTips', 'These  things.'); mdsiToolTipAdd('controlCluster', 'Display cluster statistics for clustered nodes. \ Disabled if a standalone node.'); mdsiToolTipAdd('controlModes', 'Display CPU modes instead of combined CPU usage.'); mdsiToolTipAdd('controlDisk', 'Display configured disk IOPS and usage statistics. \ May be disabled depending on site configuration.'); mdsiToolTipAdd('controlDiskDelta', 'Display a separate free space delta history graph below the IOPS graph.'); mdsiToolTipAdd('controlOpcom', 'Display recent OPCOM messages. \

May be disabled depending on site configuration.'); mdsiToolTipAdd('controlAudit', 'Include AUDIT$SERVER messages. \

For example, login failure. \

May be disabled depending on site configuration.'); mdsiToolTipAdd('controlProcess', 'Display top process(es) for CPU, S+E+K (non-USER modes), page faults, \ buffered and direct IO.

May be disabled depending on site configuration.'); mdsiToolTipAdd('controlDiskQlen', 'Display a separate IOP queue length history graph below the IOPS graph.'); mdsiToolTipAdd('cpuModesData', 'Current CPU utilisation per mode, \ with colour-coded key for history line graph. \ Values are percentage of all available CPUs.'); //////////// // graphs // //////////// mdsiToolTipAdd('bar', 'Bar graphs display maximum, instantaneous and \ average values (as applicable) for each collected datum. The history of \ these values is displayed in line graphs opened using the History \ checkbox.'); mdsiToolTipAdd('cpuHist', 'CPU utilisation \ total displayed in green and non-user (Supervisor + \ Executive + Kernel) in red. \ Values are percentage of all available CPUs.'); mdsiToolTipAdd('cpuModesHist', 'CPU utilisation \ as kernel, executive, supervisor, user, interrupt and multi-processor \ synchronisation modes. \ Values are percentage of all available CPUs.'); mdsiToolTipAdd('memHist', 'Physical memory (RAM) \ utilisation displayed in green. \

Clicking displays page file utilisation.
'); mdsiToolTipAdd('pgflHist', 'Page file utilisation displayed in green. \
Clicking returns to physical memory.
'); mdsiToolTipAdd('fltsHist', 'Page faults total displayed in green. \ Hard faults in red.'); mdsiToolTipAdd('bioHist', 'Buffered IOs per second.'); mdsiToolTipAdd('dioHist', 'Direct IOs per second.'); mdsiToolTipAdd('lockHist', 'Lock activity total displayed in green. \ Lock waits in red.'); mdsiToolTipAdd('netHist', 'Network utilisation in bytes per second. \ Total (rx plus tx) displayed in green. Rx displayed in blue. \ Non-zero device error counts are displayed. \
Clicking displays mean datagram size.
'); mdsiToolTipAdd('netDgramHist', 'Network datagrams average size \ (total bytes during the interval divided by the number of datagrams). \ Transmitted displayed in green, received in blue. \
Clicking returns to network utilisation.
'); mdsiToolTipAdd('diskHist', 'Disk IOPS (Input/Output operations per second) \ with total (FCP reads plus writes) displayed in green. \ Writes displayed in red.'); mdsiToolTipAdd('procHist', 'Process counts. Total displayed in green. \ Interactive processes in blue.'); mdsiToolTipAdd('scsmsgHist', 'Cluster SCS messages per second. \ Total (sent and received) displayed in green. Messages sent in blue.'); mdsiToolTipAdd('scskbHist', 'Cluster kilobyte map rate. \
Analogue to:
MONITOR> SCS /ITEM=(KB_MAP)
'); mdsiToolTipAdd('mscpHist', 'Cluster MSCP requests per second. \ Total (read + write) displayed in green. Write requests in blue.'); ///////////// // process // ///////////// mdsiToolTipAdd('procStates', 'Display process state counts and top five \ consumers of CPU, S+E+K (non-USER modes), page faults, buffered and direct \ IO. VAX does not support S+E+K.

Depending on site configuration, \ clicking on a process will display detailed per-process data and optional \ history.'); mdsiToolTipAdd('procTop', '[procStates]'); mdsiToolTipAdd('perCpuHist', '

Process CPU utilisation

\ Total displayed in green and non-user (Supervisor + \ Executive + Kernel) in red. \ Values are percentage of all available CPUs.'); mdsiToolTipAdd('perWsetHist', '

Process working set

\ Maximum is extent with count displayed in green. \
Clicking displays page file quota utilisation.
'); mdsiToolTipAdd('perPgflHist', '

Process page file usage

\ Maximum is quota with count displayed in green. \
Clicking returns to process working set.
'); mdsiToolTipAdd('perPgsHist', '

Process memory pages

\ Total (private + global) displayed in green with global in blue.'); mdsiToolTipAdd('perBioHist', 'Process buffered IOs per second.'); mdsiToolTipAdd('perDioHist', 'Process direct IOs per second.'); mdsiToolTipAdd('perFltsHist', 'Process page faults per second.'); mdsiToolTipAdd('labelPerHistory', 'Display process activity history.'); /////////// // other // /////////// mdsiToolTipAdd('alert', 'MonDeSi alerts. Click to dismiss.'); } function mdsiToolTipDiskIOPsInit (id) { mdsiToolTipAdd(id, 'The device name is displayed, \ then if mounted the volume name. \ Below these is the total capacity and current free space as a percentage. \ Adjacent is the free space delta (\u0394) for the displayed period. \ The graph displays IOPS (input/output operations per second). \ Non-zero device error counts are displayed. \
Clicking displays IOP queue length (if not displayed separately).
'); } function mdsiToolTipDiskQlenInit (id) { mdsiToolTipAdd(id, 'Volume IOP queue length with maximum over the \ displayed period and the line graph showing the instantaneous value. \
Clicking displays free space delta (if not displayed separately).
'); } function mdsiToolTipDiskDeltaInit (id) { mdsiToolTipAdd(id, 'Volume free space delta. \ Maximum and minumum free space on the disk volume over the displayed \ period with the line graph showing the instantaneous value. \ As free space is consumed the graph moves downward \ and as it is returned it moves upward. \
Clicking returns to device IOPS (if not displayed separately).
'); } ///////////// // TOOLTIP // ///////////// var mdsi_ToolTipArray = new Array(); var mdsi_ToolTipTimer = null, mdsi_ToolTipCurrent = null; var mdsi_ToolTipX = 0, mdsi_ToolTipY = 0, mdsi_ToolTipXguard = 20, mdsi_ToolTipYguard = 10; // add an element's tip to the lookup array function mdsiToolTipAdd (id,tip) { if (tip.substr(0,1) == '[') mdsiToolTipSet(id,mdsi_ToolTipArray[tip.substr(1,tip.length-2)]); else mdsiToolTipSet(id,(mdsi_ToolTipArray[id] = tip)); } // set a tool tip against an element function mdsiToolTipSet (id,tip) { if (typeof tip == 'undefined') tip = '[' + id + ']'; var idobj = $byId(id); if (!idobj) { alert('TIP ' + id + ' undefined!'); return; } idobj.setAttribute('onmousemove','mdsiToolTip(event,"' + tip + '")'); idobj.setAttribute('onmouseout','mdsiToolTip(event)'); } // the mouse event on the element triggers a tooltip function mdsiToolTip(evnt,tip) { if (!$byId("checkboxTips").checked) return; var div = document.getElementById('divToolTip'); if (div == null) { // create the div for the tooltip text just the once var body = document.getElementsByTagName('body')[0]; var div = document.createElement('div'); div.setAttribute('id','divToolTip'); div.setAttribute('style','display:none;'); // makes it easier on touch devices (e.g. iPad) div.setAttribute('onclick','this.style.display="none";'); body.appendChild(div); } if (evnt.type == 'mousemove') { mdsi_ToolTipX = evnt.pageX; mdsi_ToolTipY = evnt.pageY; if (div && div.style.display == 'none') { // tooltip is not (yet) displayed if (mdsi_ToolTipTimer) return; // delay the appearance of the tooltip var callback = function(tip) { // timeout for initial tooltip just expired mdsi_ToolTipTimer = null; div.style.display = 'inline-block'; var pseudoEvent = { type : 'mousemove', pageX : mdsi_ToolTipX, pageY : mdsi_ToolTipY }; setTimeout(mdsiToolTip, 10, pseudoEvent, tip); mdsi_ToolTipCurrent = tip; if (tip.substr(0,1) == '[') tip = mdsi_ToolTipArray[tip.substr(1,tip.length-2)]; document.getElementById('divToolTip').innerHTML = tip; }; mdsi_ToolTipTimer = setTimeout(callback, mdsi_ToolTipDelay, tip); } else { // tooltip is currently displayed, just move it if (div.scrollWidth + mdsi_ToolTipX + mdsi_ToolTipXguard > window.innerWidth) div.style.left = (mdsi_ToolTipX - div.scrollWidth - 5) + 'px'; else div.style.left = (mdsi_ToolTipX + 5) + 'px'; if (div.scrollHeight + mdsi_ToolTipY + mdsi_ToolTipYguard > window.innerHeight) div.style.top = (mdsi_ToolTipY - div.scrollHeight - 5) + 'px'; else div.style.top = (mdsi_ToolTipY + 5) + 'px'; if (tip != mdsi_ToolTipCurrent) { mdsi_ToolTipCurrent = tip; if (tip.substr(0,1) == '[') tip = mdsi_ToolTipArray[tip.substr(1,tip.length-2)]; div.innerHTML = tip; } if (mdsi_ToolTipTimer) clearTimeout(mdsi_ToolTipTimer); mdsi_ToolTipTimer = null; } } else if (evnt.type == 'mouseout') { // delay the disappearance of the tooltip just slightly var callback = function (tip) { clearTimeout(mdsi_ToolTipTimer); mdsi_ToolTipTimer = null; div.style.display = 'none'; } clearTimeout(mdsi_ToolTipTimer); mdsi_ToolTipTimer = setTimeout(callback, mdsi_ToolTipOutDelay, tip); } else { // tooltip no longer current clearTimeout(mdsi_ToolTipTimer); mdsi_ToolTipTimer = mdsi_ToolTipCurrent = null; div.style.display = 'none'; } } /*****************************************************************************/