envos VSTATS 2 4 1 VSTATS 1 4 By: Johannes A. G. M. Koomen (Koomen.wbst@Xerox or Koomen@CS.Rochester) Uses: SYSTATS, READNUMBER This document last edited on November 20, 1987 INTRODUCTION Loading VSTATS will put a VStats entry on the background menu, and execute (VSTATS 'On), which will cause the following display to be created and continuously updated: ``````````111`011`??1?`1911`111`11133`1111??1`111111``````````````@@`@G"<`@D@6"`@DGl68"8q `@D@"T *D"@`@DG"T *|"a`@DH""T *@"@`@DH""T*D" `@GT"8<q`@@`@@`@@`@@`@C8|pq`@D@ "D"`@D(@&`@E@xp*`@E@D*`@F@D2`B"D "`Â>8 pp``````````@@`@@"88p`"DD"`"DD"Dq``"D@D `"D\Ty`"DD"T`"DD"(`88p(y``````À88pp@`@"DD"`(&LL&@`@*TTp*@`@*TT*@`@2dd2@`B"DD"@`Â>88pq```` DESCRIPTION VSTATS is a facility for continuously displaying various interesting aspects of a running system. It can display the current time of day, with or without seconds, and/or display memory and disk space utilization, and/or display machine utilization in terms of CPU, I/O, GC and swap time. The display can be regular or inverse-video. The display is updated at user settable intervals, either always or only if the display window is completely visible. Closing the VSTATS window will remove the background update function. Left buttoning the VSTATS window causes it to be recomputed and redisplayed entirely. Otherwise display updates only affect those parts that have actually changed, making for a visually quiet and efficient facility. Middle buttoning the VSTATS window will bring up an Inspector window onto the VSTATS list of options. Left buttoning an option name prints an explanation of the option to the Prompt window. Left buttoning an option value selects it, and middle buttoning an option value presents a menu from which a new value can be selected. The options window looks like this: qFc{ӏy{m~7?{m۟m{mR?@ËDōDLD R&JCD R$ @"( 2$ DL"(! 2$ C  `@ @P "GP"#"$"P" HR $G>"ȌR $H "E2 $ȉ"!DE2 G!C <p;"@yÈ"8q K8$H"@ "Dx"$J"a | }$J"@H @}$E" L"D ۽#<q8 ;@ D"D 'DË8p`R"|L""R"D`BR"DP! R"ADQ$H" D Èp x@@D ÇDqaÀDp Ç8h HD D@"D D@D"#xyD>( C|$H@D ( @@$H@DB" DHD@yCp C8hD@@D@CDLJXG@DHD0"dA$@@DHDDA@DHD"DA@DHD2"HDI@C8D0DÀD@$@ÇDLJXGd HD0"dA$@@"#DDA@$HD"DA&@$HD2"HDI$@8D0À D@"D@'DLJXG@R"D0"dA$@@R"DDA@R"D"DA@R"AD2"HDI@8D0 VSTATS is highly optimized for speed and implemented as a BACKGROUNDFN rather than as a seperate process so as to minimize overhead. As a result, VSTATS can easily be run with display update intervals equal to 1 second. DETAILS (VSTATS on/off) [Function] If on/off is either ON, On, on, or T, the VStats display is turned on; otherwise off. VSTATS.CLOCK.INTERVAL [Variable] If the global variable VSTATS.CLOCK.INTERVAL is a positive number, VSTATS displays an alphanumeric clock (e.g., "1-Aug-85 14:30"), which is updated every VSTATS.CLOCK.INTERVAL seconds. If this interval is less than 1 minute VSTATS displays seconds as well. For those of you who keep their machines running overnight (say, with IDLE or BOUNCE), if the clock display is enabled, VSTATS will resynchronize the local clock with the network daily at midnight. (My machine looses about 15 minutes a week, otherwise!) VSTATS.SPACE.INTERVAL [Variable] If the global variable VSTATS.SPACE.INTERVAL is a positive number, VSTATS displays, both graphically and alphanumerically, the utilization of Data, Atom, and VMem spaces and optionally Disk space, which is updated every VSTATS.SPACE.INTERVAL seconds. VSTATS.SPACE.PANIC.LEVEL [Variable] If VStats is displaying space utilization, and VSTATS.SPACE.PANIC.LEVEL is a percentage between 1 and 100 (or a fraction between 0 and 1), and any of the memory space utilizations (other than disk) exceed this percentage, VSTATS will flash its window in proportion to the excess, whether the window is occluded or not. VSTATS.SPACE.SHOW.DISK? [Variable] If VStats is displaying space utilization, then if VSTATS.SPACE.SHOW.DISK? is non-NIL, Disk space utilization is displayed as well, provided VStats can figure out the total disk size. If VSTATS.SPACE.SHOW.DISK? is T, the default DSK is used, for instance {DSK19} on a Dorado, or {DSK} on a Dandelion. Alternate Dorado partitions or Dandelion volumes may be assigned to VSTATS.SPACE.SHOW.DISK? as well. If assigned through the options window, VStats will figure out which volumes or partitions are displayable. VSTATS.MUTIL.INTERVAL [Variable] If the global variable VSTATS.MUTIL.INTERVAL is a positive number, VSTATS displays, both graphically and alphanumerically, the machine utilization in terms of CPU time, time spent on disk and Ethernet I/O, garbage collection time, and swapping time, which is updated every VSTATS.MUTIL.INTERVAL seconds. VSTATS.MUTIL.HYSTERESIS [Variable] If VStats is displaying machine utilization and VSTATS.MUTIL.HYSTERESIS is a positive number, the relative percentages are based on the average over VSTATS.MUTIL.HYSTERESIS intervals, otherwise they are based on the total time since VSTATS was invoked. VSTATS.POSITION [Variable] If the global variable VSTATS.POSITION is a POSITION, the VSTATS display will be put there, otherwise the user is prompted for a POSITION. VSTATS.BLACK? [Variable] If the global variable VSTATS.BLACK? is non-NIL, VSTATS displays with inverse video. VSTATS.ALWAYS? [Variable] If the global variable VSTATS.ALWAYS? is non-NIL, VSTATS will always update its display when its timers expire, causing its window to come to the top if it isn't already there; otherwise, VSTATS will only update the display if its window is neither partially nor wholly occluded. If it is occluded, VSTATS will, of course, continue to update its internal timers and the display will be updated the first time the timers expire after the display becomes wholly visible again. Defaults VSTATS.BLACK? NIL VSTATS.ALWAYS? NIL VSTATS.POSITION top right corner of display VSTATS.CLOCK.INTERVAL 1 second VSTATS.SPACE.INTERVAL 300 seconds (5 minutes) VSTATS.SPACE.PANIC.LEVEL 95 % VSTATS.SPACE.SHOW.DISK? T VSTATS.MUTIL.INTERVAL 1 second VSTATS.MUTIL.HYSTERESIS 20 intervals If different values are preferred, these variables should be set by the user before loading VSTATS to affect initial display. They can of course be altered anytime using the options menu. Extras: A number of functions are required (and supplied) by VSTATS which the author believes might well be part of standard Interlisp-D, viz., (COVEREDWP window) [Function] Returns T if window is partially or completely covered by some other window; NIL otherwise. (CLOCKTICKS interval timerunits) [Function] Returns the (machine dependent!) number of internal clock ticks over the interval. For instance, on the D'Lion (CLOCKTICKS 2.5 'MINUTES) = 5211900 (ALTOPARTITIONS) [Function] On the Dorado, returns a list of partitions set up with an Alto exec, i.e., containing a system boot file. Especially useful with the recently added Extended VMem option, where not all partitions are bootable. Returns NIL on any other machine type. Note: this list of partitions takes between 15-20 seconds to compute. (DISKUSEDPAGES dsk recompute) [Function] Returns the total number of disk pages in use (complementing DISKFREEPAGES). On Dorado, this is only an estimate, unless recompute is non-NIL in which case you wait ~ 8 seconds for the answer. (DISKTOTALPAGES dsk recompute) [Function] Returns the total number of disk pages available (sum of DISKFREEPAGES and DISKUSEDPAGES).(LIST ((PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC "" "") STARTINGPAGE# 289) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC "" "")) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL (PAPERSIZE NIL . LETTER) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO NIL) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL (PAPERSIZE NIL . LETTER) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO NIL) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))))) <H T;H 3T2;H 22,,8,8H PAGEHEADING RUNNINGHEAD CLASSICCLASSICCLASSIC HELVETICA MODERN MODERN MODERN MODERNMODERN    HRULE.GETFNMODERN   HRULE.GETFNMODERN   HRULE.GETFNMODERN    HRULE.GETFNMODERN   HRULE.GETFNMODERN K/   BMOBJ.GETFN3MODERN  Fo, BMOBJ.GETFN3MODERN     N j   ?   1    U - 0 &      K   o' C  z ?  [2z