Yet Another System Status Display Program Submitted by: Brian S. Griffin RCA/MSR Borton Landing Road MS 108-239 Moorestown, NJ 08057 (609) 778-7781 YASS (Yet Another System Status) is a program that will display information about the processes on the system. It runs on VT100 compatible terminals ONLY! If the program is to be used by all users, it must be installed with GROUP and WORLD privileges, or, in other words you must have these privileges for the program to run properly. So who needs another "SHOW SYSTEM"? Just take a look at these added bells and whistles: > Processes are sorted by TERMINAL name or alternately by USERNAME (interactive option). > Subprocesses are displayed immediately below their owners. > CPU rates are computed for all processes in terms of %CPU usage so that CPU hogs can be easily identified. > BIO rates are computed for each processes so that IO hogs can be easily identified. > Page fault rates can also be displayed. > Displays can be limited to interactive jobs, batch jobs, or system jobs. > All options are selectable interactively. > Here's the zinger: Using the arrow keys, a process can be selected and acted upon in one of six ways: 1. GOLD 1: SHOW PROC/CONT 2. GOLD 2: SET PROC/PRIO=4 3. GOLD 3: SET PROC/PRIO=3 4. GOLD 4: SET PROC/RESUME 5. GOLD 5: SET PROC/SUSPEND 6. GOLD 6: STOP /ID= Page 2 System managers may find this utility useful for actively adjusting jobs according to external priorities (e.g. The boss just told me to finish this job by this afternoon). In our environment it was necessary to determine which subprocesses belonged to which jobs and how their CPU and BIO rates affect the system. Most everything else was added by a programmer gone wild. There is no need to worry about people stopping other processes with this program that they couldn't otherwise do for themselves. The commands are executed in a subprocess which has only the privileges of the owner, not the installed privileges of YASS. Known Bugs Occasionally, when the screen is scrolling, the program will miss an XON (^Q), and will stop. When this happens, it will be obvious. Just simply type ^Q to start things rolling again. Don't attempt to execute a GOLD n command when the cursor is not visible on the screen. Doing so will either crash the program or affect some process you may not wish to affect. Source Files Here is the list of source files that comprise YASS: DOING.C -- This is the main program, read the header of this file for details. INSERT.C -- Inserts a processes record into the linked list. SORTB.C -- Sorts the data by terminal or username or pid and then by subprocess. It does this by building a list of pointers to the data and returns a pointer to the list. FIXIMAGE.C -- Simply strips the device, directory, and extension from the image name. STIME.C -- Converts absolute time in 10-ms. to ascii string "d hh:mm:ss.cc". CALRAT.C -- Computes CPU rate and BIO rate for each process. INIT.C -- Initializes the ilist for GETJPI. PTIME.C -- Takes the system time and prints the day, date and time. QIO.C -- Handles all the terminal input and command decoding. HELP.C -- Prints help screen. JOBTYPE.C -- This routine determines the job type of selected process. Page 3 DOCOMMAND.C -- This routine is passed a string of the form "$command\n" and spawns a subprocess passing to it the command string. DOING.H -- Structure definitions for YASS STATEDEF.H -- Process state macros extracted from LIB.MLB, module=$STATEDEF. PCBDEF.H -- Process status flags macro definitions. DESCRIP.MMS -- MMS description file for building YASS. As far as I can tell, YASS should work under VMS V4.0. However, no guarantees or warranties are expressed or implied.