MON - added screendump (Part 1 of 2) [diffs ]
long at ittvax.UUCP
long at ittvax.UUCP
Fri Dec 21 12:40:41 AEST 1984
MON is a great help in system tuning. Just added 2 commands :
'l' - screendump to line printer
's' - appends screendump to file 'screendump'
Use 'patch' on this file.
H. Morrow Long
ITT-ATC Systems Center, Shelton, CT
path = {allegra bunker dcdvaxb dcdwest ucbvax!decvax duke eosp1 ittral
lbl-csam mit-eddie psuvax1 purdue qubix qumix research sii
tmmnet twg uf-cgrl wxlvax yale}!ittvax!long
diff -c src5/Makefile src/Makefile
*** src5/Makefile Thu Dec 20 19:50:19 1984
--- src/Makefile Thu Dec 20 20:20:04 1984
***************
*** 3,9
#
# Beware dependencies on mon.h are not properly stated.
#
! OBJS = mon.o io.o vm.o netif.o display.o readnames.o user_count.o
all: mon
--- 3,10 -----
#
# Beware dependencies on mon.h are not properly stated.
#
! OBJS = mon.o io.o vm.o netif.o display.o readnames.o user_count.o \
! dumpit.o
all: mon
***************
*** 14,17
rm -f core *.o mon a.out
print:
! qpr mon.h mon.c io.c vm.c netif.c readnames.c display.c user_count.c
--- 15,19 -----
rm -f core *.o mon a.out
print:
! qpr mon.h mon.c io.c vm.c netif.c readnames.c display.c user_count.c \
! dumpit.c
Only in src: dumpit.c
diff -c src5/mon.8b src/mon.8b
*** src5/mon.8b Thu Dec 20 19:49:55 1984
--- src/mon.8b Thu Dec 20 20:57:43 1984
***************
*** 117,122
.s1
Commands:
^L repaints the screen.
q exits the program.
Any other character will cause the screen to be updated (thus
you can for example run "mon 100" and type single characters
--- 117,124 -----
.s1
Commands:
^L repaints the screen.
+ l dumps a copy of the screen to the lineprinter
+ s saves (appends) a copy of the screen to file "screendump"
q exits the program.
Any other character will cause the screen to be updated (thus
you can for example run "mon 100" and type single characters
diff -c src5/mon.c src/mon.c
*** src5/mon.c Thu Dec 20 19:50:26 1984
--- src/mon.c Thu Dec 20 20:40:08 1984
***************
*** 131,140
i = select(2, &tin, (int *)0, (int *)0, &tintv);
if (i && tin) {
i = getchar();
! if (i == 12)
! dispinit();
! else if (i == 'q')
! done();
}
}
}
--- 131,162 -----
i = select(2, &tin, (int *)0, (int *)0, &tintv);
if (i && tin) {
i = getchar();
! switch(i)
! {
! FILE *Outfile,*popen();
!
! case 12: /* ctl-L */
! dispinit();
! break;
! case 'l':
! Outfile = popen("lpr -Pip2","w");
! if (Outfile > 0 )
! {
! dumpit(Outfile);
! fclose(Outfile);
! }
! break;
! case 's':
! Outfile = fopen("screendump","a");
! if (Outfile > 0 )
! {
! dumpit(Outfile);
! fclose(Outfile);
! }
! break;
! case 'q':
! done();
! }
}
}
}
Only in src: screendump
More information about the Comp.sources.unix
mailing list