home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-11-21 | 52.1 KB | 1,617 lines |
- Newsgroups: comp.sources.misc
- Path: sparky!kent
- From: Warren Tucker <wht@n4hgf.Mt-Park.GA.US>
- Subject: v33i110: u386mon - SVR3 performance/status monitor v2.60, Part01/09
- Message-ID: <csm-v33i110=u386mon.195754@sparky.IMD.Sterling.COM>
- Followup-To: comp.sources.d
- X-Md4-Signature: 1c1e8413ee7e3a48607ac10acef5a6cb
- Sender: kent@sparky.imd.sterling.com (Kent Landfield)
- Organization: Sterling Software
- Date: Sun, 22 Nov 1992 01:58:53 GMT
- Approved: kent@sparky.imd.sterling.com
- Lines: 1603
-
- Submitted-by: Warren Tucker <wht@n4hgf.Mt-Park.GA.US>
- Posting-number: Volume 33, Issue 110
- Archive-name: u386mon/part01
- Environment: SYSVR3
- Supersedes: u386mon: Volume 22, Issue 3-9
-
- This is u386mon 2.60, a "performance" monitor, ostensibly for SCO
- UNIX V/386 and ISC 386/ix on 386/486 processors, although it has
- been ported to a 68k VME System V Release 3.1 platform and to ISC
- 1.0.x and to the Tandem Integrity S2 (both S5R3.0-ish). Also, a
- renice is included as an example of alternate uses of the
- kmem/mem/swap utility objects.
-
- U386mon previous to 2.60 was tested on SCO 3.2.0, 3.2.1, 3.2v2
- and ODT and ISC 1.0.x, 2.0.x and 2.2.x, Tandem Integrity S2
- NonStop-UX and at least one MC68000 VME-based Sys V Rel 3.1
- system. Version 2.60 has been tested only on ODT 2.0 (3.2v4) but
- problems with the other environments are not anticipated :->.
-
- Bundled with u386mon are uusnap and siomon, tools which use the
- same kernel symbol facility as u386mon. These tools display
- UUCP and serial I/O dynamically. Neither are as robustly portable
- as u386mon, but they ceratinly work well with SCO 3.2xx.
-
- #!/bin/sh
- # This is u386mon.2.60, a shell archive (shar 3.461)
- # made 10/07/1992 15:44 UTC by wht@n4hgf
- # Source directory /u1/src/u386mon
- #
- # existing files will NOT be overwritten unless -c is specified
- #
- # This shar contains:
- # length mode name
- # ------ ---------- ------------------------------------------
- # 22853 -rw-r--r-- README
- # 1033 -rw-r--r-- CHANGES
- # 9387 -rw-r--r-- Make.dell
- # 3945 -rw-r--r-- Make.esix
- # 8647 -rw-r--r-- Make.isc1
- # 9665 -rw-r--r-- Make.isc2
- # 8292 -rw-r--r-- Make.s2
- # 8422 -rw-r--r-- Make.sVr31
- # 11017 -rw-r--r-- Make.sco
- # 11152 -rw-r--r-- Make.sco.gcc
- # 1393 -rw-r--r-- EXPLAIN
- # 40718 -rw-r--r-- u386mon.c
- # 7500 -rw-r--r-- bootinfo.c
- # 12316 -rw-r--r-- detail.c
- # 21829 -rw-r--r-- det_proc.c
- # 13767 -rw-r--r-- det_sio.c
- # 5746 -rw-r--r-- det_stream.c
- # 10833 -rw-r--r-- det_table.c
- # 5222 -rw-r--r-- det_wd.c
- # 6172 -rw-r--r-- disputil.c
- # 1282 -rw-r--r-- kludge.c
- # 3495 -rw-r--r-- libkmem.c
- # 3235 -rw-r--r-- libmem.c
- # 20097 -rw-r--r-- libpanel.c
- # 2421 -rw-r--r-- libswap.c
- # 3346 -rw-r--r-- libnlsym.c
- # 3435 -rw-r--r-- nlsym.c
- # 4380 -rw-r--r-- proc.c
- # 2627 -rw-r--r-- tune.c
- # 2687 -rw-r--r-- var.c
- # 3105 -rw-r--r-- config.h
- # 1381 -rw-r--r-- libkmem.h
- # 1374 -rw-r--r-- libmem.h
- # 2432 -rw-r--r-- libpanel.h
- # 1302 -rw-r--r-- libswap.h
- # 1352 -rw-r--r-- libnlsym.h
- # 7817 -rw-r--r-- lint_args.h
- # 8792 -rw-r--r-- nlsym.h
- # 70 -rw-r--r-- patchlevel.h
- # 1129 -rw-r--r-- ttynm.h
- # 4824 -rw-r--r-- u386mon.h
- # 1267 -rw-r--r-- renice/Makefile
- # 4536 -rw-r--r-- renice/renice.c
- # 3147 -rw-r--r-- panel/README
- # 4935 -rw-r--r-- panel/panel.3
- # 6409 -rw-r--r-- panel/ptest.c
- # 363 -rw-r--r-- panel/Makefile
- # 2546 -rw-r--r-- siotools/Makefile
- # 2084 -rw-r--r-- siotools/README
- # 3580 -rw-r--r-- siotools/kmemsio.c
- # 782 -rw-r--r-- siotools/kmemsio.h
- # 5996 -rw-r--r-- siotools/pend.sh
- # 14992 -rw-r--r-- siotools/siomon.c
- # 1659 -rw-r--r-- siotools/utoa.c
- # 1181 -rw-r--r-- siotools/utoa.h
- # 25697 -rw-r--r-- siotools/uusnap.c
- # 3933 -rw-r--r-- siotools/wingets.c
- # 6995 -rw-r--r-- siotools/wintio.c
- # 871 -rw-r--r-- siotools/wintio.h
- # 8232 -rw-r--r-- siotools/wintty.c
- # 873 -rw-r--r-- siotools/wintty.h
- #
- # ============= README ==============
- if test -f 'README' -a X"$1" != X"-c"; then
- echo 'x - skipping README (File already exists)'
- else
- echo 'x - extracting README (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'README' &&
- Xu386mon 2.60 README - Sun Aug 30 00:29:07 EDT 1992
- X==================================================
- X
- XThis is u386mon 2.60, a "performance" monitor, ostensibly for SCO
- XUNIX V/386 and ISC 386/ix on 386/486 processors, although it has
- Xbeen ported to a 68k VME System V Release 3.1 platform and to ISC
- X1.0.x and to the Tandem Integrity S2 (both S5R3.0-ish). Also, a
- Xrenice is included as an example of alternate uses of the
- Xkmem/mem/swap utility objects.
- X
- XU386mon previous to 2.60 was tested on SCO 3.2.0, 3.2.1, 3.2v2
- Xand ODT and ISC 1.0.x, 2.0.x and 2.2.x, Tandem Integrity S2
- XNonStop-UX and at least one MC68000 VME-based Sys V Rel 3.1
- Xsystem. Version 2.60 has been tested only on ODT 2.0 (3.2v4) but
- Xproblems with the other environments are not anticipated :->.
- X
- XThese may work with other UNIX System 5 Release 3.x systems with
- Xa little work. XENIX systems have greatly different kernel
- Ximplementations and use xlist instead of nlist. These programs
- Xwill not work there; sorry. Someone reported he was working on a
- Xport to XENIX, but jct!jct's mon386 is great (posted to
- Xcomp.unix.xenix on 11 Jul 89 in 9 parts, starting with
- XMessage-ID: <278@jct.UUCP>).
- X
- XU386mon requires terminfo style curses and will use the curses
- Xcolor facility if you have it. It works best with a 43 line (or
- Xgreater) screen, but will work with a 25 line screen with some
- Xlimitations. It works very well on SCO ODT, Metro Link X11R4 and
- XISC xterms. On a Wyuse 60, the SCO color curses does some
- Xinteresting attribute mappings.
- X
- XOn a 20Mhz Compaq 386 running SCO UNIX 3.2.0, u386mon on a 43-line VGA,
- Xwith a two second update interval, appears to consume 3 to 5% of the CPU
- Xwhen in the "main" display and about 7 to 11% when displaying process
- Xstatus (NPROC, v.v_proc == 100). This is a bit expensive, but the job
- Xis sorta hard: according to prof(1)/prof(CP), 50% of the time is spent
- Xin curses. Of course, on the Tandem Integrity S2 (a MIPS based
- Xmachine), these figures were MUCH, MUCH lower :-). On a 486 33 MHz
- Xmachine, I get very much lower figures as well. In fact, the guy was so
- Xfast we found a divide by zero possibility where u386mon could run a
- Xwhole cycle without ticking the clocks, getting zero total cpu ticks
- Xover the cycle.
- X
- XAcknowledgments
- X===============
- X
- XThanks to martin@hppcmart.grenoble.hp.com (Martin Croome), who gets
- Xcomplete credit for the nice SCO STREAMS, table and winchester statistics.
- XNeils Baggesen ported/tested them on S5R3.1.
- X
- XThanks to peter@radig.de (Peter Radig), dug@kd4nc (Doug Drye),
- Xjdc@uudell.dell.com (Jeremy Chatfield), andy@rbdc (Andy Pitts),
- Xtrb@ima.ima.isc.com (Andrew Tannenbaum) for the help with ISC 386/ix.
- X
- XThanks to nba@sysware.dk (Neils Baggesen) and allbery@ncoast.org
- X(Brandon Allbery) for the System V Release 3.1 work.
- X
- XThanks to jmd@tdmsou (emory!n4hgf!tdmsou!jmd, John Dashner) for the Tandem
- XS2 work.
- X
- XThanks to Dion Johnson <dionj@sco.com>, Bob Tinsman <bobti@sco.com>
- Xand David Gurr <davidgu@sco.com> for encouragement to keep work going.
- X
- XIf I missed mentioning some work you did, please accept my apology and
- Xremind me.
- X
- XYellow Brick Road
- X=================
- X
- XRead through this and you will finally reach "How to get going" below.
- X
- XSample output (somewhat obsolete)
- X=================================
- X(with 43-line screen; a 25 line screen will be missing Var/Bootinfo/Tune/Proc
- Xon the 'main' display)
- X
- X u386mon 2.11/SCO 3.2 - n4hgf 04:39:36 wht@n4hgf
- X---- CPU --- tot usr ker brk ---------------------------------------------------
- X Instant % 93 54 39 0 uuuuuuuuuuuuuuuuuuuuuuuuuuukkkkkkkkkkkkkkkkkkk
- X 5 Sec Avg % 87 26 61 0 uuuuuuuuuuuuukkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
- X10 Sec Avg % 89 45 44 0 uuuuuuuuuuuuuuuuuuuuuukkkkkkkkkkkkkkkkkkkkkk
- X---- Wait -- tot io pio swp -- (% of real time) -------------------------------
- X Instant % 5 5 0 0 ii
- X 5 Sec Avg % 12 12 0 0 iiiiii
- X10 Sec Avg % 9 9 0 0 iiii
- X---- Sysinfo/Minfo --- (last 1000 msec activity) ------------------------------
- Xbread 5 readch 60416 pswitch 21 vfault 1 unmodsw 0
- Xbwrite 9 writch 2507 syscall 261 demand 1 unmodfl 0
- Xlread 331 rawch 2 sysread 100 pfault 15 psoutok 0
- Xlwrite 42 canch 0 syswrit 4 cw 0 psinfai 0
- Xphread 0 outch 2508 sysfork 1 steal 15 psinok 0
- Xphwrite 0 msg 0 sysexec 0 frdpgs 0 rsout 0
- Xswapin 0 sema 0 vfpg 0 rsin 0
- Xswapout 0 maxmem 5724k runque 0 sfpg 0
- Xbswapin 0 frmem 3284k runocc 0 vspg 0 pages on
- Xbswapout 0 mem used 43% swpque 0 sspg 0 swap 0
- Xiget 72 nswap 10000k swpocc 0 pnpfault 0 cache 0
- Xnamei 71 frswp 10000k wrtfault 0 file 0
- Xdirblk 92 swp used 0%
- X
- X
- X
- X-- Var --------- -- Bootinfo ---------- -- Tune --------- -- Proc ---
- Xv_autoup 10 basemem 640k t_ageintvl 9 sleep 22
- Xv_buf 600 extmem 6144k t_bdflushr 1 run 1
- Xv_clist 200 bflags 00000000 t_gpgshi 40 zombie 0
- Xv_file 200 memory available t_gpgslo 25 stop 0
- Xv_hbuf 64 00000000 000a0000 t_gpgsmsk 0x420 idle 0
- Xv_inode 200 00100000 00600000 t_maxfc 1 onproc 1
- Xv_maxpmem 0 00f40000 00060000 NODM t_maxsc 1 xbrk 0
- Xv_maxup 60 memory used t_maxumem 2560 total 24
- Xv_mount 5 00000000 00004000 RSVD t_minarmem 25 in mem 24
- Xv_pbuf 20 006bb000 00037000 KBSS t_minasmem 25
- Xv_proc 100 006f2000 0000e000 KDTA
- Xv_region 210 00fa9000 00057000 KTXT
- Xv_vhndfrac 16
- X
- XThe main display
- X================
- X
- XA brief description of reported information:
- X
- X0. The '+' and '-' command adds or subtracts one second from the
- X update interval. The value at startup is 2 seconds, the
- X range 1 to 4. Below, the terms "x1", "x5" and "x10" mean
- X "interval X 1", "interval times 5" and "interval times 10,"
- X respectively.
- X
- X You can determine the update interval by looking at the top
- X CPU histogram, labeled "Instant" for 1, "X sec" for 2-4 second
- X intervals.
- X
- X On some *fast* systems, values may be too large in 3 and 4
- X second intervals and corrupt the display. But the, you have
- X the extra CPU to run it more often :-).
- X
- X1. The CPU utilization is shown with smoothing of x1 ("instant" if
- X the update interval is 1 second), x5 and x10 seconds. Total
- X CPU usage is shown, with user, kernel and "break" subdivided.
- X Most performance utilities (vmstat) lump kernel (CPU_KERNEL)
- X and wait (CPU_WAIT) times together as kernel time. u386mon
- X considers CPU_WAIT time as idle (the CPU could have been
- X doing something if an otherwise ready process wasn't waited).
- X
- X On a color display, total cpu utilization is displayed in
- X green if the cpu utilization is below 70%, yellow if utilization
- X is between 70% and 89% and red if 90% or above.
- X
- X2. The Wait display shows the x1, x5 and x10 second smoothed
- X percentages of real time no process could be run because
- X otherwise ready to run processes were waiting on logical,
- X swap or physical I/O.
- X
- X On a color display, total wait time is displayed in green if
- X it is below 30%, yellow if utilization is between 30% and 49%
- X and red if 50% or above.
- X
- X3. Sysinfo/Minfo display shows, generally, the number of events
- X for a measured value since the last display update. For
- X example, runque shows the number of times a process was
- X placed on the run queue. An exception is the memory and swap
- X space fields: These numbers reflect absolute current
- X utilization over the period shown in the "last XXXXX msec"
- X value in the banner. Periods of 4000 milliseconds are shown
- X in red, 1500 to 3990 milliseconds in blue and less than 1500
- X milliseconds in the normal banner color.
- X
- X My guess as to the meaning of the sysinfo and minfo values is
- X in the file EXPLAIN. I am not familiar with the meanings of
- X all the items, having looked through the header files, sar
- X man pages and the other UNIX hacker-ganda I could find.
- X Comments are appreciated.
- X
- X4. If you run u386mon on a 43 line display, extra information is displayed
- X on the bottom of the screen (from the struct var v, bootinfo
- X and proc kernel databases).
- X
- X On a 24/25-line screen, the 'e' command accesses the Var/Bootinfo/
- X Tune/Proc display, overlaying the Sysinfo/Minfo display.
- X Using 'm' returns you to the main display.
- X
- X Bootinfo will be missing from version running on platforms which
- X do not support it.
- X
- X5. On a color display, static numeric values, such as maxmem appear
- X in blue (the same color as screen literals/labels). Dynamic
- X numeric values are displayed in green, with the exception of
- X total cpu and wait percentages, which appear in light green,
- X red or yellow.
- X
- X6. An "INEXACT" indication on the top line means that u386mon was
- X not scheduled quickly enough to capture accurate 1 second (nominal)
- X values. Continued INEXACT indication suggests the x5 and x10
- X second smoothed values are also wrong.
- X
- X An "INVALID" indication means u386mon was scheduled 3 or more
- X seconds late; all percentage isplays are now suspect.
- X
- X7. IN GENERAL, if you see any red characters on the display,
- X immediately take grain of salt. If you have no color screen
- X and still see red, add tequila to salt.
- X
- X8. If you are running as root, you may use the -l switch or the
- X 'l' command to lock u386mon into memory. If you do this, PLOCK
- X will appear at the top of the screen to remind you of this hoggy
- X behavior. The u386mon process will not be listed in a process
- X status display since SSYS (locked, resident) processes are not
- X shown.
- X
- X9. The ISC bootinfo field will have different information due to
- X different porting by ISC and SCO.
- X
- XProcess Status Display
- X======================
- X
- X1. Pressing 'p' causes a process status display of sorts to be
- X shown, overlaying Sysinfo/Minfo on a 25 line screen or
- X Var/Bootinfo/Tune/Proc on a 43 line screen. On a 43 line screen, 'P'
- X causes a larger ps display to be shown, overlaying Sysinfo/Minfo and
- X Var/Bootinfo/Tune/Proc.
- X
- X Sample output:
- X
- XS USER PID CPU PRI NI UCPU SCPU SIZE TTY CMD
- Xs root 148 0 26 20 0:00 0:05 108 ?? /etc/cron
- Xs wht 14946 2 39 20 0:02 0:11 224 05 TMR 01000a12
- Xs wht 14947 2 39 20 0:02 0:11 220 05 TMR 01011101
- Xs wht 14950 0 27 20 0:00 0:02 228 05 IP 01000a12
- Xs wht 14951 1 27 20 0:00 0:02 224 05 IP 01011101
- Xs wht 14952 0 27 20 0:01 0:02 228 05 TP4 01000a12
- Xs wht 14953 1 27 20 0:01 0:03 224 05 TP4 01011101
- Xs wht 14957 0 27 20 0:00 0:04 200 05 smpad.x
- Xs wht 14960 1 27 20 0:00 0:04 204 05 mmpad.x
- Xs root 15044 0 28 20 0:01 0:01 296 12 vi README
- Xs uucp 15053 0 30 26 0:00 0:00 696 ?? /usr/lib/uucp/uusched
- Xs uucp 15055 0 30 26 0:00 0:00 748 ?? UUCICO -r1 -sgatech
- Xs uucp 15060 0 28 26 0:00 0:00 768 ?? dialTBIT tty2E 2222222UC 192
- X
- X NOTES
- X a. S - two character status
- X 1st character - process status
- X s - sleeping
- X R - ready to run (might be running if u386mon were not)
- X z - zombie
- X d - stopped by debugger
- X i - idle (in creation?)
- X p - running on processor (on single CPU systems, only u386mon
- X will show this)
- X x - XBREAK - process growing or shrinking
- X 2nd character - process swap status
- X S - process is swapped
- X blank - process is in memory
- X
- X b. If the process is running with setuid, a '#' appears to
- X the right of the username.
- X
- X c. On color systems, processes ready to run are shown in yellow
- X unless they are ready, but swapped out, in which case they
- X are shown in red.
- X
- X3. Since a limited space is available for displaying process
- X status, particularly on a 25-line screen, a selective elimination
- X algorithm is used to whittle the list when insufficient room
- X is available. init (pid 1) and system/resident (SSYS)
- X processes are never displayed. When a display cycle is to begin
- X and there is not room for all of the processes to be shown,
- X processes are eliminated in the following order:
- X
- X a. 'getty', 'uugetty', 'sh', 'csh', and 'ksh'
- X b. swapped and zombie processes
- X c. no cpu processes (no cpu time during last cycle)
- X d. sleeping processes
- X
- X If there is still insufficient room, an indication to the effect
- X is displayed (tough cookies).
- X
- XDisk (Winchester) display
- X=========================
- X
- XThis display shows each disk and diskette device known to the system
- Xand performance statistics for each. Currently, the information is
- Xavailable only on SCO systems. The percentages will be inaccurate for
- Xone or two display cycles after the 'w' (winchester) selection
- Xbecomes active. Further updates may be inaccurate due to either
- Xnoisy kernel data, data capture latency, our having to guess a
- Xlot, or any combination of the above.
- X
- XSTREAMS (Net) display
- X=====================
- X
- XThis display shows STREAMS queues and buffers utilization a bit
- Xfaster and more dynamically than /etc/crash strstat! Currently,
- Xthe information is available only on SCO systems. It should be
- Xeasy to get going for others, though.
- X
- XTable Display
- X=============
- X
- XThe current and maximum occupancy of various kernel tables are displayed.
- XThis may not be enabled for all systems (I couldn't test Everywhere!).
- X
- XSio display
- X===========
- X
- XThe experimental, "undocumented" sio display is a stab at tty I/O
- Xmonitoring for SCO only. If you don't mind doing a bit of hacking,
- Xit can be adapted for other tty drivers whose data is an
- Xarray of struct tty (see det_sio.c and ttynm.h and grep for SIO_IS_FAS
- Xto see how I have adapted it for my FAS configuration). See also
- Xthe discussion of siotools below in _How to get going_ item 11..
- X
- XA $0.0002 tour: why nlsym and /unix.nlsym?
- X==========================================
- X
- XAccess to kernel (/dev/kmem) and physical (/dev/mem) memory and
- Xswap (/dev/swap) is required for u386mon to do its thing.
- XTo find kmem addresses of interest, an nlist(S) call must be made
- Xagainst /unix. This can be quite expensive.
- X
- XThe 'nlist' procedure is performed by a separate program (nlsym)
- Xand the resulting nlist structure array is stored in /unix.nlsym.
- Xu386mon thus may obtain nlist information rapidly without nlist(S) each
- Xtime it is executed. Also stored in /unix.nlsym is a stat structure of
- X/unix at the time of nlsym execution. A unique word is stored at the
- Xend of the file in case /unix.nlsym's nlist structure is expanded for
- Xother applications. The u386mon program reads /unix.nlsym by means
- Xof facilities in libnlsym.c. If the stat structure in /unix.nlsym
- Xdoes not match a dynamic stat of /unix or if the unique word does
- Xnot match, the nlist information is not trusted and u386mon prompts
- Xthe user to run (or have run) the nlsym program to update /unix.nlsym.
- X
- XMany symbols are nlist'ed by nlsym which are not used by u386mon.
- XYou may find other uses for libnlsym/libkmem which make use of them.
- X
- XHow to get going
- X================
- X
- X1. Copy the appropriate Make. file to Makefile, depending on
- X your type of system. It has been a while since I have had
- X good reports on the various OSs other than SCO UNIX, so good luck.
- X
- X Make.dell DELL System V (ISC derived)
- X Make.isc1 ISC 1.x
- X Make.isc2 ISC 2.x
- X Make.isc2.gcc ISC 2.x with gcc (untested)
- X Make.s2 Tandem Integrity S2 Non-Stop UX
- X Make.sVr31 Various System 5 Release 3.1 (good luck)
- X Make.sco SCO UNIX 3.2, 3.2.1, 3.2r2, ODT 1.x
- X Make.sco.gcc same (tested with gcc 1.39 through 2.1)
- X
- X2. Edit Makefile to change BINDIR to match your local requirements.
- X If you have a kernel that knows about MERGE386 as with SCO ODT,
- X add -DMERGE386 to CFLAGS. Likewise, if you have VPIX, add -DVPIX.
- X You may need to add -Dm68k for a MC68000 system if your
- X compiler does not (This may sound like an odd statement for a
- X program with 386 in the name, but we are broadening our territory :->).
- X
- X3. make all. Please report compile errors to me. You shouldn't
- X get any on SCO 3.2.x or ISC 2.x.x for any "recent" or current versions.
- X
- X3a. Note: Don't worry, if on SCO makes, you see warnings on many modules'
- X compilation similar to the following:
- X
- X cc -nointl -c -Octl -CSON -DLINT_ARGS u386mon.c
- X u386mon.c
- X /usr/include/tinfo.h(442) : warning C4005: 'box' : redefinition
- X /usr/include/tinfo.h(443) : warning C4005: 'newterm' : redefinition
- X
- X This is confusion on part of tinfo.h resulting from our use of
- X some valuable speedup macros built into tinfo.h, but not quite
- X kosher enough to satisfy the compiler we know what we are doing.
- X If it bothers you, or something breaks, remove #define CURSES_MACROS
- X from u386mon's config.h. This problem does not occur with the
- X 3.2v4 development system.
- X
- X3b. If you get undefined externs for is_linetouched and is_wintouched(),
- X you can try editing config.h and #define NO_ISTOUCH. Good luck -
- X these are hack attempts and I have no idea if they will work.
- X
- X4. You must run make install as root since u386mon must be setuid to
- X 'mem' ('sys' for ISC) and nlsym must produce /unix.nlsym.
- X For S5R3.1 systems, all bets on "make install" are off. I don't
- X know what it takes, it'll vary from system to system, and the
- X Make.sVr31 is only a guide. For instance, you may want to
- X rename the program to u68kmon on 68000 systems :-).
- X
- X If you are a user of old u386mon versions, run the new nlsym since
- X the older /unix.nlsym format is not compatible with this version.
- X
- X5. Sources are in 4-spaced tab format (please don't flame :->).
- X
- X6. You'll need to check out config.h and your /usr/include/sys/proc.h.
- X If you find a p_sid element in the proc structure, then enable
- X #define HAVE_P_SID in config.h so that processes running under job
- X control will have their control ttys displayed properly.
- X Thanks for the tip to rw@namu01.gwdg.de (Rainer Wittmann STAT).
- X
- X7. usage: u386mon [-l] [-p | -P]
- X -l lock process into memory (if root)
- X -p begin with short ps display
- X -P begin with long ps display (if 43 line screen)
- X -w begin with disk (winchester) stats [SCO and S5R3.1 only]
- X -n begin with STREAMS (net) stats [SCO and S5R3.1 only]
- X
- X8. If you are running SCO and get 4 as the size of most or all processes,
- X try adding -DUSIZE_FIXED. SCO 3.2.0 had this info in the struct
- X user fields u_tsize, u_dsize, u_ssize wrong, IMHO, and fixed it
- X in ODT/3.2.1. See det_proc.c for more detail. Your port
- X may/WILL vary.
- X
- X9. The renice program by Ford Ditto, from which the kmem routines
- X came, has been reworked and in included with this release.
- X It needs a current /unix.nlsym.
- X
- X usage: renice -# pid decrease nice by #
- X renice +# pid increase nice by #
- X renice =# pid set nice to #
- X
- X The traditional privileges for root and non-root are supported.
- X
- X10. The libpanel.c module is not an efficient replacement for the
- X SVR3.2 panel facility. It is, however, fully featured and serves
- X the needs of u386mon, assisting a port to SVR3.1. It seems
- X efficient enough to use in lieu of native (vendor-supplied)
- X panels.
- X
- X11. Siotools, a package of tty and uucp monitors, was previously
- X released separately. Both programs in the package have been
- X reorganized to use the nlsym mechanism. It seemed reasoanble
- X to merge the two packages. HoneyDanBer UUCP is required.
- X The package may fail on SCO 3.2v4 if files have been created
- X in /usr/spool/uucp/* with filenames in excess of 14 characters.
- X This is not likely to become a problem, but I'll fix the
- X hack directory search mechanism upon demand. The method
- X I use currently is very quick. Refer to the README in the
- X siotools subdirectory for more information.
- X
- XComments are appreciated, especially bug fixes and information
- Xhelping to port the program to another 386 SVR3 system.
- X
- XWarren Tucker - n4hgf!wht -or- wht@n4hgf.Mt-Park.GA.US
- X
- XThanks for various reasons to (alphabetically):
- X
- Xaaron@odt.icom.com
- Xalan@cms2
- Xallbery@ncoast.org
- Xandy@rbdc
- Xannie@axis-design.axis-design.fr (Annie Tanguy)
- Xbel@trout.nosc.mil
- Xbobti@sco.com
- Xdavidg@aegis.or.jp
- Xdavidgu@sco.com
- Xdavis@csrg2.ee.iastate.edu (Jim Davis)
- Xdionj@sco.com (Dion Johnson) [triple plus thanks!!]
- Xdynsim1.litwin.com!avg (Anil Gokhale)
- Xeao@mvucl.att.com
- Xelsn4000@w107zrz.zrz.tu-berlin.dbp.de
- Xfocsys!larry
- Xfredj@wang.com (Fred Jewell)
- Xgregf@sco.com (Greg Forrest)
- Xhowardl@wb3ffv.ampr.org
- Xjdc@dell.com (Jeremy Chatfield)
- Xjdm1@eds1.eds.com (Jonathan D. McCown)
- Xjennen@aball.in-berlin.de (Andreas Jennen)
- Xjimmy@denwa.info.com (Jim Gottlieb)
- Xjonl@sco.com
- Xjpradley.jpr.com!root (J-P Radley )
- Xkariy@vataks71.vat-vai.valmet.com
- Xkd4nc!dug
- Xkent@sparky.IMD.Sterling.COM (Kent Landfield)
- Xlarry@focsys
- Xlele@idea.sublink.org
- Xmarlor@cup.portal.com
- Xmartin@hppcmart.grenoble.hp.com
- Xmpd@anomaly.sbs.com
- Xnba@sysware.dk
- Xpat@rwing (Pat Myrto)
- Xpetej@ssg2.pharmacia.com (Peter M. Jansson)
- Xpeter@radig.de
- Xpgd@bbt.se
- Xrandy@chinet.chi.il
- Xrexago8!hc05 (Beirne Konarski)
- Xrll@sco.com (Robert Lewis)
- Xrobertt@sco.com
- Xroot@candle.uucp (Bruce Momjian)
- Xroot@dinosaur.lonestar.org
- Xrtf.bt.co.uk!traub
- Xrw@namu01.gwdg.de (Rainer Wittmann STAT)
- Xsoward@ms.uky.edu
- Xssb@cs.umn.edu!quest
- Xsteen@kiku.dk
- Xsteen@kiku.dk (Steen Hammerum)
- Xstevea@i88.isc.com (Steve Alexander)
- Xsunriv!johnc
- Xsysware.sysware.dk!nba (Niels Baggesen)
- Xtore@kiku.dk
- Xtrb@ima.ima.isc.com (Andrew Tannenbaum)
- Xwgs6386!budp
- Xxenicon!steveh
- SHAR_EOF
- chmod 0644 README ||
- echo 'restore of README failed'
- Wc_c="`wc -c < 'README'`"
- test 22853 -eq "$Wc_c" ||
- echo 'README: original size 22853, current size' "$Wc_c"
- fi
- # ============= CHANGES ==============
- if test -f 'CHANGES' -a X"$1" != X"-c"; then
- echo 'x - skipping CHANGES (File already exists)'
- else
- echo 'x - extracting CHANGES (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'CHANGES' &&
- XCHANGES - Sun Aug 30 00:29:07 EDT 1992
- X
- XChanges for 2.60 (since last public release 2.40, erroneously marked
- X3.40 in places):
- X
- X1. Added support for SCO 3.2v4.
- X There are no differences in making or using u386mon on 3.2v4.
- X Code changes alone were required.
- X
- X2. Integrated siotools package to exploit nlsym
- X For SCO, adaptable to others, a uucp watcher and a
- X tty driver monitor. For porting clues, look for SIO_IS_FAS
- X in *.[ch] and siotools/*.[ch], particularly ttynm.h and nlsym.h.
- X You need to point the code to your kernel's struct tty table by name
- X (e.g., "sio_tty", "asy_tty", "fas_tty") and state how long the array is.
- X These values are set in ttynm.h. The example -DSIO_IS_FAS
- X configures u386mon, uusnap, siomon and nlsym to look for my
- X FAS table with 9 serial devices named with SCO naming conventions.
- X
- X3. nba@sysware.dk reorganized the S5R31 code and configuration.
- X
- X2.60 was tested on SCO 3.2v4. Changes made to support 3.2v4 and
- Xenhance SVR31 hopefully have not affected other environments.
- SHAR_EOF
- chmod 0644 CHANGES ||
- echo 'restore of CHANGES failed'
- Wc_c="`wc -c < 'CHANGES'`"
- test 1033 -eq "$Wc_c" ||
- echo 'CHANGES: original size 1033, current size' "$Wc_c"
- fi
- # ============= Make.dell ==============
- if test -f 'Make.dell' -a X"$1" != X"-c"; then
- echo 'x - skipping Make.dell (File already exists)'
- else
- echo 'x - extracting Make.dell (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'Make.dell' &&
- X# CHK=0x0770
- X#+-------------------------------------------------------------------
- X# Makefile for u386mon for DELL UNIX 1.x
- X# ...!{gatech,emory}!n4hgf!wht
- X#--------------------------------------------------------------------
- X#+:EDITS:*/
- X#:07-15-1992-14:31-wht@n4hgf-2.60 release - u386mon+siotools merge
- X#:08-01-1991-23:34-wht@n4hgf-release 2.53 source control point
- X#:08-10-1990-14:12-jmd@p1so/wht@n4hgf-2.20-add Tandem Integrity S2
- X#:08-07-1990-14:24-wht@n4hgf-nba@sysware.dk SVR31 updates
- X#:08-02-1990-15:35-wht@n4hgf-2.12-old curses hacks+minor 3.2 formalizations
- X#:08-01-1990-21:39-wht@n4hgf-add Dell make file
- X#:08-01-1990-12:26-wht@n4hgf-2.11-try to support ISC 1.x.x
- X#:07-28-1990-18:07-wht@n4hgf-2.10 release
- X#:07-26-1990-18:59-root@n4hgf-remove inappropriate USIZE_FIXED reminder
- X#:07-24-1990-18:53-wht@n4hgf-add USIZE_FIXED reminder
- X#:07-21-1990-16:03-wht@n4hgf-add libpanel + remake depend
- X#:06-27-1990-01:57-wht@n4hgf-1.10 - incorporate suggestions from alpha testers
- X#:06-25-1990-04:14-wht@n4hgf-1.03-better error handling
- X#:06-24-1990-20:53-wht@n4hgf-v1.01-add ISC support thanks to peter@radig.de
- X#:06-21-1990-14:27-r@n4hgf-version x0.12 seems bug free
- X#:06-19-1990-21:37-wht@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.60
- 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 patchlevel.h\
- X ttynm.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 CHANGES\
- X Make.*\
- X EXPLAIN\
- 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 siotools/Makefile\
- X siotools/README\
- X siotools/kmemsio.c\
- X siotools/kmemsio.h\
- X siotools/pend.sh\
- X siotools/siomon.c\
- X siotools/utoa.c\
- X siotools/utoa.h\
- X siotools/uusnap.c\
- X siotools/wingets.c\
- X siotools/wintio.c\
- X siotools/wintio.h\
- X siotools/wintty.c\
- X siotools/wintty.h
- 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
- Xneat:
- X rm -f *\# *~ *.orig *.rej *.out *.log core ,* cscope.out tags *.bak \
- X mkdep.* *.new src.fls u386mon.lint
- X
- Xclean: neat
- X rm -f $(U386MON_OBJ) $(NLSYM_OBJ)
- 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 u386m-$(VERSION) $(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 Make.dell Make.dell.new
- X ex Make.dell.new < mkdep.ex.tmp
- X rm mkdep.ex.tmp mkdep.rule.tmp
- X echo '# DEPENDENCIES MUST END AT END OF FILE' >>Make.dell.new
- X echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY'>>Make.dell.new
- X echo '# see make depend above'>>Make.dell.new
- X mv Make.dell Make.dell.bak
- X mv Make.dell.new Make.dell
- X @echo Make.dell has been updated with dependencies
- 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
- chmod 0644 Make.dell ||
- echo 'restore of Make.dell failed'
- Wc_c="`wc -c < 'Make.dell'`"
- test 9387 -eq "$Wc_c" ||
- echo 'Make.dell: original size 9387, current size' "$Wc_c"
- fi
- # ============= Make.esix ==============
- if test -f 'Make.esix' -a X"$1" != X"-c"; then
- echo 'x - skipping Make.esix (File already exists)'
- else
- echo 'x - extracting Make.esix (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'Make.esix' &&
- X# CHK=0x2F7C
- X#+-------------------------------------------------------------------
- X# Makefile for u386mon for ESIX 5.3.2 Rev D
- X# ...!{gatech,emory}!n4hgf!wht
- X#--------------------------------------------------------------------
- X#+:EDITS:*/
- X#:07-15-1992-14:31-wht@n4hgf-2.60 release - u386mon+siotools merge
- X#:08-20-1991-14:06-root@n4hgf-thanks to jdm1@eds1.eds.com
- X
- X#------------> CFLAGS
- X# ESIX
- X# Add -DVPIX if you have VP/ix
- X# Add -DMERGE386 if you have Merge/386
- XCFLAGS = -c -O -DESIX532
- 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.60
- 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_stream.c\
- X det_table.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 patchlevel.h\
- X ttynm.h\
- X u386mon.h
- X
- XNLSYM_OBJ =\
- X nlsym.o
- X
- XU386MON_OBJ =\
- X u386mon.o\
- X detail.o\
- X det_proc.o\
- X det_stream.o\
- X det_table.o\
- X bootinfo.o\
- X proc.o\
- X tune.o\
- X var.o\
- X disputil.o\
- X kludge.o\
- X libkmem.o\
- X libmem.o\
- X libpanel.o\
- X libswap.o\
- X libnlsym.o
- X
- XSHARFLS = \
- X README\
- X CHANGES\
- X Make.*\
- X EXPLAIN\
- 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 siotools/Makefile\
- X siotools/README\
- X siotools/kmemsio.c\
- X siotools/kmemsio.h\
- X siotools/pend.sh\
- X siotools/siomon.c\
- X siotools/utoa.c\
- X siotools/utoa.h\
- X siotools/uusnap.c\
- X siotools/wingets.c\
- X siotools/wintio.c\
- X siotools/wintio.h\
- X siotools/wintty.c\
- X siotools/wintty.h
- 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
- Xneat:
- X rm -f *\# *~ *.orig *.rej *.out *.log core ,* cscope.out tags *.bak \
- X mkdep.* *.new src.fls u386mon.lint
- X
- Xclean: neat
- X rm -f $(U386MON_OBJ) $(NLSYM_OBJ)
- 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 u386m-$(VERSION) $(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 Make.esix Make.esix.new
- X ex Make.esix.new < mkdep.ex.tmp
- X rm mkdep.ex.tmp mkdep.rule.tmp
- X echo '# DEPENDENCIES MUST END AT END OF FILE' >>Make.esix.new
- X echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY'>>Make.esix.new
- X echo '# see make depend above'>>Make.esix.new
- X mv Make.esix Make.esix.bak
- X mv Make.esix.new Make.esix
- X @echo Make.esix has been updated with dependencies
- X
- X# DO NOT DELETE THIS LINE
- 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
- chmod 0644 Make.esix ||
- echo 'restore of Make.esix failed'
- Wc_c="`wc -c < 'Make.esix'`"
- test 3945 -eq "$Wc_c" ||
- echo 'Make.esix: original size 3945, current size' "$Wc_c"
- fi
- # ============= Make.isc1 ==============
- if test -f 'Make.isc1' -a X"$1" != X"-c"; then
- echo 'x - skipping Make.isc1 (File already exists)'
- else
- echo 'x - extracting Make.isc1 (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'Make.isc1' &&
- X# CHK=0x2552
- X#+-------------------------------------------------------------------
- X# Makefile for u386mon for ISC 386/ix 1.0.x - a good guess
- X# ...!{gatech,emory}!n4hgf!wht
- X#--------------------------------------------------------------------
- X#+:EDITS:*/
- X#:07-15-1992-14:31-wht@n4hgf-2.60 release - u386mon+siotools merge
- X#:08-01-1991-23:34-wht@n4hgf-release 2.53 source control point
- X#:08-10-1990-14:12-jmd@p1so/wht@n4hgf-2.20-add Tandem Integrity S2
- X#:08-07-1990-14:24-wht@n4hgf-nba@sysware.dk SVR31 updates
- X#:08-03-1990-03:42-wht@n4hgf-creation
- X
- X#------------> CFLAGS
- XCFLAGS = -c -O -DISC_1
- X
- X#------------> LIB
- XLIB = -lcurses -lx -lmalloc -lc_s
- X
- X#------------> KMEMGRP
- XKMEMGRP = sys
- X
- X#------------> BINDIR
- XBINDIR = /usr/local/bin
- X
- XLDFLAGS = -s
- X
- XVERSION = 2.60
- 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 libkmem.c\
- X libmem.c\
- X libpanel.c\
- X libswap.c\
- X libnlsym.c\
- X kludge.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 patchlevel.h\
- X ttynm.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 disputil.o\
- X kludge.o\
- X libkmem.o\
- X libmem.o\
- X libpanel.o\
- X libswap.o\
- X libnlsym.o
- X
- XSHARFLS = \
- X README\
- X CHANGES\
- X Make.*\
- X EXPLAIN\
- 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 siotools/Makefile\
- X siotools/README\
- X siotools/kmemsio.c\
- X siotools/kmemsio.h\
- X siotools/pend.sh\
- X siotools/siomon.c\
- X siotools/utoa.c\
- X siotools/utoa.h\
- X siotools/uusnap.c\
- X siotools/wingets.c\
- X siotools/wintio.c\
- X siotools/wintio.h\
- X siotools/wintty.c\
- X siotools/wintty.h
- 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
- Xneat:
- X rm -f *\# *~ *.orig *.rej *.out *.log core ,* cscope.out tags *.bak \
- X mkdep.* *.new src.fls u386mon.lint
- X
- Xclean: neat
- X rm -f $(U386MON_OBJ) $(NLSYM_OBJ)
- 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 u386m-$(VERSION) $(SHARFLS)
- X
- X# MAKE DEPEND: regenerate .c:.h, .ol:.c, .ol:.asm dependencies automatically
- X#
- 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 Make.isc1 Make.isc1.new
- X ex Make.isc1.new < mkdep.ex.tmp
- X rm mkdep.ex.tmp mkdep.rule.tmp
- X echo '# DEPENDENCIES MUST END AT END OF FILE' >>Make.isc1.new
- X echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY'>>Make.isc1.new
- X echo '# see make depend above'>>Make.isc1.new
- X mv Make.isc1 Make.isc1.bak
- X mv Make.isc1.new Make.isc1
- X @echo Make.isc1 has been updated with dependencies
- 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
- 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
- Xkludge.o: /usr/include/curses.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
- chmod 0644 Make.isc1 ||
- echo 'restore of Make.isc1 failed'
- Wc_c="`wc -c < 'Make.isc1'`"
- test 8647 -eq "$Wc_c" ||
- echo 'Make.isc1: original size 8647, current size' "$Wc_c"
- fi
- true || echo 'restore of Make.isc2 failed'
- echo End of part 1, continue with part 2
- exit 0
-
- exit 0 # Just in case...
-