v14i055: u386mon 2.20-S5R3 system monitor (386,68k,Tandem) part 2 of 6
wht at gatech.edu
wht at gatech.edu
Fri Aug 17 10:52:37 AEST 1990
Posting-number: Volume 14, Issue 55
Submitted-by: wht at gatech.edu@n4hgf.UUCP (Warren Tucker)
Archive-name: u386mon-2.20/part02
#!/bin/sh
# This is part 02 of u386mon.2.20
if touch 2>&1 | fgrep 'amc' > /dev/null
then TOUCH=touch
else TOUCH=true
fi
# ============= Makefile.dell ==============
echo "x - extracting Makefile.dell (Text)"
sed 's/^X//' << 'SHAR_EOF' > Makefile.dell &&
X#+-------------------------------------------------------------------
X# Makefile for u386mon for DELL UNIX 1.x
X# ...!{gatech,emory}!n4hgf!wht
X#--------------------------------------------------------------------
X#+:EDITS:*/
X#:08-10-1990-14:12-jmd at p1so/wht at n4hgf-2.20-add Tandem Integrity S2
X#:08-07-1990-14:24-wht at n4hgf-nba@sysware.sysware.dk S5R31 updates
X#:08-02-1990-15:35-wht at n4hgf-2.12-old curses hacks+minor 3.2 formalizations
X#:08-01-1990-21:39-wht at n4hgf-add Dell make file
X#:08-01-1990-12:26-wht at n4hgf-2.11-try to support ISC 1.x.x
X#:07-28-1990-18:07-wht at n4hgf-2.10 release
X#:07-26-1990-18:59-root at n4hgf-remove inappropriate USIZE_FIXED reminder
X#:07-24-1990-18:53-wht at n4hgf-add USIZE_FIXED reminder
X#:07-21-1990-16:03-wht at n4hgf-add libpanel + remake depend
X#:06-27-1990-01:57-wht at n4hgf-1.10 - incorporate suggestions from alpha testers
X#:06-25-1990-04:14-wht at n4hgf-1.03-better error handling
X#:06-24-1990-20:53-wht at n4hgf-v1.01-add ISC support thanks to peter at radig.de
X#:06-21-1990-14:27-r at n4hgf-version x0.12 seems bug free
X#:06-19-1990-21:37-wht at n4hgf-get ready for 0.08 release
X
X#------------> CFLAGS
X# Add -DVPIX if you have VP/ix
X# Add -DMERGE386 if you have Merge/386
XCFLAGS = -c -O -DDELL
X
X#------------> LIB
XLIB = -lpanel -lcurses -lx -lmalloc -lc_s
X
X#------------> KMEMGRP
XKMEMGRP = sys
X
X#------------> BINDIR
XBINDIR = /usr/local/bin
X
XLDFLAGS = -s
X
XVERSION = 2.20
X
X#handle Sys V make "feature" of using SHELL
XSHELL = /bin/sh
X
X#FCRC = fcrc -u $*.c ;
X.c.o:; $(FCRC) $(CC) $(CFLAGS) $*.c
X
XSRC = \
X u386mon.c\
X bootinfo.c\
X detail.c\
X det_proc.c\
X det_sio.c\
X disputil.c\
X kludge.c\
X libkmem.c\
X libmem.c\
X libpanel.c\
X libswap.c\
X libnlsym.c\
X nlsym.c\
X proc.c\
X tune.c\
X var.c
X
XHDR = \
X config.h\
X libkmem.h\
X libmem.h\
X libpanel.h\
X libswap.h\
X libnlsym.h\
X lint_args.h\
X nlsym.h\
X u386mon.h
X
XNLSYM_OBJ =\
X nlsym.o
X
XU386MON_OBJ =\
X u386mon.o\
X detail.o\
X det_proc.o\
X bootinfo.o\
X proc.o\
X tune.o\
X var.o\
X kludge.o\
X disputil.o\
X libkmem.o\
X libmem.o\
X libswap.o\
X libnlsym.o
X
XSHARFLS = \
X README\
X EXPLAIN\
X Makefile.sco\
X Makefile.isc1\
X Makefile.isc2\
X Makefile.dell\
X Makefile.s2\
X Makefile.sVr31\
X $(SRC)\
X $(HDR)\
X renice/Makefile\
X renice/renice.c\
X panel/README\
X panel/panel.3\
X panel/ptest.c\
X panel/Makefile
X
Xall: nlsym u386mon
X
X#must run as root
Xinstall: all
X mv $(BINDIR)/nlsym $(BINDIR)/nlsym.old
X cp nlsym $(BINDIR)
X chown bin $(BINDIR)/nlsym
X chgrp bin $(BINDIR)/nlsym
X chmod 711 $(BINDIR)/nlsym
X mv $(BINDIR)/u386mon $(BINDIR)/u386mon.old
X cp u386mon $(BINDIR)
X chown bin $(BINDIR)/u386mon
X chgrp $(KMEMGRP) $(BINDIR)/u386mon
X chmod 2711 $(BINDIR)/u386mon
X chmod g+r /dev/swap
X $(BINDIR)/nlsym
X @echo ' ';echo 'csh users rehash before executing'
X
Xnlsym: $(NLSYM_OBJ)
X $(CC) $(LDFLAGS) -o $@ $(NLSYM_OBJ) $(LIB)
X
Xu386mon: $(U386MON_OBJ)
X $(CC) $(LDFLAGS) -o $@ $(U386MON_OBJ) $(LIB)
X
X/unix.nlsym: nlsym /unix
X $(BINDIR)/nlsym
X chmod 644 /unix.nlsym
X
X#not delivered
Xsrc.fls: $(SRC) Makefile
X ls $(SRC) > src.fls
Xlint_args: src.fls
X echo ' ' > lint_args.h
X csh zgcc src.fls lint_args.h $(CFLAGS)
X
Xclean:
X rm -f $(U386MON_OBJ) $(NLSYM_OBJ) \
X core u386mon.lint Makefile.bak src.fls mkdep.* cscope.out tags a.out
X
Xclobber: clean
X rm -f nlsym u386mon
X
Xlint:
X lint -ux *.c > u386mon.lint
X
X#for shar 3.27 or later
Xshar:
X shar -a -n u386mon.$(VERSION) -l 55 -o $(VERSION).sh $(SHARFLS)
X
X# MAKE DEPEND: regenerate .c:.h, .ol:.c, .ol:.asm dependencies automatically
X#
Xdepend:
X rm -f mkdep.rule.tmp
X if test '$(SRC)' ;\
X then (grep '^#include' $(SRC) \
X | sed -e 's?:[^<]*<\([^>]*\)>.*?: /usr/include/\1?'\
X -e 's?:[^"]*"\([^"]*\)".*?: \1?'\
X -e 's?\(.*\)\.c?\1.o?'\
X >> mkdep.rule.tmp) ;\
X fi
X
X echo 1 >mkdep.ex.tmp
X echo '/^# DO NOT DELETE THIS LINE' >>mkdep.ex.tmp
X echo '.+1,$$d' >>mkdep.ex.tmp
X echo 'r mkdep.rule.tmp' >> mkdep.ex.tmp
X echo 'w' >> mkdep.ex.tmp
X cp Makefile.dell Makefile.new
X ex Makefile.new < mkdep.ex.tmp
X rm mkdep.ex.tmp mkdep.rule.tmp
X echo '# DEPENDENCIES MUST END AT END OF FILE' >>Makefile.new
X echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY'>>Makefile.new
X echo '# see make depend above'>>Makefile.new
X mv Makefile.dell Makefile.bak
X mv Makefile.new Makefile.dell
X
X# DO NOT DELETE THIS LINE
Xu386mon.o: config.h
Xu386mon.o: /usr/include/curses.h
Xu386mon.o: libpanel.h
Xu386mon.o: /usr/include/signal.h
Xu386mon.o: /usr/include/string.h
Xu386mon.o: /usr/include/fcntl.h
Xu386mon.o: /usr/include/nlist.h
Xu386mon.o: /usr/include/errno.h
Xu386mon.o: /usr/include/time.h
Xu386mon.o: /usr/include/sys/types.h
Xu386mon.o: /usr/include/sys/lock.h
Xu386mon.o: /usr/include/sys/utsname.h
Xu386mon.o: /usr/include/sys/stat.h
Xu386mon.o: /usr/include/sys/param.h
Xu386mon.o: /usr/include/sys/tuneable.h
Xu386mon.o: /usr/include/sys/sysinfo.h
Xu386mon.o: /usr/include/sys/sysmacros.h
Xu386mon.o: /usr/include/sys/immu.h
Xu386mon.o: /usr/include/sys/region.h
Xu386mon.o: /usr/include/sys/proc.h
Xu386mon.o: /usr/include/sys/var.h
Xu386mon.o: /usr/include/sys/swap.h
Xu386mon.o: /usr/include/sys/trap.h
Xu386mon.o: nlsym.h
Xu386mon.o: libkmem.h
Xu386mon.o: libmem.h
Xu386mon.o: libswap.h
Xu386mon.o: libnlsym.h
Xu386mon.o: u386mon.h
Xbootinfo.o: config.h
Xbootinfo.o: /usr/include/curses.h
Xbootinfo.o: /usr/include/sys/types.h
Xbootinfo.o: /usr/include/sys/bootinfo.h
Xbootinfo.o: u386mon.h
Xdetail.o: config.h
Xdetail.o: /usr/include/curses.h
Xdetail.o: /usr/include/signal.h
Xdetail.o: /usr/include/string.h
Xdetail.o: /usr/include/fcntl.h
Xdetail.o: /usr/include/nlist.h
Xdetail.o: /usr/include/errno.h
Xdetail.o: /usr/include/time.h
Xdetail.o: /usr/include/pwd.h
Xdetail.o: /usr/include/sys/types.h
Xdetail.o: /usr/include/utmp.h
Xdetail.o: /usr/include/sys/utsname.h
Xdetail.o: /usr/include/sys/stat.h
Xdetail.o: /usr/include/sys/param.h
Xdetail.o: /usr/include/sys/tuneable.h
Xdetail.o: /usr/include/sys/sysinfo.h
Xdetail.o: /usr/include/sys/sysmacros.h
Xdetail.o: /usr/include/sys/immu.h
Xdetail.o: /usr/include/sys/region.h
Xdetail.o: /usr/include/sys/proc.h
Xdetail.o: /usr/include/sys/var.h
Xdetail.o: nlsym.h
Xdetail.o: libkmem.h
Xdetail.o: libnlsym.h
Xdetail.o: u386mon.h
Xdet_proc.o: config.h
Xdet_proc.o: /usr/include/curses.h
Xdet_proc.o: /usr/include/signal.h
Xdet_proc.o: /usr/include/string.h
Xdet_proc.o: /usr/include/fcntl.h
Xdet_proc.o: /usr/include/nlist.h
Xdet_proc.o: /usr/include/errno.h
Xdet_proc.o: /usr/include/time.h
Xdet_proc.o: /usr/include/pwd.h
Xdet_proc.o: /usr/include/sys/types.h
Xdet_proc.o: /usr/include/utmp.h
Xdet_proc.o: /usr/include/sys/stat.h
Xdet_proc.o: /usr/include/sys/param.h
Xdet_proc.o: /usr/include/sys/tuneable.h
Xdet_proc.o: /usr/include/sys/sysinfo.h
Xdet_proc.o: /usr/include/sys/sysmacros.h
Xdet_proc.o: /usr/include/sys/immu.h
Xdet_proc.o: /usr/include/sys/region.h
Xdet_proc.o: /usr/include/sys/proc.h
Xdet_proc.o: /usr/include/sys/fs/s5dir.h
Xdet_proc.o: /usr/include/sys/user.h
Xdet_proc.o: /usr/include/sys/var.h
Xdet_proc.o: nlsym.h
Xdet_proc.o: libkmem.h
Xdet_proc.o: libmem.h
Xdet_proc.o: libswap.h
Xdet_proc.o: libnlsym.h
Xdet_proc.o: u386mon.h
Xdet_sio.o: config.h
Xdet_sio.o: /usr/include/curses.h
Xdet_sio.o: /usr/include/string.h
Xdet_sio.o: /usr/include/nlist.h
Xdet_sio.o: /usr/include/sys/types.h
Xdet_sio.o: /usr/include/sys/stat.h
Xdet_sio.o: /usr/include/sys/ascii.h
Xdet_sio.o: /usr/include/sys/param.h
Xdet_sio.o: /usr/include/sys/tty.h
Xdet_sio.o: nlsym.h
Xdet_sio.o: libkmem.h
Xdet_sio.o: libmem.h
Xdet_sio.o: libswap.h
Xdet_sio.o: libnlsym.h
Xdet_sio.o: u386mon.h
Xdisputil.o: config.h
Xdisputil.o: /usr/include/curses.h
Xdisputil.o: /usr/include/sys/types.h
Xdisputil.o: u386mon.h
Xkludge.o: /usr/include/curses.h
Xlibkmem.o: /usr/include/sys/types.h
Xlibkmem.o: /usr/include/fcntl.h
Xlibkmem.o: libkmem.h
Xlibmem.o: /usr/include/sys/types.h
Xlibmem.o: /usr/include/fcntl.h
Xlibmem.o: libmem.h
Xlibpanel.o: config.h
Xlibpanel.o: /usr/include/curses.h
Xlibpanel.o: u386mon.h
Xlibswap.o: /usr/include/sys/types.h
Xlibswap.o: /usr/include/fcntl.h
Xlibswap.o: libswap.h
Xlibnlsym.o: config.h
Xlibnlsym.o: /usr/include/stdio.h
Xlibnlsym.o: /usr/include/sys/types.h
Xlibnlsym.o: /usr/include/sys/stat.h
Xlibnlsym.o: /usr/include/fcntl.h
Xlibnlsym.o: /usr/include/nlist.h
Xlibnlsym.o: nlsym.h
Xlibnlsym.o: libnlsym.h
Xnlsym.o: config.h
Xnlsym.o: /usr/include/stdio.h
Xnlsym.o: /usr/include/sys/types.h
Xnlsym.o: /usr/include/sys/stat.h
Xnlsym.o: /usr/include/fcntl.h
Xnlsym.o: /usr/include/nlist.h
Xnlsym.o: nlsym.h
Xproc.o: config.h
Xproc.o: /usr/include/curses.h
Xproc.o: /usr/include/sys/types.h
Xproc.o: /usr/include/sys/param.h
Xproc.o: /usr/include/sys/immu.h
Xproc.o: /usr/include/sys/region.h
Xproc.o: /usr/include/sys/proc.h
Xproc.o: /usr/include/sys/var.h
Xproc.o: /usr/include/nlist.h
Xproc.o: nlsym.h
Xproc.o: libkmem.h
Xproc.o: libnlsym.h
Xproc.o: u386mon.h
Xtune.o: config.h
Xtune.o: /usr/include/curses.h
Xtune.o: /usr/include/sys/types.h
Xtune.o: /usr/include/sys/tuneable.h
Xtune.o: u386mon.h
Xvar.o: config.h
Xvar.o: /usr/include/curses.h
Xvar.o: /usr/include/sys/types.h
Xvar.o: /usr/include/sys/var.h
Xvar.o: u386mon.h
X# DEPENDENCIES MUST END AT END OF FILE
X# IF YOU PUT STUFF HERE IT WILL GO AWAY
X# see make depend above
SHAR_EOF
$TOUCH -am 0810141890 Makefile.dell &&
chmod 0644 Makefile.dell ||
echo "restore of Makefile.dell failed"
Wc_c="`wc -c < Makefile.dell`"
test 8927 -eq "$Wc_c" ||
echo Makefile.dell: original size 8927, current size $Wc_c
# ============= Makefile.s2 ==============
echo "x - extracting Makefile.s2 (Text)"
sed 's/^X//' << 'SHAR_EOF' > Makefile.s2 &&
X#+-------------------------------------------------------------------
X# Makefile for s2mon (u386mon) for Tandem Integrity S2 NonStop-UX
X# ...!{gatech,emory}!n4hgf!wht
X# The Tandem compiler gives good diagnostic!!!!! also, auto defines
X# 'mips' pre-processor symbol.
X#--------------------------------------------------------------------
X#+:EDITS:*/
X#:08-10-1990-14:12-jmd at p1so/wht at n4hgf-2.20-add Tandem Integrity S2
X#:08-07-1990-14:24-wht at n4hgf-nba@sysware.sysware.dk S5R31 updates
X#:08-02-1990-15:35-wht at n4hgf-2.12-old curses hacks+minor 3.2 formalizations
X#:08-01-1990-21:39-wht at n4hgf-add Dell make file
X#:08-01-1990-12:26-wht at n4hgf-2.11-try to support ISC 1.x.x
X#:07-28-1990-18:07-wht at n4hgf-2.10 release
X#:07-28-1990-14:51-wht at n4hgf-creation
X
X#------------> CFLAGS
XCFLAGS = -c -O -DSVR31
X
X#------------> LIB
XLIB = -lcurses -lmalloc -lmld
X
X#------------> KMEMGRP
XKMEMGRP = sys
X
X#------------> BINDIR
XBINDIR = /usr/local/bin
X
XLDFLAGS = -s
X
XVERSION = 2.20
X
X#handle Sys V make "feature" of using SHELL
XSHELL = /bin/sh
X
X#FCRC = fcrc -u $*.c ;
X.c.o:; $(FCRC) $(CC) $(CFLAGS) $*.c
X
XSRC = \
X u386mon.c\
X detail.c\
X det_proc.c\
X disputil.c\
X kludge.c\
X libkmem.c\
X libmem.c\
X libpanel.c\
X libswap.c\
X libnlsym.c\
X nlsym.c\
X proc.c\
X tune.c\
X var.c
X
XHDR = \
X config.h\
X libkmem.h\
X libmem.h\
X libpanel.h\
X libswap.h\
X libnlsym.h\
X lint_args.h\
X nlsym.h\
X u386mon.h
X
XNLSYM_OBJ =\
X nlsym.o
X
XU386MON_OBJ =\
X u386mon.o\
X detail.o\
X det_proc.o\
X proc.o\
X tune.o\
X var.o\
X kludge.o\
X disputil.o\
X libkmem.o\
X libmem.o\
X libswap.o\
X libnlsym.o\
X libpanel.o
X
XSHARFLS = \
X README\
X EXPLAIN\
X Makefile.sco\
X Makefile.isc1\
X Makefile.isc2\
X Makefile.dell\
X Makefile.s2\
X Makefile.sVr31\
X $(SRC)\
X $(HDR)\
X renice/Makefile\
X renice/renice.c\
X panel/README\
X panel/panel.3\
X panel/ptest.c\
X panel/Makefile
X
Xall: nlsym s2mon
X
X#must run as root
Xinstall: all
X mv $(BINDIR)/nlsym $(BINDIR)/nlsym.old
X cp nlsym $(BINDIR)
X chown bin $(BINDIR)/nlsym
X chgrp bin $(BINDIR)/nlsym
X chmod 711 $(BINDIR)/nlsym
X mv $(BINDIR)/s2mon $(BINDIR)/s2mon.old
X cp s2mon $(BINDIR)
X chown bin $(BINDIR)/s2mon
X chgrp $(KMEMGRP) $(BINDIR)/s2mon
X chmod 2711 $(BINDIR)/s2mon
X chmod g+r /dev/swap
X $(BINDIR)/nlsym
X @echo ' ';echo 'csh users rehash before executing'
X
Xnlsym: $(NLSYM_OBJ)
X $(CC) $(LDFLAGS) -o $@ $(NLSYM_OBJ) $(LIB)
X
Xs2mon: $(U386MON_OBJ)
X $(CC) $(LDFLAGS) -o $@ $(U386MON_OBJ) $(LIB)
X
X/unix.nlsym: nlsym /unix
X $(BINDIR)/nlsym
X chmod 644 /unix.nlsym
X
X#not delivered
Xsrc.fls: $(SRC) Makefile
X ls $(SRC) > src.fls
Xlint_args: src.fls
X echo ' ' > lint_args.h
X csh zgcc src.fls lint_args.h $(CFLAGS)
X
Xclean:
X rm -f $(U386MON_OBJ) $(NLSYM_OBJ) \
X core u386mon.lint Makefile.bak src.fls mkdep.* cscope.out tags a.out
X
Xclobber: clean
X rm -f nlsym s2mon
X
Xlint:
X lint -ux *.c > u386mon.lint
X
X#for shar 3.27 or later
Xshar:
X shar -a -n u386mon.$(VERSION) -l 55 -o $(VERSION).sh $(SHARFLS)
X
X# MAKE DEPEND: regenerate .c:.h, .ol:.c, .ol:.asm dependencies automatically
X#
Xdepend:
X rm -f mkdep.rule.tmp
X if test '$(SRC)' ;\
X then (grep '^#include' $(SRC) \
X | sed -e 's?:[^<]*<\([^>]*\)>.*?: /usr/include/\1?'\
X -e 's?:[^"]*"\([^"]*\)".*?: \1?'\
X -e 's?\(.*\)\.c?\1.o?'\
X >> mkdep.rule.tmp) ;\
X fi
X
X echo 1 >mkdep.ex.tmp
X echo '/^# DO NOT DELETE THIS LINE' >>mkdep.ex.tmp
X echo '.+1,$$d' >>mkdep.ex.tmp
X echo 'r mkdep.rule.tmp' >> mkdep.ex.tmp
X echo 'w' >> mkdep.ex.tmp
X cp Makefile.sVr31 Makefile.new
X ex Makefile.new < mkdep.ex.tmp
X rm mkdep.ex.tmp mkdep.rule.tmp
X echo '# DEPENDENCIES MUST END AT END OF FILE' >>Makefile.new
X echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY'>>Makefile.new
X echo '# see make depend above'>>Makefile.new
X mv Makefile.sVr31 Makefile.bak
X mv Makefile.new Makefile.sVr31
X
X# DO NOT DELETE THIS LINE
Xu386mon.o: config.h
Xu386mon.o: /usr/include/curses.h
Xu386mon.o: libpanel.h
Xu386mon.o: /usr/include/signal.h
Xu386mon.o: /usr/include/string.h
Xu386mon.o: /usr/include/fcntl.h
Xu386mon.o: /usr/include/nlist.h
Xu386mon.o: /usr/include/errno.h
Xu386mon.o: /usr/include/time.h
Xu386mon.o: /usr/include/sys/types.h
Xu386mon.o: /usr/include/sys/lock.h
Xu386mon.o: /usr/include/sys/utsname.h
Xu386mon.o: /usr/include/sys/stat.h
Xu386mon.o: /usr/include/sys/param.h
Xu386mon.o: /usr/include/sys/tuneable.h
Xu386mon.o: /usr/include/sys/sysinfo.h
Xu386mon.o: /usr/include/sys/sysmacros.h
Xu386mon.o: /usr/include/sys/immu.h
Xu386mon.o: /usr/include/sys/region.h
Xu386mon.o: /usr/include/sys/proc.h
Xu386mon.o: /usr/include/sys/var.h
Xu386mon.o: /usr/include/sys/swap.h
Xu386mon.o: nlsym.h
Xu386mon.o: libkmem.h
Xu386mon.o: libmem.h
Xu386mon.o: libswap.h
Xu386mon.o: libnlsym.h
Xu386mon.o: u386mon.h
Xdetail.o: config.h
Xdetail.o: /usr/include/curses.h
Xdetail.o: /usr/include/signal.h
Xdetail.o: /usr/include/string.h
Xdetail.o: /usr/include/fcntl.h
Xdetail.o: /usr/include/nlist.h
Xdetail.o: /usr/include/errno.h
Xdetail.o: /usr/include/time.h
Xdetail.o: /usr/include/pwd.h
Xdetail.o: /usr/include/sys/types.h
Xdetail.o: /usr/include/utmp.h
Xdetail.o: /usr/include/sys/utsname.h
Xdetail.o: /usr/include/sys/stat.h
Xdetail.o: /usr/include/sys/param.h
Xdetail.o: /usr/include/sys/tuneable.h
Xdetail.o: /usr/include/sys/sysinfo.h
Xdetail.o: /usr/include/sys/sysmacros.h
Xdetail.o: /usr/include/sys/immu.h
Xdetail.o: /usr/include/sys/region.h
Xdetail.o: /usr/include/sys/proc.h
Xdetail.o: /usr/include/sys/var.h
Xdetail.o: nlsym.h
Xdetail.o: libkmem.h
Xdetail.o: libnlsym.h
Xdetail.o: u386mon.h
Xdet_proc.o: config.h
Xdet_proc.o: /usr/include/curses.h
Xdet_proc.o: /usr/include/signal.h
Xdet_proc.o: /usr/include/string.h
Xdet_proc.o: /usr/include/fcntl.h
Xdet_proc.o: /usr/include/nlist.h
Xdet_proc.o: /usr/include/errno.h
Xdet_proc.o: /usr/include/time.h
Xdet_proc.o: /usr/include/pwd.h
Xdet_proc.o: /usr/include/sys/types.h
Xdet_proc.o: /usr/include/utmp.h
Xdet_proc.o: /usr/include/sys/stat.h
Xdet_proc.o: /usr/include/sys/param.h
Xdet_proc.o: /usr/include/sys/tuneable.h
Xdet_proc.o: /usr/include/sys/sysinfo.h
Xdet_proc.o: /usr/include/sys/sysmacros.h
Xdet_proc.o: /usr/include/sys/immu.h
Xdet_proc.o: /usr/include/sys/region.h
Xdet_proc.o: /usr/include/sys/proc.h
Xdet_proc.o: /usr/include/sys/fs/s5dir.h
Xdet_proc.o: /usr/include/sys/user.h
Xdet_proc.o: /usr/include/sys/var.h
Xdet_proc.o: nlsym.h
Xdet_proc.o: libkmem.h
Xdet_proc.o: libmem.h
Xdet_proc.o: libswap.h
Xdet_proc.o: libnlsym.h
Xdet_proc.o: u386mon.h
Xdisputil.o: config.h
Xdisputil.o: /usr/include/curses.h
Xdisputil.o: /usr/include/sys/types.h
Xdisputil.o: u386mon.h
Xkludge.o: /usr/include/curses.h
Xlibkmem.o: /usr/include/sys/types.h
Xlibkmem.o: /usr/include/fcntl.h
Xlibkmem.o: libkmem.h
Xlibmem.o: /usr/include/sys/types.h
Xlibmem.o: /usr/include/fcntl.h
Xlibmem.o: libmem.h
Xlibpanel.o: config.h
Xlibpanel.o: /usr/include/curses.h
Xlibpanel.o: u386mon.h
Xlibswap.o: /usr/include/sys/types.h
Xlibswap.o: /usr/include/fcntl.h
Xlibswap.o: libswap.h
Xlibnlsym.o: config.h
Xlibnlsym.o: /usr/include/stdio.h
Xlibnlsym.o: /usr/include/sys/types.h
Xlibnlsym.o: /usr/include/sys/stat.h
Xlibnlsym.o: /usr/include/fcntl.h
Xlibnlsym.o: /usr/include/nlist.h
Xlibnlsym.o: nlsym.h
Xlibnlsym.o: libnlsym.h
Xnlsym.o: config.h
Xnlsym.o: /usr/include/stdio.h
Xnlsym.o: /usr/include/sys/types.h
Xnlsym.o: /usr/include/sys/stat.h
Xnlsym.o: /usr/include/fcntl.h
Xnlsym.o: /usr/include/nlist.h
Xnlsym.o: nlsym.h
Xproc.o: config.h
Xproc.o: /usr/include/curses.h
Xproc.o: /usr/include/sys/types.h
Xproc.o: /usr/include/sys/param.h
Xproc.o: /usr/include/sys/immu.h
Xproc.o: /usr/include/sys/region.h
Xproc.o: /usr/include/sys/proc.h
Xproc.o: /usr/include/sys/var.h
Xproc.o: /usr/include/nlist.h
Xproc.o: nlsym.h
Xproc.o: libkmem.h
Xproc.o: libnlsym.h
Xproc.o: u386mon.h
Xtune.o: config.h
Xtune.o: /usr/include/curses.h
Xtune.o: /usr/include/sys/types.h
Xtune.o: /usr/include/sys/tuneable.h
Xtune.o: u386mon.h
Xvar.o: config.h
Xvar.o: /usr/include/curses.h
Xvar.o: /usr/include/sys/types.h
Xvar.o: /usr/include/sys/var.h
Xvar.o: u386mon.h
X# DEPENDENCIES MUST END AT END OF FILE
X# IF YOU PUT STUFF HERE IT WILL GO AWAY
X# see make depend above
SHAR_EOF
$TOUCH -am 0810141890 Makefile.s2 &&
chmod 0644 Makefile.s2 ||
echo "restore of Makefile.s2 failed"
Wc_c="`wc -c < Makefile.s2`"
test 7855 -eq "$Wc_c" ||
echo Makefile.s2: original size 7855, current size $Wc_c
# ============= Makefile.sVr31 ==============
echo "x - extracting Makefile.sVr31 (Text)"
sed 's/^X//' << 'SHAR_EOF' > Makefile.sVr31 &&
X#+-------------------------------------------------------------------
X# Makefile for u386mon for System V Release 3.1
X# ...!{gatech,emory}!n4hgf!wht
X# works on some S5R3.1 systems, anyway
X#--------------------------------------------------------------------
X#+:EDITS:*/
X#:08-10-1990-14:12-jmd at p1so/wht at n4hgf-2.20-add Tandem Integrity S2
X#:08-07-1990-14:24-wht at n4hgf-nba@sysware.sysware.dk S5R31 updates
X#:08-02-1990-15:35-wht at n4hgf-2.12-old curses hacks+minor 3.2 formalizations
X#:08-01-1990-21:39-wht at n4hgf-add Dell make file
X#:08-01-1990-12:26-wht at n4hgf-2.11-try to support ISC 1.x.x
X#:07-28-1990-18:07-wht at n4hgf-2.10 release
X#:07-28-1990-14:51-wht at n4hgf-creation
X
X#------------> CFLAGS
XCFLAGS = -c -O -DSVR31
X
X#------------> LIB
XLIB = -lcurses -lmalloc -lc_s
X
X#------------> KMEMGRP
XKMEMGRP = sys
X
X#------------> BINDIR
XBINDIR = /usr/local/bin
X
XLDFLAGS = -s
X
XVERSION = 2.20
X
X#handle Sys V make "feature" of using SHELL
XSHELL = /bin/sh
X
X#FCRC = fcrc -u $*.c ;
X.c.o:; $(FCRC) $(CC) $(CFLAGS) $*.c
X
XSRC = \
X u386mon.c\
X detail.c\
X det_proc.c\
X disputil.c\
X kludge.c\
X libkmem.c\
X libmem.c\
X libpanel.c\
X libswap.c\
X libnlsym.c\
X nlsym.c\
X proc.c\
X tune.c\
X var.c
X
XHDR = \
X config.h\
X libkmem.h\
X libmem.h\
X libpanel.h\
X libswap.h\
X libnlsym.h\
X lint_args.h\
X nlsym.h\
X u386mon.h
X
XNLSYM_OBJ =\
X nlsym.o
X
XU386MON_OBJ =\
X u386mon.o\
X detail.o\
X det_proc.o\
X proc.o\
X tune.o\
X var.o\
X kludge.o\
X disputil.o\
X libkmem.o\
X libmem.o\
X libswap.o\
X libnlsym.o\
X libpanel.o
X
XSHARFLS = \
X README\
X EXPLAIN\
X Makefile.sco\
X Makefile.isc1\
X Makefile.isc2\
X Makefile.dell\
X Makefile.s2\
X Makefile.sVr31\
X $(SRC)\
X $(HDR)\
X renice/Makefile\
X renice/renice.c\
X panel/README\
X panel/panel.3\
X panel/ptest.c\
X panel/Makefile
X
Xall: nlsym u386mon
X
X#must run as root
Xinstall: all
X mv $(BINDIR)/nlsym $(BINDIR)/nlsym.old
X cp nlsym $(BINDIR)
X chown bin $(BINDIR)/nlsym
X chgrp bin $(BINDIR)/nlsym
X chmod 711 $(BINDIR)/nlsym
X mv $(BINDIR)/u386mon $(BINDIR)/u386mon.old
X cp u386mon $(BINDIR)
X chown bin $(BINDIR)/u386mon
X chgrp $(KMEMGRP) $(BINDIR)/u386mon
X chmod 2711 $(BINDIR)/u386mon
X chmod g+r /dev/swap
X $(BINDIR)/nlsym
X @echo ' ';echo 'csh users rehash before executing'
X
Xnlsym: $(NLSYM_OBJ)
X $(CC) $(LDFLAGS) -o $@ $(NLSYM_OBJ) $(LIB)
X
Xu386mon: $(U386MON_OBJ)
X $(CC) $(LDFLAGS) -o $@ $(U386MON_OBJ) $(LIB)
X
X/unix.nlsym: nlsym /unix
X $(BINDIR)/nlsym
X chmod 644 /unix.nlsym
X
X#not delivered
Xsrc.fls: $(SRC) Makefile
X ls $(SRC) > src.fls
Xlint_args: src.fls
X echo ' ' > lint_args.h
X csh zgcc src.fls lint_args.h $(CFLAGS)
X
Xclean:
X rm -f $(U386MON_OBJ) $(NLSYM_OBJ) \
X core u386mon.lint Makefile.bak src.fls mkdep.* cscope.out tags a.out
X
Xclobber: clean
X rm -f nlsym u386mon
X
Xlint:
X lint -ux *.c > u386mon.lint
X
X#for shar 3.27 or later
Xshar:
X shar -a -n u386mon.$(VERSION) -l 55 -o $(VERSION).sh $(SHARFLS)
X
X# MAKE DEPEND: regenerate .c:.h, .ol:.c, .ol:.asm dependencies automatically
X#
Xdepend:
X rm -f mkdep.rule.tmp
X if test '$(SRC)' ;\
X then (grep '^#include' $(SRC) \
X | sed -e 's?:[^<]*<\([^>]*\)>.*?: /usr/include/\1?'\
X -e 's?:[^"]*"\([^"]*\)".*?: \1?'\
X -e 's?\(.*\)\.c?\1.o?'\
X >> mkdep.rule.tmp) ;\
X fi
X
X echo 1 >mkdep.ex.tmp
X echo '/^# DO NOT DELETE THIS LINE' >>mkdep.ex.tmp
X echo '.+1,$$d' >>mkdep.ex.tmp
X echo 'r mkdep.rule.tmp' >> mkdep.ex.tmp
X echo 'w' >> mkdep.ex.tmp
X cp Makefile.sVr31 Makefile.new
X ex Makefile.new < mkdep.ex.tmp
X rm mkdep.ex.tmp mkdep.rule.tmp
X echo '# DEPENDENCIES MUST END AT END OF FILE' >>Makefile.new
X echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY'>>Makefile.new
X echo '# see make depend above'>>Makefile.new
X mv Makefile.sVr31 Makefile.bak
X mv Makefile.new Makefile.sVr31
X
X# DO NOT DELETE THIS LINE
Xu386mon.o: config.h
Xu386mon.o: /usr/include/curses.h
Xu386mon.o: libpanel.h
Xu386mon.o: /usr/include/signal.h
Xu386mon.o: /usr/include/string.h
Xu386mon.o: /usr/include/fcntl.h
Xu386mon.o: /usr/include/nlist.h
Xu386mon.o: /usr/include/errno.h
Xu386mon.o: /usr/include/time.h
Xu386mon.o: /usr/include/sys/types.h
Xu386mon.o: /usr/include/sys/lock.h
Xu386mon.o: /usr/include/sys/utsname.h
Xu386mon.o: /usr/include/sys/stat.h
Xu386mon.o: /usr/include/sys/param.h
Xu386mon.o: /usr/include/sys/tuneable.h
Xu386mon.o: /usr/include/sys/sysinfo.h
Xu386mon.o: /usr/include/sys/sysmacros.h
Xu386mon.o: /usr/include/sys/immu.h
Xu386mon.o: /usr/include/sys/region.h
Xu386mon.o: /usr/include/sys/proc.h
Xu386mon.o: /usr/include/sys/var.h
Xu386mon.o: /usr/include/sys/swap.h
Xu386mon.o: /usr/include/sys/trap.h
Xu386mon.o: nlsym.h
Xu386mon.o: libkmem.h
Xu386mon.o: libmem.h
Xu386mon.o: libswap.h
Xu386mon.o: libnlsym.h
Xu386mon.o: u386mon.h
Xdetail.o: config.h
Xdetail.o: /usr/include/curses.h
Xdetail.o: /usr/include/signal.h
Xdetail.o: /usr/include/string.h
Xdetail.o: /usr/include/fcntl.h
Xdetail.o: /usr/include/nlist.h
Xdetail.o: /usr/include/errno.h
Xdetail.o: /usr/include/time.h
Xdetail.o: /usr/include/pwd.h
Xdetail.o: /usr/include/sys/types.h
Xdetail.o: /usr/include/utmp.h
Xdetail.o: /usr/include/sys/utsname.h
Xdetail.o: /usr/include/sys/stat.h
Xdetail.o: /usr/include/sys/param.h
Xdetail.o: /usr/include/sys/tuneable.h
Xdetail.o: /usr/include/sys/sysinfo.h
Xdetail.o: /usr/include/sys/sysmacros.h
Xdetail.o: /usr/include/sys/immu.h
Xdetail.o: /usr/include/sys/region.h
Xdetail.o: /usr/include/sys/proc.h
Xdetail.o: /usr/include/sys/var.h
Xdetail.o: nlsym.h
Xdetail.o: libkmem.h
Xdetail.o: libnlsym.h
Xdetail.o: u386mon.h
Xdet_proc.o: config.h
Xdet_proc.o: /usr/include/curses.h
Xdet_proc.o: /usr/include/signal.h
Xdet_proc.o: /usr/include/string.h
Xdet_proc.o: /usr/include/fcntl.h
Xdet_proc.o: /usr/include/nlist.h
Xdet_proc.o: /usr/include/errno.h
Xdet_proc.o: /usr/include/time.h
Xdet_proc.o: /usr/include/pwd.h
Xdet_proc.o: /usr/include/sys/types.h
Xdet_proc.o: /usr/include/utmp.h
Xdet_proc.o: /usr/include/sys/stat.h
Xdet_proc.o: /usr/include/sys/param.h
Xdet_proc.o: /usr/include/sys/tuneable.h
Xdet_proc.o: /usr/include/sys/sysinfo.h
Xdet_proc.o: /usr/include/sys/sysmacros.h
Xdet_proc.o: /usr/include/sys/immu.h
Xdet_proc.o: /usr/include/sys/region.h
Xdet_proc.o: /usr/include/sys/proc.h
Xdet_proc.o: /usr/include/sys/fs/s5dir.h
Xdet_proc.o: /usr/include/sys/user.h
Xdet_proc.o: /usr/include/sys/var.h
Xdet_proc.o: nlsym.h
Xdet_proc.o: libkmem.h
Xdet_proc.o: libmem.h
Xdet_proc.o: libswap.h
Xdet_proc.o: libnlsym.h
Xdet_proc.o: u386mon.h
Xdisputil.o: config.h
Xdisputil.o: /usr/include/curses.h
Xdisputil.o: /usr/include/sys/types.h
Xdisputil.o: u386mon.h
Xkludge.o: /usr/include/curses.h
Xlibkmem.o: /usr/include/sys/types.h
Xlibkmem.o: /usr/include/fcntl.h
Xlibkmem.o: libkmem.h
Xlibmem.o: /usr/include/sys/types.h
Xlibmem.o: /usr/include/fcntl.h
Xlibmem.o: libmem.h
Xlibpanel.o: config.h
Xlibpanel.o: /usr/include/curses.h
Xlibpanel.o: u386mon.h
Xlibswap.o: /usr/include/sys/types.h
Xlibswap.o: /usr/include/fcntl.h
Xlibswap.o: libswap.h
Xlibnlsym.o: config.h
Xlibnlsym.o: /usr/include/stdio.h
Xlibnlsym.o: /usr/include/sys/types.h
Xlibnlsym.o: /usr/include/sys/stat.h
Xlibnlsym.o: /usr/include/fcntl.h
Xlibnlsym.o: /usr/include/nlist.h
Xlibnlsym.o: nlsym.h
Xlibnlsym.o: libnlsym.h
Xnlsym.o: config.h
Xnlsym.o: /usr/include/stdio.h
Xnlsym.o: /usr/include/sys/types.h
Xnlsym.o: /usr/include/sys/stat.h
Xnlsym.o: /usr/include/fcntl.h
Xnlsym.o: /usr/include/nlist.h
Xnlsym.o: nlsym.h
Xproc.o: config.h
Xproc.o: /usr/include/curses.h
Xproc.o: /usr/include/sys/types.h
Xproc.o: /usr/include/sys/param.h
Xproc.o: /usr/include/sys/immu.h
Xproc.o: /usr/include/sys/region.h
Xproc.o: /usr/include/sys/proc.h
Xproc.o: /usr/include/sys/var.h
Xproc.o: /usr/include/nlist.h
Xproc.o: nlsym.h
Xproc.o: libkmem.h
Xproc.o: libnlsym.h
Xproc.o: u386mon.h
Xtune.o: config.h
Xtune.o: /usr/include/curses.h
Xtune.o: /usr/include/sys/types.h
Xtune.o: /usr/include/sys/tuneable.h
Xtune.o: u386mon.h
Xvar.o: config.h
Xvar.o: /usr/include/curses.h
Xvar.o: /usr/include/sys/types.h
Xvar.o: /usr/include/sys/var.h
Xvar.o: u386mon.h
X# DEPENDENCIES MUST END AT END OF FILE
X# IF YOU PUT STUFF HERE IT WILL GO AWAY
X# see make depend above
SHAR_EOF
$TOUCH -am 0810141890 Makefile.sVr31 &&
chmod 0644 Makefile.sVr31 ||
echo "restore of Makefile.sVr31 failed"
Wc_c="`wc -c < Makefile.sVr31`"
test 7829 -eq "$Wc_c" ||
echo Makefile.sVr31: original size 7829, current size $Wc_c
# ============= bootinfo.c ==============
echo "x - extracting bootinfo.c (Text)"
sed 's/^X//' << 'SHAR_EOF' > bootinfo.c &&
X/*+-------------------------------------------------------------------------
X bootinfo.c - u386mon bootinfo struct display
X
X Defined functions:
X bmemf_text(flags)
X display_bootinfo(win,y,x)
X
XWe try to be dynamic with memory block counts, but if the sum of
Xmemavailcnt and memusedcnt ever exceeds 7, we will lose in 24 line
Xsessions (8 in 25 line, 9 in 43 line)
X
X
X--------------------------------------------------------------------------*/
X/*+:EDITS:*/
X/*:08-10-1990-14:12-jmd at p1so/wht at n4hgf-2.20-add Tandem Integrity S2 */
X/*:08-07-1990-14:24-wht at n4hgf-nba@sysware.sysware.dk S5R31 updates */
X/*:08-02-1990-15:35-wht at n4hgf-2.12-old curses hacks+minor 3.2 formalizations */
X/*:07-28-1990-18:06-wht at n4hgf-2.10 release */
X/*:07-11-1990-17:19-root at n4hgf-more input from trb at ima.ima.isc.com */
X/*:07-04-1990-01:28-root at n4hgf-alan@cms2.lonestar.org reported missing M_ */
X/*:06-27-1990-01:57-wht at n4hgf-1.10-incorporate suggestions from alpha testers */
X/*:06-25-1990-04:14-wht at n4hgf-1.02-better error handling */
X/*:06-25-1990-03:18-wht at n4hgf-ODT/3.2.1 has B_MEM_CANTDMA not B_MEM_NODMA */
X/*:06-24-1990-20:53-wht at n4hgf-v1.01-add ISC support thanks to peter at radig.de */
X/*:06-21-1990-14:26-r at n4hgf-version x0.12 seems bug free */
X/*:06-17-1990-14:59-wht-creation */
X
X#include "config.h"
X#if defined(HAS_BOOTINFO)
X#define M_TERMINFO
X#include <curses.h>
X#undef timeout /* conflict in curses.h and bootinfo.h per trb at ima.ima.isc.com */
X#undef reg /* per nba at sysware.sysware.dk */
X#ifdef NATIVE_PANELS
X# include <panel.h>
X#else
X# include "libpanel.h"
X#endif
X#include <sys/types.h>
X#include <sys/bootinfo.h>
X#include "u386mon.h"
X
X/*+-------------------------------------------------------------------------
X bmemf_text(flags)
X--------------------------------------------------------------------------*/
Xchar *
Xbmemf_text(flags)
Xulong flags;
X{
Xstatic char hex_errant[16];
Xulong orig_flags = flags;
X
X#if defined(B_MEM_DOWN) /* SCO only */
X flags &= ~B_MEM_DOWN;
X#endif
X#if defined(B_MEM_BASE) /* ISC only (or is it SVR3.2.2?) */
X flags &= ~B_MEM_BASE;
X#endif
X#if defined(B_MEM_EXPANS) /* ISC */
X flags &= ~B_MEM_EXPANS;
X#endif
X#if defined(B_MEM_SHADOW) /* ISC */
X flags &= ~B_MEM_SHADOW;
X#endif
X#if defined(B_MEM_TREV) /* ISC */
X flags &= ~B_MEM_TREV;
X#endif
X
X if(!flags)
X return(" ");
X switch(flags)
X {
X#if defined(B_MEM_RSRVD)
X case B_MEM_RSRVD: return("RSVD");
X#endif
X#if defined(B_MEM_KBSS)
X case B_MEM_KBSS: return("KBSS");
X#endif
X#if defined(B_MEM_KTEXT)
X case B_MEM_KTEXT: return("KTXT");
X#endif
X#if defined(B_MEM_KDATA)
X case B_MEM_KDATA: return("KDTA");
X#endif
X#if defined(B_MEM_NODMA)
X case B_MEM_NODMA: return("NODM");
X#endif
X#if defined(B_MEM_CANTDMA)
X case B_MEM_CANTDMA: return("NODM");
X#endif
X }
X sprintf(hex_errant,"%04x",(ushort)orig_flags);
X return(hex_errant);
X} /* end of bmemf_text */
X
X/*+-------------------------------------------------------------------------
X ISC_machinetype_text(machine)
X--------------------------------------------------------------------------*/
X#if defined(ME_COMPAQVGA) /* ISC machdep.h */
Xchar *
XISC_machinetype_text(machine)
Xunsigned char machine;
X{
X switch(machine)
X {
X#if defined(M_UNKNOWN) /* some ISC bootinfo.h do not have these */
X case M_UNKNOWN:
X return("");
X break;
X#endif
X#if defined(M_COMPAQ)
X case M_COMPAQ:
X return("Compaq");
X break;
X#endif
X#if defined(M_PS2)
X case M_PS2:
X return("PS/2");
X break;
X#endif
X#if defined(M_AT)
X case M_AT:
X return("Generic 386");
X break;
X#endif
X#if defined(M_ATT)
X case M_ATT:
X return("AT&T 6386");
X break;
X#endif
X#if defined(M_ATT5)
X case M_ATT5:
X return("AT&T 6386");
X break;
X#endif
X#if defined(M_M380)
X case M_M380:
X return("Olivetti M380");
X break;
X#endif
X#if defined(M_DELL)
X case M_DELL:
X return("Dell 386");
X break;
X#endif
X#if defined(M_D325)
X case M_D325:
X return("Dell 325");
X break;
X#endif
X#if defined(M_ALR)
X case M_ALR:
X return("Adv Logic Res");
X break;
X#endif
X#if defined(M_ZDS)
X case M_ZDS:
X return("Zenith Data");
X break;
X#endif
X }
X return("i386");
X} /* end of ISC_machinetype_text */
X#endif
X
X/*+-------------------------------------------------------------------------
X ISC_displaytype_text(adapter)
X--------------------------------------------------------------------------*/
X#if defined(ME_COMPAQVGA) /* ISC machdep.h */
Xchar *
XISC_displaytype_text(adapter)
Xunsigned char adapter;
X{
X
X switch(adapter)
X {
X case ME_UNKNOWN:
X return("unknown to sys");
X break;
X case ME_EGA:
X return("EGA");
X break;
X case ME_CGA80:
X return("CGA");
X break;
X case ME_MONO:
X return("MONO");
X break;
X case ME_COMPAQHR:
X return("Compaq mono");
X break;
X case ME_Z449:
X return("Zenith Z449");
X break;
X case ME_T5100:
X return("Toshiba T5100");
X break;
X case ME_COMPAQVGA:
X return("Compaq VGA");
X break;
X case ME_OTHERVGA:
X return("VGA");
X break;
X#if defined(ME_PVGA1)
X case ME_PVGA1:
X return("Paradise VGA1");
X break;
X#endif /*ME_PVGA1*/
X#if defined(ME_V7VGA)
X case ME_V7VGA:
X return("Video 7 VGA");
X break;
X#endif /*ME_V7VGA*/
X }
X return("???");
X} /* end of ISC_displaytype_text */
X#endif
X
X/*+-------------------------------------------------------------------------
X display_bootinfo(win,y,x)
X--------------------------------------------------------------------------*/
Xvoid
Xdisplay_bootinfo(win,y,x)
XWINDOW *win;
Xint y;
Xint x;
X{
Xregister itmp;
Xregister struct bootmem *bmem;
X
X use_cp(win,cpBANNER);
X wmove(win,y++,x);
X waddstr(win,"-- Bootinfo ----------");
X#if defined(M_UNIX) /* ISC doesn't have this in struct */
X wmove(win,y++,x);
X disp_static_long(win,"basemem ","%7ldk ",bootinfo.basemem / 1024);
X wmove(win,y++,x);
X disp_static_long(win,"extmem ","%7ldk ",bootinfo.extmem / 1024);
X#endif
X#if defined(ME_COMPAQVGA) /* ISC machdep.h */
X wmove(win,y++,x);
X wprintw(win,"machine %14.14s",
X ISC_machinetype_text(bootinfo.machenv.machine));
X wmove(win,y++,x);
X wprintw(win,"disp %17.17s",
X ISC_displaytype_text(bootinfo.machenv.adapter));
X#endif
X wmove(win,y++,x);
X disp_static_long(win,"bflags ","%08lx ",bootinfo.bootflags);
X
X wmove(win,y++,x); waddstr(win,"memory available ");
X for(itmp = 0; itmp < bootinfo.memavailcnt; itmp++)
X {
X bmem = &bootinfo.memavail[itmp];
X#if defined(B_MEM_DOWN)
X if(bmem->flags & B_MEM_DOWN)
X {
X bmem->base -= bmem->extent;
X bmem->flags &= ~B_MEM_DOWN;
X }
X#endif
X wmove(win,y++,x);
X wprintw(win,"%08lx %08lx %s",bmem->base,bmem->extent,
X bmemf_text(bmem->flags));
X }
X
X wmove(win,y++,x); waddstr(win,"memory used ");
X for(itmp = 0; itmp < bootinfo.memusedcnt; itmp++)
X {
X bmem = &bootinfo.memused[itmp];
X#if defined(B_MEM_DOWN)
X if(bmem->flags & B_MEM_DOWN)
X {
X bmem->base -= bmem->extent;
X bmem->flags &= ~B_MEM_DOWN;
X }
X#endif
X wmove(win,y++,x);
X wprintw(win,"%08lx %08lx %s",bmem->base,bmem->extent,
X bmemf_text(bmem->flags));
X }
X
X} /* end of display_bootinfo */
X
X#endif /* HAS_BOOTINFO */
X/* vi: set tabstop=4 shiftwidth=4: */
X/* end of bootinfo.c */
SHAR_EOF
$TOUCH -am 0810141890 bootinfo.c &&
chmod 0644 bootinfo.c ||
echo "restore of bootinfo.c failed"
Wc_c="`wc -c < bootinfo.c`"
test 6946 -eq "$Wc_c" ||
echo bootinfo.c: original size 6946, current size $Wc_c
# ============= detail.c ==============
echo "x - extracting detail.c (Text)"
sed 's/^X//' << 'SHAR_EOF' > detail.c &&
X/*+-------------------------------------------------------------------------
X detail.c - UNIX 386 system monitor detail window
X
X Defined functions:
X detail_init()
X detail_panel_cmd(cmd)
X detail_panel_update()
X detpanel_destroy()
X detpanel_extra_init()
X detpanel_extra_update()
X detpanel_ps_init(full43)
X detpanel_ps_update()
X detpanel_sio_init()
X detpanel_sio_update()
X
X--------------------------------------------------------------------------*/
X/*+:EDITS:*/
X/*:08-10-1990-14:12-jmd at p1so/wht at n4hgf-2.20-add Tandem Integrity S2 */
X/*:08-07-1990-14:24-wht at n4hgf-nba@sysware.sysware.dk S5R31 updates */
X/*:08-02-1990-15:36-wht at n4hgf-2.12-old curses hacks+minor 3.2 formalizations */
X/*:07-28-1990-18:06-wht at n4hgf-2.10 release */
X/*:07-10-1990-14:53-root at n4hgf-clear msg line on detail cmd - fix 24-line bug */
X/*:06-27-1990-01:57-wht at n4hgf-1.10-incorporate suggestions from alpha testers */
X/*:06-25-1990-17:34-wht at n4hgf-add detail extra for 25 line tubes */
X/*:06-25-1990-04:14-wht at n4hgf-1.02-better error handling */
X/*:06-24-1990-20:53-wht at n4hgf-v1.01-add ISC support thanks to peter at radig.de */
X/*:06-21-1990-14:26-r at n4hgf-version x0.12 seems bug free */
X/*:06-15-1990-18:32-wht at n4hgf-creation */
X
X#include "config.h"
X#define M_TERMINFO
X#include <curses.h>
X#undef timeout /* conflict in curses.h and bootinfo.h per trb at ima.ima.isc.com */
X#undef reg /* per nba at sysware.sysware.dk */
X#ifdef NATIVE_PANELS
X# include <panel.h>
X#else
X# include "libpanel.h"
X#endif
X#include <signal.h>
X#include <string.h>
X#include <fcntl.h>
X#include <nlist.h>
X#include <errno.h>
X#include <time.h>
X#include <pwd.h>
X#include <sys/types.h>
X#include <utmp.h>
X#include <sys/utsname.h>
X#include <sys/stat.h>
X#undef NGROUPS_MAX
X#undef NULL
X#include <sys/param.h>
X#include <sys/tuneable.h>
X#include <sys/sysinfo.h>
X#include <sys/sysmacros.h>
X#include <sys/immu.h>
X#include <sys/region.h>
X#if defined(mips)
X#include <sys/sbd.h>
X#endif
X#include <sys/proc.h>
X#include <sys/var.h>
X
X#include "nlsym.h"
X#include "libkmem.h"
X#include "libnlsym.h"
X#include "u386mon.h"
X
X#define DPT_NONE 0
X#define DPT_PS 1
X#define DPT_PS_LONG 2
X#define DPT_EXTRA 3
X#define DPT_SIO 4
X
XPANEL *mkpanel();
X
Xextern PANEL *pscr;
Xextern WINDOW *wscr;
X
XPANEL *pdet;
XWINDOW *wdet = (WINDOW *)0;
Xu_char detpanel_type = DPT_NONE;
Xint detpanel_length;
Xint detpanel_cols;
X
X/*+-------------------------------------------------------------------------
X detpanel_ps_init(full43)
X--------------------------------------------------------------------------*/
Xvoid
Xdetpanel_ps_init(full43)
Xint full43;
X{
X/*
X#define DETAIL_PS_COLS ((LINES >= 43) ? EXTRA4_TLX - 1 : PER_SEC4_TLX)
Xdetpanel_cols = DETAIL_PS_COLS;
X*/
X
X#define DETAIL_PS_TLY ((LINES >= 43) ? ((full43)?PER_SEC_TLY:PER_SEC_TLY+14)\
X : PER_SEC_TLY)
X
X#define DETAIL_PS_LENGTH (MSG_TLY - DETAIL_PS_TLY)
X
X detpanel_length = DETAIL_PS_LENGTH;
X detpanel_cols = COLS;
X if(!(pdet = mkpanel(detpanel_length,detpanel_cols,DETAIL_PS_TLY,0,"ps")))
X {
X leave_text("cannot make detail panel",1);
X }
X show_panel(pdet);
X top_panel(pdet);
X wdet = panel_window(pdet);
X display_proc_stats(wdet,1);
X
X} /* end of detpanel_ps_init */
X
X/*+-------------------------------------------------------------------------
X detpanel_ps_update()
X--------------------------------------------------------------------------*/
Xvoid
Xdetpanel_ps_update()
X{
X display_proc_stats(wdet,0);
X} /* end of detpanel_ps_update */
X
X/*+-------------------------------------------------------------------------
X detpanel_extra_init()
X--------------------------------------------------------------------------*/
Xvoid
Xdetpanel_extra_init()
X{
X#define DETAIL_EXTRA_TLY PER_SEC_TLY
X#define DETAIL_EXTRA_LENGTH (MSG_TLY - DETAIL_EXTRA_TLY)
X
X detpanel_length = DETAIL_EXTRA_LENGTH;
X detpanel_cols = COLS;
X if(!(pdet = mkpanel(detpanel_length,detpanel_cols,DETAIL_EXTRA_TLY,0,"ex")))
X {
X leave_text("cannot make detail panel",1);
X }
X show_panel(pdet);
X top_panel(pdet);
X wdet = panel_window(pdet);
X display_var(wdet,0,EXTRA1_TLX);
X#if defined(HAS_BOOTINFO)
X display_bootinfo(wdet,0,EXTRA2_TLX);
X#endif
X display_tune(wdet,0,EXTRA3_TLX);
X display_proc(wdet,0,EXTRA4_TLX);
X
X} /* end of detpanel_extra_init */
X
X/*+-------------------------------------------------------------------------
X detpanel_extra_update()
X--------------------------------------------------------------------------*/
Xvoid
Xdetpanel_extra_update()
X{
X display_proc(wdet,0,EXTRA4_TLX);
X} /* end of detpanel_extra_update */
X
X/*+-------------------------------------------------------------------------
X detpanel_sio_init() - SCO only serial I/O display
X--------------------------------------------------------------------------*/
X#if defined(M_UNIX)
Xvoid
Xdetpanel_sio_init()
X{
X#define DETAIL_SIO_TLY ((LINES >= 43) ? (PER_SEC_TLY+14) : PER_SEC_TLY)
X#define DETAIL_SIO_LENGTH (CMD_TLY - DETAIL_SIO_TLY)
X
X detpanel_length = DETAIL_SIO_LENGTH;
X detpanel_cols = COLS;
X if(!(pdet = mkpanel(detpanel_length,detpanel_cols,DETAIL_SIO_TLY,0,"sio")))
X {
X leave_text("cannot make detail panel",1);
X }
X show_panel(pdet);
X top_panel(pdet);
X wdet = panel_window(pdet);
X display_sio_summary(wdet,1);
X} /* end of detpanel_sio_init */
X#endif
X
X/*+-------------------------------------------------------------------------
X detpanel_sio_update()
X--------------------------------------------------------------------------*/
X#if defined(M_UNIX)
Xvoid
Xdetpanel_sio_update()
X{
X display_sio_summary(wdet,0);
X} /* end of detpanel_sio_update */
X#endif
X
X/*+-------------------------------------------------------------------------
X detpanel_destroy()
X--------------------------------------------------------------------------*/
Xvoid
Xdetpanel_destroy()
X{
X hide_panel(pdet);
X delwin(wdet);
X wdet = (WINDOW *)0;
X del_panel(pdet);
X top_panel(pscr);
X disp_msg(cpINFO,"");
X detpanel_type = DPT_NONE;
X} /* end of detpanel_destroy */
X
X/*+-------------------------------------------------------------------------
X detail_panel_cmd(cmd)
X
X command: m main screen
X p proc status
X--------------------------------------------------------------------------*/
Xvoid
Xdetail_panel_cmd(cmd)
Xchtype cmd;
X{
X disp_msg(cpINFO,"");
X switch(cmd)
X {
X case 'm':
X if(detpanel_type != DPT_NONE)
X detpanel_destroy();
X break;
X
X case 'P':
X if(detpanel_type == DPT_PS_LONG)
X break;
X if(detpanel_type != DPT_NONE)
X detpanel_destroy();
X detpanel_ps_init(1);
X detpanel_type = DPT_PS_LONG;
X break;
X
X case 'p':
X if(detpanel_type == DPT_PS)
X break;
X if(detpanel_type != DPT_NONE)
X detpanel_destroy();
X detpanel_ps_init(0);
X detpanel_type = DPT_PS;
X break;
X
X case 'e':
X if(LINES >= 43)
X break;
X if(detpanel_type == DPT_EXTRA)
X break;
X if(detpanel_type != DPT_NONE)
X detpanel_destroy();
X detpanel_extra_init();
X detpanel_type = DPT_EXTRA;
X break;
X
X#if defined(M_UNIX)
X case 's':
X if(detpanel_type == DPT_SIO)
X break;
X if(detpanel_type != DPT_NONE)
X detpanel_destroy();
X detpanel_sio_init();
X detpanel_type = DPT_SIO;
X break;
X#endif
X
X }
X} /* end of detail_panel_cmd */
X
X/*+-------------------------------------------------------------------------
X detail_panel_update()
X--------------------------------------------------------------------------*/
Xvoid
Xdetail_panel_update()
X{
X switch(detpanel_type)
X {
X case DPT_PS:
X case DPT_PS_LONG:
X detpanel_ps_update();
X break;
X case DPT_EXTRA:
X detpanel_extra_update();
X break;
X#if defined(M_UNIX)
X case DPT_SIO:
X detpanel_sio_update();
X break;
X#endif
X }
X} /* end of detail_panel_update */
X
X/*+-------------------------------------------------------------------------
X detail_init()
X--------------------------------------------------------------------------*/
Xvoid
Xdetail_init()
X{
X det_proc_init(); /* see det_proc.c */
X} /* end of detail_init */
X
X/* vi: set tabstop=4 shiftwidth=4: */
X/* end of detail.c */
SHAR_EOF
$TOUCH -am 0810141890 detail.c &&
chmod 0644 detail.c ||
echo "restore of detail.c failed"
Wc_c="`wc -c < detail.c`"
test 7827 -eq "$Wc_c" ||
echo detail.c: original size 7827, current size $Wc_c
true || echo "restore of detail.c failed"
echo "End of part 2, continue with part 3"
exit 0
More information about the Comp.sources.misc
mailing list