Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/17/84; site ittvax.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!bellcore!decvax!ittvax!long From: long@ittvax.UUCP Newsgroups: net.sources Subject: Re: MON - added screendump (Part 1 of 2) [diffs ] Message-ID: <1552@ittvax.UUCP> Date: Thu, 20-Dec-84 21:40:41 EST Article-I.D.: ittvax.1552 Posted: Thu Dec 20 21:40:41 1984 Date-Received: Sat, 22-Dec-84 01:53:18 EST References: <220@unc.UUCP> Organization: ITT-ATC, Stratford Ct. Lines: 121 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