Cover V06, I02
Article
Figure 1
Listing 1
Listing 2
Listing 3

feb97.tar


Listing 3: sample.m

###     Operator Shell: Main Menu

VERSION=1.0
HOST=`hostname`

.TITLE

.TITLE

.TITLE
Operator Shell
.TITLE

.TITLE
Host: $HOST            LoginID: $LOGNAME         Date: $DATE $TIME
.TITLE

.LINE DumbLine

.BOX DumbLine

.TEXT -3 2
v$VERSION

.TEXT -3 42
"p" for Previous Menu; "?" for help

.TEXT 8 27
System Status Menu

.SYSTEM /usr/bin/echo " "; \
/bin/who | /usr/bin/more; \
/usr/bin/echo " "; \
/usr/bin/echo "Press [ Return ] to continue ...\c"; \
read reply
Display who is on the system.

.SYSTEM /usr/bin/echo " "; \
/usr/bin/echo "Using 5 second sampling ..."; \
/usr/bin/echo "Cntl-C to quit"; \
/usr/bin/vmstat 5; \
/usr/bin/echo " "; \
/usr/bin/echo "Press [ Return ] to continue ...\c"; \
read reply
Display system activity (vmstat).

.SYSTEM /usr/bin/echo " "; \
/bin/df -k | /usr/bin/more; \
/usr/bin/echo " "; \
/usr/bin/echo "Press [ Return ] to continue ...\c"; \
read reply
Display system disk space summary (df -k).

.SPACE

.SYSTEM \
PS1='\
Type \"exit\" to return to the operator shell\
"$PWD" > '; \
export PS1; \
/bin/ksh
Exit menu to Korn Shell.

.SPACE

.EXIT
Exit Operator Shell.