home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume14 / u386mon-2.0 / part01 next >
Encoding:
Text File  |  1990-07-15  |  51.9 KB  |  1,715 lines

  1. Newsgroups: comp.sources.misc
  2. subject: v14i001: u386mon 2.0 part 01/04
  3. From: wht@n4hgf.UUCP (Warren Tucker)
  4. Sender: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc)
  5.  
  6. Posting-number: Volume 14, Issue 1
  7. Submitted-by: wht@n4hgf.UUCP (Warren Tucker)
  8. Archive-name: u386mon-2.0/part01
  9.  
  10. [I got a great number of requests for this, so I am posting it here. -wht]
  11.  
  12. This is u386mon, a "performance" monitor for SCO UNIX V/386 and
  13. ISC 386/ix.  Also, a renice is included as an example of alternate uses
  14. of the kmem/mem/swap utility objects. A set of uucp utilites, called
  15. uutool, is also bundled in (same reason: libkmem).
  16.  
  17. U386mon and renice have been tested on SCO 3.2.0 and 3.2.1
  18. and ISC 2.0.1 and 2.0.2.
  19. Uutool surely works on most i386 systems with HDB, but has been tested in
  20. SCO UNIX environments.
  21. These may work with other UNIX systems with a little work.
  22. XENIX systems have greatly different kernel implementations and
  23. use xlist instead of nlist.  These programs will not work there; sorry.
  24.  
  25. It requires terminfo style curses and will use color if you have it.  It
  26. works best with a 43 line (or greater) screen, but will work with a 25
  27. line screen with some limitations.  It has been tested with 25 and 43
  28. line screens on the multiscreen console and on a Wyse 60 (under SCO,
  29. using terminfo wy60, using interesting "color" mappings). On ISC,
  30. 43-line xterms are reported to work nicely.
  31.  
  32. On a 20Mhz Compaq 386 running SCO UNIX 3.2.0, u386mon on a 43-line VGA
  33. appears to consume 2 to 3% of the cpu when in the "main" display and
  34. about 5 to 7% when displaying process status (NPROC, v.v_proc == 100).
  35.  
  36. This little light show has already helped me diagnose the traditional
  37. "stop-the-world-and-beat-disk-continually-for-15-seconds" problem as
  38. memory exhaustion.  It has also been a good learning experience.
  39.  
  40. Thanks to peter@radig.de (Peter Radig), dug@kd4nc (Doug Drye),
  41. jdc@uudell.dell.com (Jeremy Chatfield), andy@rbdc (Andy Pitts),
  42. trb@ima.ima.isc.com (Andrew Tannenbaum)
  43. for the help with ISC 386/ix.
  44.  
  45. #!/bin/sh
  46. # This is u386mon.2.0, a shell archive (shar 3.32)
  47. # made 07/15/1990 07:04 UTC by wht@n4hgf.Mt-Park.GA.US
  48. # Source directory /u1/src/u386mon
  49. #
  50. # existing files WILL be overwritten
  51. #
  52. # This shar contains:
  53. # length  mode       name
  54. # ------ ---------- ------------------------------------------
  55. #  14604 -rw-r--r-- README
  56. #   1393 -rw-r--r-- EXPLAIN
  57. #   8264 -rw-r--r-- Makefile.sco
  58. #   7951 -rw-r--r-- Makefile.isc
  59. #   6342 -rw-r--r-- bootinfo.c
  60. #   7352 -rw-r--r-- detail.c
  61. #  18031 -rw-r--r-- det_proc.c
  62. #  12628 -rw-r--r-- det_sio.c
  63. #   5521 -rw-r--r-- disputil.c
  64. #   2795 -rw-r--r-- libkmem.c
  65. #   2793 -rw-r--r-- libmem.c
  66. #   1979 -rw-r--r-- libswap.c
  67. #   2881 -rw-r--r-- libnlsym.c
  68. #   2948 -rw-r--r-- nlsym.c
  69. #   3815 -rw-r--r-- proc.c
  70. #   1956 -rw-r--r-- tune.c
  71. #  33152 -rw-r--r-- u386mon.c
  72. #   2094 -rw-r--r-- var.c
  73. #    874 -rw-r--r-- libkmem.h
  74. #    870 -rw-r--r-- libmem.h
  75. #    795 -rw-r--r-- libswap.h
  76. #    841 -rw-r--r-- libnlsym.h
  77. #   7313 -rw-r--r-- lint_args.h
  78. #   5472 -rw-r--r-- nlsym.h
  79. #   3631 -rw-r--r-- u386mon.h
  80. #   1200 -rw-r--r-- renice/Makefile
  81. #   4399 -rw-r--r-- renice/renice.c
  82. #   2027 -rw-r--r-- uutool/README
  83. #   1344 -rw-r--r-- uutool/Makefile
  84. #   3354 -rw-r--r-- uutool/killpc.c
  85. #  17805 -rw-r--r-- uutool/uutool.c
  86. #   2504 -rw-r--r-- uutool/wstext.c
  87. #
  88. if touch 2>&1 | fgrep 'amc' > /dev/null
  89.  then TOUCH=touch
  90.  else TOUCH=true
  91. fi
  92. # ============= README ==============
  93. echo "x - extracting README (Text)"
  94. sed 's/^X//' << 'SHAR_EOF' > README &&
  95. Xu386mon README - last updated Tue Jul 10 19:14:28 EDT 1990
  96. X
  97. XThis is u386mon, a "performance" monitor for SCO UNIX V/386 and
  98. XISC 386/ix.  Also, a renice is included as an example of alternate uses
  99. Xof the kmem/mem/swap utility objects. A set of uucp utilites, called
  100. Xuutool, is also bundled in (same reason: libkmem).
  101. X
  102. XU386mon and renice have been tested on SCO 3.2.0 and 3.2.1
  103. Xand ISC 2.0.1 and 2.0.2.
  104. XUutool surely works on most i386 systems with HDB, but has been tested in
  105. XSCO UNIX environments.
  106. XThese may work with other UNIX systems with a little work.
  107. XXENIX systems have greatly different kernel implementations and
  108. Xuse xlist instead of nlist.  These programs will not work there; sorry.
  109. X
  110. XIt requires terminfo style curses and will use color if you have it.  It
  111. Xworks best with a 43 line (or greater) screen, but will work with a 25
  112. Xline screen with some limitations.  It has been tested with 25 and 43
  113. Xline screens on the multiscreen console and on a Wyse 60 (under SCO,
  114. Xusing terminfo wy60, using interesting "color" mappings). On ISC,
  115. X43-line xterms are reported to work nicely.
  116. X
  117. XOn a 20Mhz Compaq 386 running SCO UNIX 3.2.0, u386mon on a 43-line VGA
  118. Xappears to consume 2 to 3% of the cpu when in the "main" display and
  119. Xabout 5 to 7% when displaying process status (NPROC, v.v_proc == 100).
  120. X
  121. XThis little light show has already helped me diagnose the traditional
  122. X"stop-the-world-and-beat-disk-continually-for-15-seconds" problem as
  123. Xmemory exhaustion.  It has also been a good learning experience.
  124. X
  125. XThanks to peter@radig.de (Peter Radig), dug@kd4nc (Doug Drye),
  126. Xjdc@uudell.dell.com (Jeremy Chatfield), andy@rbdc (Andy Pitts),
  127. Xtrb@ima.ima.isc.com (Andrew Tannenbaum)
  128. Xfor the help with ISC 386/ix.
  129. X
  130. XRead through this and you will finally reach "How to get going" below.
  131. X
  132. XSample output (somewhat obsolete)
  133. X=================================
  134. X(with 43-line screen; a 25 line screen will be missing Var/Bootinfo/Tune/Proc
  135. Xon the 'main' display)
  136. X
  137. X u386mon x1.152  n4hgf - SCO 3.2                              04:39:36 wht@n4hgf
  138. X---- CPU --- tot usr ker brk ---------------------------------------------------
  139. X Instant %    93  54  39   0 uuuuuuuuuuuuuuuuuuuuuuuuuuukkkkkkkkkkkkkkkkkkk     
  140. X 5 Sec Avg %  87  26  61   0 uuuuuuuuuuuuukkkkkkkkkkkkkkkkkkkkkkkkkkkkkk        
  141. X10 Sec Avg %  89  45  44   0 uuuuuuuuuuuuuuuuuuuuuukkkkkkkkkkkkkkkkkkkkkk       
  142. X---- Wait -- tot  io pio swp -- (% of real time) -------------------------------
  143. X Instant %     5   5   0   0 ii                                                 
  144. X 5 Sec Avg %  12  12   0   0 iiiiii                                             
  145. X10 Sec Avg %   9   9   0   0 iiii                                               
  146. X---- Sysinfo/Minfo --- (last  1000 msec activity) ------------------------------
  147. Xbread          5  readch    60416  pswitch    21   vfault    1    unmodsw   0   
  148. Xbwrite         9  writch     2507  syscall   261   demand    1    unmodfl   0   
  149. Xlread        331  rawch         2  sysread   100   pfault   15    psoutok   0   
  150. Xlwrite        42  canch         0  syswrit     4   cw        0    psinfai   0   
  151. Xphread         0  outch      2508  sysfork     1   steal    15    psinok    0   
  152. Xphwrite        0  msg           0  sysexec     0   frdpgs    0    rsout     0   
  153. Xswapin         0  sema          0                  vfpg      0    rsin      0   
  154. Xswapout        0  maxmem    5724k  runque      0   sfpg      0                  
  155. Xbswapin        0  frmem     3284k  runocc      0   vspg      0    pages on      
  156. Xbswapout       0  mem used    43%  swpque      0   sspg      0    swap      0   
  157. Xiget          72  nswap    10000k  swpocc      0   pnpfault  0    cache     0   
  158. Xnamei         71  frswp    10000k                  wrtfault  0    file      0   
  159. Xdirblk        92  swp used     0%                                               
  160. X                                                                                
  161. X                                                                                
  162. X                                                                                
  163. X-- Var ---------  -- Bootinfo ----------   -- Tune ---------  -- Proc ---       
  164. Xv_autoup      10  basemem      640k        t_ageintvl      9  sleep    22       
  165. Xv_buf        600  extmem      6144k        t_bdflushr      1  run       1       
  166. Xv_clist      200  bflags   00000000        t_gpgshi       40  zombie    0       
  167. Xv_file       200  memory available         t_gpgslo       25  stop      0       
  168. Xv_hbuf        64  00000000 000a0000        t_gpgsmsk   0x420  idle      0       
  169. Xv_inode      200  00100000 00600000        t_maxfc         1  onproc    1       
  170. Xv_maxpmem      0  00f40000 00060000 NODM   t_maxsc         1  xbrk      0       
  171. Xv_maxup       60  memory used              t_maxumem    2560  total    24       
  172. Xv_mount        5  00000000 00004000 RSVD   t_minarmem     25  in mem   24       
  173. Xv_pbuf        20  006bb000 00037000 KBSS   t_minasmem     25                    
  174. Xv_proc       100  006f2000 0000e000 KDTA                                        
  175. Xv_region     210  00fa9000 00057000 KTXT                                        
  176. Xv_vhndfrac    16                                                                
  177. X
  178. XThe main display
  179. X================
  180. X
  181. XA brief description of reported information:
  182. X
  183. X1.  The CPU utilization is shown with smoothing of 1 ("instant"),
  184. X    5 and 10 seconds.  Total CPU usage is shown, with user, kernel
  185. X    and "break" subdivided.  Most performance utilities (vmstat)
  186. X    lump kernel (CPU_KERNEL) and wait (CPU_WAIT) times together
  187. X    as kernel time.  u386mon considers CPU_WAIT time as idle (the
  188. X    CPU could have been doing something if an otherwise ready process
  189. X    wasn't waited).
  190. X
  191. X    On a color display, total cpu utilization is displayed in
  192. X    green if the cpu utilization is below 70%, yellow if utilization
  193. X    is between 70% and 89% and red if 90% or above.
  194. X
  195. X2.  The Wait display shows the 1 ("instant"), 5 and 10 second smoothed
  196. X    percentages of real time no process could be run because otherwise
  197. X    ready to run processes were waiting on logical, swap or physical I/O.
  198. X
  199. X    On a color display, total wait time is displayed in green if it is
  200. X    below 30%, yellow if utilization is between 30% and 49% and red if
  201. X    50% or above.
  202. X
  203. X3.  Sysinfo/Minfo display shows, generally, the number of events for a
  204. X    measured value since the last display update.  For example, runque
  205. X    shows the number of times a process was placed on the run queue.
  206. X    An exception is the memory and swap space fields:  These numbers
  207. X    reflect absolute current utilization over the period shown in
  208. X    the "last XXXXX msec" value in the banner.  Periods of 4000
  209. X    milliseconds are shown in red, 1500 to 3990 milliseconds in
  210. X    blue and less than 1500 milliseconds in the normal banner color.
  211. X
  212. X    My guess as to the meaning of the sysinfo and minfo values
  213. X    is in the file EXPLAIN.  I am not familiar with the meanings
  214. X    of all the items, having looked through the header files, sar
  215. X    man pages and the other UNIX hacker-ganda I could find.  Comments
  216. X    are appreciated.
  217. X
  218. X4.  If you run u386mon on a 43 line display, extra information is displayed
  219. X    on the bottom of the screen (from the struct var v, bootinfo
  220. X    and proc kernel databases).
  221. X
  222. X5.  On a color display, static numeric values, such as maxmem appear
  223. X    in blue (the same color as screen literals/labels).  Dynamic
  224. X    numeric values are displayed in green, with the exception of
  225. X    total cpu and wait percentages, which appear in light green,
  226. X    red or yellow.
  227. X
  228. X6.  An "INEXACT" indication on the top line means that u386mon was
  229. X    not scheduled quickly enough to capture accurate 1 second (nominal)
  230. X    values.  Continued INEXACT indication suggests the 5 and 10
  231. X    second smoothed values are also wrong.
  232. X
  233. X    An "INVALID" indication means u386mon was not scheduled for 4
  234. X    seconds or more; all dynamic values are suspect.
  235. X    IN GENERAL, if you see any red characters on the display,
  236. X    immediately take grain of salt. If you have no color screen
  237. X    and still see red, add tequila to salt.
  238. X
  239. X7.  If you are running as root, you may use the -l switch or the
  240. X    'l' command to lock u386mon into memory.  If you do this, PLOCK
  241. X    will appear at the top of the screen to remind you of this hoggy
  242. X    behavior.  The u386mon process will not be listed in a process
  243. X    status display since SSYS (locked, resident) processes are not
  244. X    shown.
  245. X
  246. X8.  The ISC bootinfo field will have different information due to
  247. X    different porting by ISC and SCO.
  248. X
  249. X9.  The 'e' command accesses the Var/Bootinfo/Tune/Proc display,
  250. X    overlaying the Sysinfo/Minfo display.
  251. X
  252. XProcess Status Display
  253. X======================
  254. X
  255. X1.  Pressing 'p' causes a process status display of sorts to be
  256. X    shown, overlaying Sysinfo/Minfo on a 25 line screen or
  257. X    Var/Bootinfo/Tune/Proc on a 43 line screen.  On a 43 line screen, 'P'
  258. X    causes a larger ps display to be shown, overlaying Sysinfo/Minfo and
  259. X    Var/Bootinfo/Tune/Proc.
  260. X
  261. X    Sample output:
  262. X
  263. XS     USER   PID  CPU PRI NI  UCPU   SCPU  SIZE TTY CMD
  264. Xs     root    148   0  26 20   0:00   0:05  108  ?? /etc/cron
  265. Xs      wht  14946   2  39 20   0:02   0:11  224  05 TMR 01000a12
  266. Xs      wht  14947   2  39 20   0:02   0:11  220  05 TMR 01011101
  267. Xs      wht  14950   0  27 20   0:00   0:02  228  05 IP 01000a12
  268. Xs      wht  14951   1  27 20   0:00   0:02  224  05 IP 01011101
  269. Xs      wht  14952   0  27 20   0:01   0:02  228  05 TP4 01000a12
  270. Xs      wht  14953   1  27 20   0:01   0:03  224  05 TP4 01011101
  271. Xs      wht  14957   0  27 20   0:00   0:04  200  05 smpad.x
  272. Xs      wht  14960   1  27 20   0:00   0:04  204  05 mmpad.x
  273. Xs     root  15044   0  28 20   0:01   0:01  296  12 vi README
  274. Xs     uucp  15053   0  30 26   0:00   0:00  696  ?? /usr/lib/uucp/uusched
  275. Xs     uucp  15055   0  30 26   0:00   0:00  748  ?? UUCICO -r1 -sgatech
  276. Xs     uucp  15060   0  28 26   0:00   0:00  768  ?? dialTBIT tty2E 2222222UC 192
  277. X
  278. X    NOTES
  279. X    a.   S - two character status
  280. X            1st character - process status
  281. X               s - sleeping
  282. X               R - ready to run (might be running if u386mon were not)
  283. X               z - zombie
  284. X               d - stopped by debugger
  285. X               i - idle (in creation?)
  286. X               p - running on processor (on single CPU systems, only u386mon
  287. X                   will show this)
  288. X               x - XBREAK - process growing or shrinking
  289. X            2nd character - process swap status
  290. X               S - process is swapped
  291. X               blank - process is in memory
  292. X
  293. X    b.  If the process is running with setuid, a '#' appears to
  294. X        the right of the username.
  295. X
  296. X    c.  On color systems, processes ready to run are shown in yellow
  297. X        unless they are ready, but swapped out, in which case they
  298. X        are shown in red.
  299. X
  300. X3.  Since a limited space is available for displaying process
  301. X    status, particularly on a 25-line screen, a selective elimination
  302. X    algorithm is used to whittle the list when insufficient room
  303. X    is available.  init (pid 1) and system/resident (SSYS)
  304. X    processes are never displayed.  When a display cycle is to begin
  305. X    and there is not room for all of the processes to be shown,
  306. X    processes are eliminated in the following order:
  307. X
  308. X    a. 'getty', 'uugetty', 'sh', 'csh', and 'ksh'
  309. X    b. swapped and zombie processes
  310. X    c. sleeping processes
  311. X
  312. X    If there is still insufficient room, an indication to the effect
  313. X    is displayed (tough cookies).
  314. X
  315. X
  316. XA $0.0002 tour: why nlsym and /unix.nlsym?
  317. X==========================================
  318. X
  319. XAccess to kernel (/dev/kmem) and physical (/dev/mem) memory and
  320. Xswap (/dev/swap) is required for u386mon to do its thing.
  321. XTo find kmem addresses of interest, an nlist(S) call must be made
  322. Xagainst /unix.  This can be quite expensive.
  323. X
  324. XThe 'nlist' procedure is performed by a separate program (nlsym)
  325. Xand the resulting nlist structure array is stored in /unix.nlsym.
  326. Xu386mon thus may obtain nlist information rapidly without nlist(S) each
  327. Xtime it is executed.  Also stored in /unix.nlsym is a stat structure of
  328. X/unix at the time of nlsym execution.  A unique word is stored at the
  329. Xend of the file in case /unix.nlsym's nlist structure is expanded for
  330. Xother applications.  The u386mon program reads /unix.nlsym by means
  331. Xof facilities in libnlsym.c.  If the stat structure in /unix.nlsym
  332. Xdoes not match a dynamic stat of /unix or if the unique word does
  333. Xnot match, the nlist information is not trusted and u386mon prompts
  334. Xthe user to run (or have run) the nlsym program to update /unix.nlsym.
  335. X
  336. XMany symbols are nlist'ed by nlsym which are not used by u386mon.
  337. XYou may find other uses for libnlsym/libkmem which make use of them.
  338. X
  339. XHow to get going
  340. X================
  341. X
  342. X1.  Copy Makefile.sco or Makefile.isc to Makefile, depending on
  343. X    your system.
  344. X
  345. X2.  Edit Makefile to change BINDIR to match your local requirements.
  346. X    If you have a kernel that knows about MERGE386 as with SCO ODT,
  347. X    add -DMERGE386 to CFLAGS. Likewise, if you have VPIX, add -DVPIX.
  348. X
  349. X3.  make all.
  350. X
  351. X4.  you must run make install as root since u386mon must be setuid to
  352. X    'mem' ('sys' for ISC) and nlsym must produce /unix.nlsym.
  353. X
  354. X5.  Sources are in 4-spaced tab format (please don't flame :-)).
  355. X
  356. X6.  Under SCO, you may have to chgrp mem /dev/swap; I did.  For some reason,
  357. X    I found the group name for /dev/swap on my system to be 'network'.
  358. X    I guess something may have been broken by my changing the group,
  359. X    but it hasn't bit me yet.
  360. X
  361. X    The ISC Makefile unconditionally sets g+r on /dev/swap, since this
  362. X    necessary permission is not ordinarily present.
  363. X
  364. X7.  usage: u386mon [-l] [-p | -P]
  365. X    -l lock process into memory (if root)
  366. X    -p begin with short ps display
  367. X    -P begin with long ps display (if 43 line screen)
  368. X
  369. X8.  If you are getting 4 as the size of most or all processes,
  370. X    try adding -DUTIME_FIXED.  SCO 3.2.0 had this info in the
  371. X    struct user fields u_tsize, u_dsize, u_ssize wrong, IMHO,
  372. X    and fixed it in ODT/3.2.1. See det_proc.c for more detail.
  373. X    Your port may/WILL vary.
  374. X
  375. X9.  The renice program by Ford Ditto, from which the kmem routines
  376. X    came, with this release.
  377. X
  378. X    usage: renice -# pid     decrease nice by #
  379. X           renice +# pid     increase nice by #
  380. X           renice =# pid     set nice to #
  381. X
  382. X    The traditional privileges for root and non-root are supported.
  383. X
  384. XComments are appreciated, especially bug fixes and information
  385. Xhelping to port the program to another 386 S5R3.2 system.
  386. XSomebody was purported to be working on a XENIX/386 lookalike.
  387. X
  388. XNO FSF, LPF, FOO or LSD -- just free.
  389. X
  390. XWarren Tucker N4HGF
  391. X{gatech,emory}!n4hgf!wht -or- wht@n4hgf.Mt-Park.GA.US
  392. SHAR_EOF
  393. $TOUCH -am 0715030490 README &&
  394. chmod 0644 README ||
  395. echo "restore of README failed"
  396. set `wc -c README`;Wc_c=$1
  397. if test "$Wc_c" != "14604"; then
  398.     echo original size 14604, current size $Wc_c
  399. fi
  400. # ============= EXPLAIN ==============
  401. echo "x - extracting EXPLAIN (Text)"
  402. sed 's/^X//' << 'SHAR_EOF' > EXPLAIN &&
  403. XThis is a very cursor description of some of the fields as I understand
  404. Xthem.  Corrections/additions appreciated.
  405. X
  406. X---- Sysinfo/Minfo --- (last 1 second activity) --------------------------------
  407. Xbread            actual buffers (disk or tape blocks) read
  408. Xbwrite            actual buffers (disk or tape blocks) written
  409. Xlread            logical buffers (disk or tape blocks) read
  410. Xlwrite            logical buffers (disk or tape blocks) written 
  411. Xswapin            logical blocks swapped in
  412. Xswapout            logical blocks swapped out
  413. Xbswapin            actual blocks swapped in
  414. Xbswapout        actual blocks swapped in
  415. Xiget            get inode
  416. Xnamei            lookup inode for pathname
  417. Xdirblk            directory blocks read
  418. Xreadch            chars read by read() system call
  419. Xwritch            chars written by write() system call
  420. Xrawch            raw tty character read
  421. Xcanch            raw tty character put onto canonical queue
  422. Xoutch            tty characters written
  423. Xmsg                message operations (msgsnd())
  424. Xsema            semaphore operations (semop())
  425. Xpswitch            process context switches
  426. Xsyscall            system calls
  427. Xsysread            read() calls
  428. Xsyswrit            write() calls
  429. Xsysfork            fork() calls
  430. Xsysexec            exec[,l,le,etc.]() calls
  431. Xrunque            number of processes placed on run queue
  432. Xrunocc            number of processes -now- on queue
  433. Xswpque            number of processes placed on swap queue
  434. Xswpocc            number of processes -now- on queue
  435. Xvfault            
  436. Xdemand            
  437. Xpfault            
  438. Xsteal            number of pages stolen
  439. Xfrdpgs            pages freed
  440. Xvfpg            
  441. Xsfpg            
  442. Xvspg            
  443. Xsspg            
  444. Xpnpfault        
  445. Xwrtfault        
  446. SHAR_EOF
  447. $TOUCH -am 0710191890 EXPLAIN &&
  448. chmod 0644 EXPLAIN ||
  449. echo "restore of EXPLAIN failed"
  450. set `wc -c EXPLAIN`;Wc_c=$1
  451. if test "$Wc_c" != "1393"; then
  452.     echo original size 1393, current size $Wc_c
  453. fi
  454. # ============= Makefile.sco ==============
  455. echo "x - extracting Makefile.sco (Text)"
  456. sed 's/^X//' << 'SHAR_EOF' > Makefile.sco &&
  457. X#  CHK=0x56F7
  458. X#+-------------------------------------------------------------------
  459. X#  Makefile for u386mon for SCO UNIX V/386
  460. X#  ...!emory!n4hgf!wht
  461. X#--------------------------------------------------------------------
  462. X#+:EDITS:*/
  463. X#:06-30-1990-19:06-wht@n4hgf-run nlsym using full pathname
  464. X#:06-27-1990-01:57-wht@n4hgf-1.10 - incorporate suggestions from alpha testers
  465. X#:06-25-1990-04:14-wht@n4hgf-1.03-better error handling
  466. X#:06-21-1990-14:27-r@n4hgf-version x0.12 seems bug free
  467. X#:06-19-1990-21:37-wht@n4hgf-get ready for 0.08 release
  468. X
  469. X#------------> CFLAGS 
  470. X# Add -DVPIX if you have VP/ix
  471. X# Add -DMERGE386 if you have Merge/386
  472. XCFLAGS = -c -Octl -DLINT_ARGS
  473. X#CFLAGS = -c -Octl -DVPIX
  474. X#CFLAGS = -c -Octl -DMERGE386
  475. X
  476. X#------------> LIB
  477. XLIB = -lpanel -ltinfo -lx
  478. X#LIB = -lpanel -lcurses -lx
  479. X
  480. X#------------> KMEMGRP
  481. XKMEMGRP = mem
  482. X#KMEMGRP = sys
  483. X
  484. X#------------> BINDIR
  485. XBINDIR = /usr/local/bin
  486. X
  487. XLDFLAGS = -s
  488. X
  489. XVERSION = 2.00
  490. X
  491. X#handle Sys V make "feature" of using SHELL
  492. XSHELL = /bin/sh
  493. X
  494. X#FCRC = fcrc -u $*.c ;
  495. X.c.o:;    $(FCRC) $(CC) $(CFLAGS) $*.c 
  496. X
  497. XSRC = \
  498. X    bootinfo.c\
  499. X    detail.c\
  500. X    det_proc.c\
  501. X    det_sio.c\
  502. X    disputil.c\
  503. X    libkmem.c\
  504. X    libmem.c\
  505. X    libswap.c\
  506. X    libnlsym.c\
  507. X    nlsym.c\
  508. X    proc.c\
  509. X    tune.c\
  510. X    u386mon.c\
  511. X    var.c
  512. X
  513. XHDR = \
  514. X    libkmem.h\
  515. X    libmem.h\
  516. X    libswap.h\
  517. X    libnlsym.h\
  518. X    lint_args.h\
  519. X    nlsym.h\
  520. X    u386mon.h
  521. X
  522. XNLSYM_OBJ =\
  523. X    nlsym.o
  524. X
  525. XU386MON_OBJ =\
  526. X    u386mon.o\
  527. X    detail.o\
  528. X    det_proc.o\
  529. X    det_sio.o\
  530. X    bootinfo.o\
  531. X    proc.o\
  532. X    tune.o\
  533. X    var.o\
  534. X    disputil.o\
  535. X    libkmem.o\
  536. X    libmem.o\
  537. X    libswap.o\
  538. X    libnlsym.o
  539. X
  540. XSHARFLS = \
  541. X    README\
  542. X    EXPLAIN\
  543. X    Makefile.sco\
  544. X    Makefile.isc\
  545. X    $(SRC)\
  546. X    $(HDR)\
  547. X    renice/Makefile\
  548. X    renice/renice.c\
  549. X    uutool/README\
  550. X    uutool/Makefile\
  551. X    uutool/*.c
  552. X
  553. Xall: nlsym u386mon
  554. X
  555. X#must run as root
  556. Xinstall: all
  557. X    cp nlsym $(BINDIR)
  558. X    chown bin $(BINDIR)/nlsym
  559. X    chgrp bin $(BINDIR)/nlsym
  560. X    chmod 711 $(BINDIR)/nlsym
  561. X    mv u386mon $(BINDIR)
  562. X    chown bin $(BINDIR)/u386mon
  563. X    chgrp $(KMEMGRP) $(BINDIR)/u386mon
  564. X    chmod 2711 $(BINDIR)/u386mon
  565. X    $(BINDIR)/nlsym
  566. X    @echo ' ';echo 'csh users rehash before executing'
  567. X
  568. Xnlsym: $(NLSYM_OBJ)
  569. X    $(CC) $(LDFLAGS) -o $@ $(NLSYM_OBJ) $(LIB)
  570. X
  571. Xu386mon: $(U386MON_OBJ)
  572. X    $(CC) $(LDFLAGS) -o $@ $(U386MON_OBJ) $(LIB)
  573. X
  574. X/unix.nlsym: nlsym /unix
  575. X    $(BINDIR)/nlsym
  576. X    chmod 644 /unix.nlsym
  577. X
  578. X#not delivered
  579. Xsrc.fls: $(SRC) Makefile
  580. X    ls $(SRC) > src.fls
  581. Xlint_args: src.fls
  582. X    echo ' ' > lint_args.h
  583. X    csh zgcc src.fls lint_args.h $(CFLAGS)
  584. X
  585. Xclean:
  586. X    rm -f $(U386MON_OBJ) $(NLSYM_OBJ) \
  587. X        core u386mon.lint Makefile.bak src.fls mkdep.*
  588. X
  589. Xclobber: clean
  590. X    rm -f nlsym u386mon
  591. X
  592. Xlint:
  593. X    lint -ux *.c > u386mon.lint
  594. X
  595. X#for shar 3.27 or later
  596. Xshar:
  597. X    shar -a -n u386mon.$(VERSION) -l 55 -o $(VERSION).sh $(SHARFLS)
  598. X
  599. X# MAKE DEPEND: regenerate .c:.h, .ol:.c, .ol:.asm dependencies automatically
  600. X#
  601. Xdepend:
  602. X        rm -f mkdep.rule.tmp
  603. X        if test '$(SRC)' ;\
  604. X        then (grep '^#include' $(SRC) \
  605. X        | sed    -e 's?:[^<]*<\([^>]*\)>.*?: /usr/include/\1?'\
  606. X            -e 's?:[^"]*"\([^"]*\)".*?: \1?'\
  607. X            -e 's?\(.*\)\.c?\1.o?'\
  608. X         >> mkdep.rule.tmp) ;\
  609. X        fi
  610. X
  611. X        echo '/^# DO NOT DELETE THIS LINE' >mkdep.ex.tmp
  612. X        echo '.+1,$$d' >>mkdep.ex.tmp
  613. X        echo 'r mkdep.rule.tmp' >> mkdep.ex.tmp
  614. X        echo 'w' >> mkdep.ex.tmp
  615. X        cp Makefile Makefile.new
  616. X        ex Makefile.new < mkdep.ex.tmp
  617. X        rm mkdep.ex.tmp mkdep.rule.tmp
  618. X        echo '#    DEPENDENCIES MUST END AT END OF    FILE' >>Makefile.new
  619. X        echo '#    IF YOU PUT STUFF HERE IT WILL GO AWAY'>>Makefile.new
  620. X        echo '#    see make depend    above'>>Makefile.new
  621. X        mv Makefile Makefile.bak
  622. X        mv Makefile.new Makefile
  623. X
  624. X# DO NOT DELETE THIS LINE
  625. Xbootinfo.o: /usr/include/curses.h
  626. Xbootinfo.o: /usr/include/panel.h
  627. Xbootinfo.o: /usr/include/sys/types.h
  628. Xbootinfo.o: /usr/include/sys/bootinfo.h
  629. Xbootinfo.o: u386mon.h
  630. Xdetail.o: /usr/include/curses.h
  631. Xdetail.o: /usr/include/panel.h
  632. Xdetail.o: /usr/include/signal.h
  633. Xdetail.o: /usr/include/string.h
  634. Xdetail.o: /usr/include/fcntl.h
  635. Xdetail.o: /usr/include/nlist.h
  636. Xdetail.o: /usr/include/errno.h
  637. Xdetail.o: /usr/include/time.h
  638. Xdetail.o: /usr/include/pwd.h
  639. Xdetail.o: /usr/include/sys/types.h
  640. Xdetail.o: /usr/include/utmp.h
  641. Xdetail.o: /usr/include/sys/utsname.h
  642. Xdetail.o: /usr/include/sys/stat.h
  643. Xdetail.o: /usr/include/sys/ascii.h
  644. Xdetail.o: /usr/include/sys/param.h
  645. Xdetail.o: /usr/include/sys/bootinfo.h
  646. Xdetail.o: /usr/include/sys/tuneable.h
  647. Xdetail.o: /usr/include/sys/sysinfo.h
  648. Xdetail.o: /usr/include/sys/sysmacros.h
  649. Xdetail.o: /usr/include/sys/immu.h
  650. Xdetail.o: /usr/include/sys/region.h
  651. Xdetail.o: /usr/include/sys/proc.h
  652. Xdetail.o: /usr/include/sys/var.h
  653. Xdetail.o: nlsym.h
  654. Xdetail.o: libkmem.h
  655. Xdetail.o: libnlsym.h
  656. Xdetail.o: u386mon.h
  657. Xdet_proc.o: /usr/include/curses.h
  658. Xdet_proc.o: /usr/include/panel.h
  659. Xdet_proc.o: /usr/include/signal.h
  660. Xdet_proc.o: /usr/include/string.h
  661. Xdet_proc.o: /usr/include/fcntl.h
  662. Xdet_proc.o: /usr/include/nlist.h
  663. Xdet_proc.o: /usr/include/errno.h
  664. Xdet_proc.o: /usr/include/time.h
  665. Xdet_proc.o: /usr/include/pwd.h
  666. Xdet_proc.o: /usr/include/sys/types.h
  667. Xdet_proc.o: /usr/include/utmp.h
  668. Xdet_proc.o: /usr/include/sys/stat.h
  669. Xdet_proc.o: /usr/include/sys/ascii.h
  670. Xdet_proc.o: /usr/include/sys/param.h
  671. Xdet_proc.o: /usr/include/sys/bootinfo.h
  672. Xdet_proc.o: /usr/include/sys/tuneable.h
  673. Xdet_proc.o: /usr/include/sys/sysinfo.h
  674. Xdet_proc.o: /usr/include/sys/sysmacros.h
  675. Xdet_proc.o: /usr/include/sys/immu.h
  676. Xdet_proc.o: /usr/include/sys/region.h
  677. Xdet_proc.o: /usr/include/sys/proc.h
  678. Xdet_proc.o: /usr/include/sys/fs/s5dir.h
  679. Xdet_proc.o: /usr/include/sys/user.h
  680. Xdet_proc.o: /usr/include/sys/var.h
  681. Xdet_proc.o: nlsym.h
  682. Xdet_proc.o: libkmem.h
  683. Xdet_proc.o: libmem.h
  684. Xdet_proc.o: libswap.h
  685. Xdet_proc.o: libnlsym.h
  686. Xdet_proc.o: u386mon.h
  687. Xdet_sio.o: /usr/include/curses.h
  688. Xdet_sio.o: /usr/include/panel.h
  689. Xdet_sio.o: /usr/include/string.h
  690. Xdet_sio.o: /usr/include/nlist.h
  691. Xdet_sio.o: /usr/include/sys/types.h
  692. Xdet_sio.o: /usr/include/sys/stat.h
  693. Xdet_sio.o: /usr/include/sys/ascii.h
  694. Xdet_sio.o: /usr/include/sys/param.h
  695. Xdet_sio.o: /usr/include/sys/tty.h
  696. Xdet_sio.o: nlsym.h
  697. Xdet_sio.o: libkmem.h
  698. Xdet_sio.o: libmem.h
  699. Xdet_sio.o: libswap.h
  700. Xdet_sio.o: libnlsym.h
  701. Xdet_sio.o: u386mon.h
  702. Xdisputil.o: /usr/include/curses.h
  703. Xdisputil.o: /usr/include/panel.h
  704. Xdisputil.o: /usr/include/sys/types.h
  705. Xdisputil.o: u386mon.h
  706. Xlibkmem.o: /usr/include/sys/types.h
  707. Xlibkmem.o: /usr/include/fcntl.h
  708. Xlibkmem.o: libkmem.h
  709. Xlibmem.o: /usr/include/sys/types.h
  710. Xlibmem.o: /usr/include/fcntl.h
  711. Xlibmem.o: libmem.h
  712. Xlibswap.o: /usr/include/sys/types.h
  713. Xlibswap.o: /usr/include/fcntl.h
  714. Xlibswap.o: libswap.h
  715. Xlibnlsym.o: /usr/include/stdio.h
  716. Xlibnlsym.o: /usr/include/sys/types.h
  717. Xlibnlsym.o: /usr/include/sys/stat.h
  718. Xlibnlsym.o: /usr/include/fcntl.h
  719. Xlibnlsym.o: /usr/include/nlist.h
  720. Xlibnlsym.o: nlsym.h
  721. Xlibnlsym.o: libnlsym.h
  722. Xnlsym.o: /usr/include/stdio.h
  723. Xnlsym.o: /usr/include/sys/types.h
  724. Xnlsym.o: /usr/include/sys/stat.h
  725. Xnlsym.o: /usr/include/fcntl.h
  726. Xnlsym.o: /usr/include/nlist.h
  727. Xnlsym.o: nlsym.h
  728. Xproc.o: /usr/include/curses.h
  729. Xproc.o: /usr/include/panel.h
  730. Xproc.o: /usr/include/sys/types.h
  731. Xproc.o: /usr/include/sys/param.h
  732. Xproc.o: /usr/include/sys/immu.h
  733. Xproc.o: /usr/include/sys/region.h
  734. Xproc.o: /usr/include/sys/proc.h
  735. Xproc.o: /usr/include/sys/var.h
  736. Xproc.o: /usr/include/nlist.h
  737. Xproc.o: nlsym.h
  738. Xproc.o: libkmem.h
  739. Xproc.o: libnlsym.h
  740. Xproc.o: u386mon.h
  741. Xtune.o: /usr/include/curses.h
  742. Xtune.o: /usr/include/panel.h
  743. Xtune.o: /usr/include/sys/types.h
  744. Xtune.o: /usr/include/sys/tuneable.h
  745. Xtune.o: u386mon.h
  746. Xu386mon.o: /usr/include/curses.h
  747. Xu386mon.o: /usr/include/panel.h
  748. Xu386mon.o: /usr/include/signal.h
  749. Xu386mon.o: /usr/include/string.h
  750. Xu386mon.o: /usr/include/fcntl.h
  751. Xu386mon.o: /usr/include/nlist.h
  752. Xu386mon.o: /usr/include/errno.h
  753. Xu386mon.o: /usr/include/time.h
  754. Xu386mon.o: /usr/include/sys/types.h
  755. Xu386mon.o: /usr/include/sys/lock.h
  756. Xu386mon.o: /usr/include/sys/utsname.h
  757. Xu386mon.o: /usr/include/sys/stat.h
  758. Xu386mon.o: /usr/include/sys/ascii.h
  759. Xu386mon.o: /usr/include/sys/param.h
  760. Xu386mon.o: /usr/include/sys/bootinfo.h
  761. Xu386mon.o: /usr/include/sys/tuneable.h
  762. Xu386mon.o: /usr/include/sys/sysinfo.h
  763. Xu386mon.o: /usr/include/sys/sysmacros.h
  764. Xu386mon.o: /usr/include/sys/immu.h
  765. Xu386mon.o: /usr/include/sys/region.h
  766. Xu386mon.o: /usr/include/sys/proc.h
  767. Xu386mon.o: /usr/include/sys/var.h
  768. Xu386mon.o: nlsym.h
  769. Xu386mon.o: libkmem.h
  770. Xu386mon.o: libmem.h
  771. Xu386mon.o: libswap.h
  772. Xu386mon.o: libnlsym.h
  773. Xu386mon.o: u386mon.h
  774. Xvar.o: /usr/include/curses.h
  775. Xvar.o: /usr/include/panel.h
  776. Xvar.o: /usr/include/sys/types.h
  777. Xvar.o: /usr/include/sys/var.h
  778. Xvar.o: u386mon.h
  779. X#    DEPENDENCIES MUST END AT END OF    FILE
  780. X#    IF YOU PUT STUFF HERE IT WILL GO AWAY
  781. X#    see make depend    above
  782. SHAR_EOF
  783. $TOUCH -am 0715025090 Makefile.sco &&
  784. chmod 0644 Makefile.sco ||
  785. echo "restore of Makefile.sco failed"
  786. set `wc -c Makefile.sco`;Wc_c=$1
  787. if test "$Wc_c" != "8264"; then
  788.     echo original size 8264, current size $Wc_c
  789. fi
  790. # ============= Makefile.isc ==============
  791. echo "x - extracting Makefile.isc (Text)"
  792. sed 's/^X//' << 'SHAR_EOF' > Makefile.isc &&
  793. X#  CHK=0xF36B
  794. X#+-------------------------------------------------------------------
  795. X#  Makefile for u386mon for ISC 386/ix
  796. X#  ...!emory!n4hgf!wht
  797. X#--------------------------------------------------------------------
  798. X#+:EDITS:*/
  799. X#:06-27-1990-01:57-wht@n4hgf-1.10 - incorporate suggestions from alpha testers
  800. X#:06-25-1990-04:14-wht@n4hgf-1.03-better error handling
  801. X#:06-24-1990-20:53-wht@n4hgf-v1.01-add ISC support thanks to peter@radig.de
  802. X#:06-21-1990-14:27-r@n4hgf-version x0.12 seems bug free
  803. X#:06-19-1990-21:37-wht@n4hgf-get ready for 0.08 release
  804. X
  805. X#------------> CFLAGS 
  806. X# Add -DVPIX if you have VP/ix
  807. X# Add -DMERGE386 if you have Merge/386
  808. XCFLAGS = -c -O -DISC
  809. X#CFLAGS = -c -O -DVPIX -DISC
  810. X#CFLAGS = -c -O -DMERGE386 -DISC
  811. X
  812. X#------------> LIB
  813. X#LIB = -lpanel -ltinfo -lx
  814. XLIB = -lpanel -lcurses -lx -lmalloc -lc_s
  815. X
  816. X#------------> KMEMGRP
  817. X#KMEMGRP = mem
  818. XKMEMGRP = sys
  819. X
  820. X#------------> BINDIR
  821. XBINDIR = /usr/local/bin
  822. X
  823. XLDFLAGS = -s
  824. X
  825. XVERSION = 2.00
  826. X
  827. X#handle Sys V make "feature" of using SHELL
  828. XSHELL = /bin/sh
  829. X
  830. X#FCRC = fcrc -u $*.c ;
  831. X.c.o:;    $(FCRC) $(CC) $(CFLAGS) $*.c 
  832. X
  833. XSRC = \
  834. X    bootinfo.c\
  835. X    detail.c\
  836. X    det_proc.c\
  837. X    det_sio.c\
  838. X    disputil.c\
  839. X    libkmem.c\
  840. X    libmem.c\
  841. X    libswap.c\
  842. X    libnlsym.c\
  843. X    nlsym.c\
  844. X    proc.c\
  845. X    tune.c\
  846. X    u386mon.c\
  847. X    var.c
  848. X
  849. XHDR = \
  850. X    libkmem.h\
  851. X    libmem.h\
  852. X    libswap.h\
  853. X    libnlsym.h\
  854. X    lint_args.h\
  855. X    nlsym.h\
  856. X    u386mon.h
  857. X
  858. XNLSYM_OBJ =\
  859. X    nlsym.o
  860. X
  861. XU386MON_OBJ =\
  862. X    u386mon.o\
  863. X    detail.o\
  864. X    det_proc.o\
  865. X    bootinfo.o\
  866. X    proc.o\
  867. X    tune.o\
  868. X    var.o\
  869. X    disputil.o\
  870. X    libkmem.o\
  871. X    libmem.o\
  872. X    libswap.o\
  873. X    libnlsym.o
  874. X
  875. XSHARFLS = \
  876. X    README\
  877. X    EXPLAIN\
  878. X    Makefile.sco\
  879. X    Makefile.isc\
  880. X    $(SRC)\
  881. X    $(HDR)\
  882. X    renice/Makefile\
  883. X    renice/renice.c\
  884. X    uutool/README\
  885. X    uutool/Makefile\
  886. X    uutool/*.c
  887. X
  888. Xall: nlsym u386mon
  889. X
  890. X#must run as root
  891. Xinstall: all
  892. X    mv $(BINDIR)/nlsym $(BINDIR)/nlsym.old
  893. X    cp nlsym $(BINDIR)
  894. X    chown bin $(BINDIR)/nlsym
  895. X    chgrp bin $(BINDIR)/nlsym
  896. X    chmod 711 $(BINDIR)/nlsym
  897. X    mv $(BINDIR)/u386mon $(BINDIR)/u386mon.old
  898. X    cp u386mon $(BINDIR)
  899. X    chown bin $(BINDIR)/u386mon
  900. X    chgrp $(KMEMGRP) $(BINDIR)/u386mon
  901. X    chmod 2711 $(BINDIR)/u386mon
  902. X    chmod g+r /dev/swap
  903. X    $(BINDIR)/nlsym
  904. X    @echo ' ';echo 'csh users rehash before executing'
  905. X
  906. Xnlsym: $(NLSYM_OBJ)
  907. X    $(CC) $(LDFLAGS) -o $@ $(NLSYM_OBJ) $(LIB)
  908. X
  909. Xu386mon: $(U386MON_OBJ)
  910. X    $(CC) $(LDFLAGS) -o $@ $(U386MON_OBJ) $(LIB)
  911. X
  912. X/unix.nlsym: nlsym /unix
  913. X    $(BINDIR)/nlsym
  914. X    chmod 644 /unix.nlsym
  915. X
  916. X#not delivered
  917. Xsrc.fls: $(SRC) Makefile
  918. X    ls $(SRC) > src.fls
  919. Xlint_args: src.fls
  920. X    echo ' ' > lint_args.h
  921. X    csh zgcc src.fls lint_args.h $(CFLAGS)
  922. X
  923. Xclean:
  924. X    rm -f $(U386MON_OBJ) $(NLSYM_OBJ) \
  925. X        core u386mon.lint Makefile.bak src.fls mkdep.*
  926. X
  927. Xclobber: clean
  928. X    rm -f nlsym u386mon
  929. X
  930. Xlint:
  931. X    lint -ux *.c > u386mon.lint
  932. X
  933. X#for shar 3.27 or later
  934. Xshar:
  935. X    shar -a -n u386mon.$(VERSION) -l 55 -o $(VERSION).sh $(SHARFLS)
  936. X
  937. X# MAKE DEPEND: regenerate .c:.h, .ol:.c, .ol:.asm dependencies automatically
  938. X#
  939. Xdepend:
  940. X        rm -f mkdep.rule.tmp
  941. X        if test '$(SRC)' ;\
  942. X        then (grep '^#include' $(SRC) \
  943. X        | sed    -e 's?:[^<]*<\([^>]*\)>.*?: /usr/include/\1?'\
  944. X            -e 's?:[^"]*"\([^"]*\)".*?: \1?'\
  945. X            -e 's?\(.*\)\.c?\1.o?'\
  946. X         >> mkdep.rule.tmp) ;\
  947. X        fi
  948. X
  949. X        echo '/^# DO NOT DELETE THIS LINE' >mkdep.ex.tmp
  950. X        echo '.+1,$$d' >>mkdep.ex.tmp
  951. X        echo 'r mkdep.rule.tmp' >> mkdep.ex.tmp
  952. X        echo 'w' >> mkdep.ex.tmp
  953. X        cp Makefile Makefile.new
  954. X        ex Makefile.new < mkdep.ex.tmp
  955. X        rm mkdep.ex.tmp mkdep.rule.tmp
  956. X        echo '#    DEPENDENCIES MUST END AT END OF    FILE' >>Makefile.new
  957. X        echo '#    IF YOU PUT STUFF HERE IT WILL GO AWAY'>>Makefile.new
  958. X        echo '#    see make depend    above'>>Makefile.new
  959. X        mv Makefile Makefile.bak
  960. X        mv Makefile.new Makefile
  961. X
  962. X# DO NOT DELETE THIS LINE
  963. Xbootinfo.o: /usr/include/curses.h
  964. Xbootinfo.o: /usr/include/panel.h
  965. Xbootinfo.o: /usr/include/sys/types.h
  966. Xbootinfo.o: /usr/include/sys/bootinfo.h
  967. Xbootinfo.o: u386mon.h
  968. Xdetail.o: /usr/include/curses.h
  969. Xdetail.o: /usr/include/panel.h
  970. Xdetail.o: /usr/include/signal.h
  971. Xdetail.o: /usr/include/string.h
  972. Xdetail.o: /usr/include/fcntl.h
  973. Xdetail.o: /usr/include/nlist.h
  974. Xdetail.o: /usr/include/errno.h
  975. Xdetail.o: /usr/include/time.h
  976. Xdetail.o: /usr/include/pwd.h
  977. Xdetail.o: /usr/include/sys/types.h
  978. Xdetail.o: /usr/include/utmp.h
  979. Xdetail.o: /usr/include/sys/utsname.h
  980. Xdetail.o: /usr/include/sys/stat.h
  981. Xdetail.o: /usr/include/sys/ascii.h
  982. Xdetail.o: /usr/include/sys/param.h
  983. Xdetail.o: /usr/include/sys/bootinfo.h
  984. Xdetail.o: /usr/include/sys/tuneable.h
  985. Xdetail.o: /usr/include/sys/sysinfo.h
  986. Xdetail.o: /usr/include/sys/sysmacros.h
  987. Xdetail.o: /usr/include/sys/immu.h
  988. Xdetail.o: /usr/include/sys/region.h
  989. Xdetail.o: /usr/include/sys/proc.h
  990. Xdetail.o: /usr/include/sys/var.h
  991. Xdetail.o: nlsym.h
  992. Xdetail.o: libkmem.h
  993. Xdetail.o: libnlsym.h
  994. Xdetail.o: u386mon.h
  995. Xdet_proc.o: /usr/include/curses.h
  996. Xdet_proc.o: /usr/include/panel.h
  997. Xdet_proc.o: /usr/include/signal.h
  998. Xdet_proc.o: /usr/include/string.h
  999. Xdet_proc.o: /usr/include/fcntl.h
  1000. Xdet_proc.o: /usr/include/nlist.h
  1001. Xdet_proc.o: /usr/include/errno.h
  1002. Xdet_proc.o: /usr/include/time.h
  1003. Xdet_proc.o: /usr/include/pwd.h
  1004. Xdet_proc.o: /usr/include/sys/types.h
  1005. Xdet_proc.o: /usr/include/utmp.h
  1006. Xdet_proc.o: /usr/include/sys/stat.h
  1007. Xdet_proc.o: /usr/include/sys/ascii.h
  1008. Xdet_proc.o: /usr/include/sys/param.h
  1009. Xdet_proc.o: /usr/include/sys/bootinfo.h
  1010. Xdet_proc.o: /usr/include/sys/tuneable.h
  1011. Xdet_proc.o: /usr/include/sys/sysinfo.h
  1012. Xdet_proc.o: /usr/include/sys/sysmacros.h
  1013. Xdet_proc.o: /usr/include/sys/immu.h
  1014. Xdet_proc.o: /usr/include/sys/region.h
  1015. Xdet_proc.o: /usr/include/sys/proc.h
  1016. Xdet_proc.o: /usr/include/sys/fs/s5dir.h
  1017. Xdet_proc.o: /usr/include/sys/user.h
  1018. Xdet_proc.o: /usr/include/sys/var.h
  1019. Xdet_proc.o: nlsym.h
  1020. Xdet_proc.o: libkmem.h
  1021. Xdet_proc.o: libmem.h
  1022. Xdet_proc.o: libswap.h
  1023. Xdet_proc.o: libnlsym.h
  1024. Xdet_proc.o: u386mon.h
  1025. Xdisputil.o: /usr/include/curses.h
  1026. Xdisputil.o: /usr/include/panel.h
  1027. Xdisputil.o: /usr/include/sys/types.h
  1028. Xdisputil.o: u386mon.h
  1029. Xlibkmem.o: /usr/include/sys/types.h
  1030. Xlibkmem.o: /usr/include/fcntl.h
  1031. Xlibkmem.o: libkmem.h
  1032. Xlibmem.o: /usr/include/sys/types.h
  1033. Xlibmem.o: /usr/include/fcntl.h
  1034. Xlibmem.o: libmem.h
  1035. Xlibswap.o: /usr/include/sys/types.h
  1036. Xlibswap.o: /usr/include/fcntl.h
  1037. Xlibswap.o: libswap.h
  1038. Xlibnlsym.o: /usr/include/stdio.h
  1039. Xlibnlsym.o: /usr/include/sys/types.h
  1040. Xlibnlsym.o: /usr/include/sys/stat.h
  1041. Xlibnlsym.o: /usr/include/fcntl.h
  1042. Xlibnlsym.o: /usr/include/nlist.h
  1043. Xlibnlsym.o: nlsym.h
  1044. Xlibnlsym.o: libnlsym.h
  1045. Xnlsym.o: /usr/include/stdio.h
  1046. Xnlsym.o: /usr/include/sys/types.h
  1047. Xnlsym.o: /usr/include/sys/stat.h
  1048. Xnlsym.o: /usr/include/fcntl.h
  1049. Xnlsym.o: /usr/include/nlist.h
  1050. Xnlsym.o: nlsym.h
  1051. Xproc.o: /usr/include/curses.h
  1052. Xproc.o: /usr/include/panel.h
  1053. Xproc.o: /usr/include/sys/types.h
  1054. Xproc.o: /usr/include/sys/param.h
  1055. Xproc.o: /usr/include/sys/immu.h
  1056. Xproc.o: /usr/include/sys/region.h
  1057. Xproc.o: /usr/include/sys/proc.h
  1058. Xproc.o: /usr/include/sys/var.h
  1059. Xproc.o: /usr/include/nlist.h
  1060. Xproc.o: nlsym.h
  1061. Xproc.o: libkmem.h
  1062. Xproc.o: libnlsym.h
  1063. Xproc.o: u386mon.h
  1064. Xtune.o: /usr/include/curses.h
  1065. Xtune.o: /usr/include/panel.h
  1066. Xtune.o: /usr/include/sys/types.h
  1067. Xtune.o: /usr/include/sys/tuneable.h
  1068. Xtune.o: u386mon.h
  1069. Xu386mon.o: /usr/include/curses.h
  1070. Xu386mon.o: /usr/include/panel.h
  1071. Xu386mon.o: /usr/include/signal.h
  1072. Xu386mon.o: /usr/include/string.h
  1073. Xu386mon.o: /usr/include/fcntl.h
  1074. Xu386mon.o: /usr/include/nlist.h
  1075. Xu386mon.o: /usr/include/errno.h
  1076. Xu386mon.o: /usr/include/time.h
  1077. Xu386mon.o: /usr/include/sys/types.h
  1078. Xu386mon.o: /usr/include/sys/lock.h
  1079. Xu386mon.o: /usr/include/sys/utsname.h
  1080. Xu386mon.o: /usr/include/sys/stat.h
  1081. Xu386mon.o: /usr/include/sys/ascii.h
  1082. Xu386mon.o: /usr/include/sys/param.h
  1083. Xu386mon.o: /usr/include/sys/bootinfo.h
  1084. Xu386mon.o: /usr/include/sys/tuneable.h
  1085. Xu386mon.o: /usr/include/sys/sysinfo.h
  1086. Xu386mon.o: /usr/include/sys/sysmacros.h
  1087. Xu386mon.o: /usr/include/sys/immu.h
  1088. Xu386mon.o: /usr/include/sys/region.h
  1089. Xu386mon.o: /usr/include/sys/proc.h
  1090. Xu386mon.o: /usr/include/sys/var.h
  1091. Xu386mon.o: nlsym.h
  1092. Xu386mon.o: libkmem.h
  1093. Xu386mon.o: libmem.h
  1094. Xu386mon.o: libswap.h
  1095. Xu386mon.o: libnlsym.h
  1096. Xu386mon.o: u386mon.h
  1097. Xvar.o: /usr/include/curses.h
  1098. Xvar.o: /usr/include/panel.h
  1099. Xvar.o: /usr/include/sys/types.h
  1100. Xvar.o: /usr/include/sys/var.h
  1101. Xvar.o: u386mon.h
  1102. X#    DEPENDENCIES MUST END AT END OF    FILE
  1103. X#    IF YOU PUT STUFF HERE IT WILL GO AWAY
  1104. X#    see make depend    above
  1105. SHAR_EOF
  1106. $TOUCH -am 0715025090 Makefile.isc &&
  1107. chmod 0644 Makefile.isc ||
  1108. echo "restore of Makefile.isc failed"
  1109. set `wc -c Makefile.isc`;Wc_c=$1
  1110. if test "$Wc_c" != "7951"; then
  1111.     echo original size 7951, current size $Wc_c
  1112. fi
  1113. # ============= bootinfo.c ==============
  1114. echo "x - extracting bootinfo.c (Text)"
  1115. sed 's/^X//' << 'SHAR_EOF' > bootinfo.c &&
  1116. X/* CHK=0xE205 */
  1117. X/*+-------------------------------------------------------------------------
  1118. X    bootinfo.c - u386mon bootinfo struct display
  1119. X
  1120. X  Defined functions:
  1121. X    bmemf_text(flags)
  1122. X    display_bootinfo(win,y,x)
  1123. X
  1124. XWe try to be dynamic with memory block counts, but if the sum of
  1125. Xmemavailcnt and memusedcnt ever exceeds 7, we will lose in 24 line
  1126. Xsessions (8 in 25 line, 9 in 43 line)
  1127. X
  1128. X
  1129. X--------------------------------------------------------------------------*/
  1130. X/*+:EDITS:*/
  1131. X/*:07-11-1990-17:19-root@n4hgf-more input from trb@ima.ima.isc.com */
  1132. X/*:07-04-1990-01:28-root@n4hgf-alan@cms2.lonestar.org reported missing M_ */
  1133. X/*:06-27-1990-01:57-wht@n4hgf-1.10-incorporate suggestions from alpha testers */
  1134. X/*:06-25-1990-04:14-wht@n4hgf-1.02-better error handling */
  1135. X/*:06-25-1990-03:18-wht@n4hgf-ODT/3.2.1 has B_MEM_CANTDMA not B_MEM_NODMA */
  1136. X/*:06-24-1990-20:53-wht@n4hgf-v1.01-add ISC support thanks to peter@radig.de */
  1137. X/*:06-21-1990-14:26-r@n4hgf-version x0.12 seems bug free */
  1138. X/*:06-17-1990-14:59-wht-creation */
  1139. X
  1140. X#define M_TERMINFO
  1141. X
  1142. X#include <curses.h>
  1143. X#undef timeout /* conflict in curses.h and bootinfo.h per trb@ima.ima.isc.com */
  1144. X#include <panel.h>
  1145. X#include <sys/types.h>
  1146. X#include <sys/bootinfo.h>
  1147. X#include "u386mon.h"
  1148. X
  1149. X/*+-------------------------------------------------------------------------
  1150. X    bmemf_text(flags)
  1151. X--------------------------------------------------------------------------*/
  1152. Xchar *
  1153. Xbmemf_text(flags)
  1154. Xulong flags;
  1155. X{
  1156. Xstatic char hex_errant[16];
  1157. Xulong orig_flags = flags;
  1158. X
  1159. X#ifdef B_MEM_DOWN        /* SCO only */
  1160. X    flags &= ~B_MEM_DOWN;
  1161. X#endif
  1162. X#ifdef B_MEM_BASE        /* ISC only (or is it S5R3.2.2?) */
  1163. X    flags &= ~B_MEM_BASE;
  1164. X#endif
  1165. X#ifdef B_MEM_EXPANS        /* ISC */
  1166. X    flags &= ~B_MEM_EXPANS;
  1167. X#endif
  1168. X#ifdef B_MEM_SHADOW        /* ISC */
  1169. X    flags &= ~B_MEM_SHADOW;
  1170. X#endif
  1171. X#ifdef B_MEM_TREV        /* ISC */
  1172. X    flags &= ~B_MEM_TREV;
  1173. X#endif
  1174. X
  1175. X    if(!flags)
  1176. X        return("    ");
  1177. X    switch(flags)
  1178. X    {
  1179. X#ifdef B_MEM_RSRVD
  1180. X        case B_MEM_RSRVD: return("RSVD");
  1181. X#endif
  1182. X#ifdef B_MEM_KBSS
  1183. X        case B_MEM_KBSS:  return("KBSS");
  1184. X#endif
  1185. X#ifdef B_MEM_KTEXT
  1186. X        case B_MEM_KTEXT: return("KTXT");
  1187. X#endif
  1188. X#ifdef B_MEM_KDATA
  1189. X        case B_MEM_KDATA: return("KDTA");
  1190. X#endif
  1191. X#ifdef B_MEM_NODMA
  1192. X        case B_MEM_NODMA: return("NODM");
  1193. X#endif
  1194. X#ifdef B_MEM_CANTDMA
  1195. X        case B_MEM_CANTDMA: return("NODM");
  1196. X#endif
  1197. X    }
  1198. X    sprintf(hex_errant,"%04x",(ushort)orig_flags);
  1199. X    return(hex_errant);
  1200. X}    /* end of bmemf_text */
  1201. X
  1202. X/*+-------------------------------------------------------------------------
  1203. X    ISC_machinetype_text(machine)
  1204. X--------------------------------------------------------------------------*/
  1205. X#ifdef ME_COMPAQVGA    /* ISC machdep.h */
  1206. Xchar *
  1207. XISC_machinetype_text(machine)
  1208. Xunsigned char machine;
  1209. X{
  1210. X
  1211. X    switch(machine)
  1212. X    {
  1213. X#ifdef M_UNKNOWN    /* some ISC bootinfo.h do not have these */
  1214. X        case M_UNKNOWN:
  1215. X            return("");
  1216. X            break;
  1217. X#endif
  1218. X#ifdef M_COMPAQ
  1219. X        case M_COMPAQ:
  1220. X            return("Compaq");
  1221. X            break;
  1222. X#endif
  1223. X#ifdef M_PS2
  1224. X        case M_PS2:
  1225. X            return("PS/2");
  1226. X            break;
  1227. X#endif
  1228. X#ifdef M_AT
  1229. X        case M_AT:
  1230. X            return("Generic 386");
  1231. X            break;
  1232. X#endif
  1233. X#ifdef M_ATT
  1234. X        case M_ATT:
  1235. X            return("AT&T 6386");
  1236. X            break;
  1237. X#endif
  1238. X#ifdef M_ATT5
  1239. X        case M_ATT5:
  1240. X            return("AT&T 6386");
  1241. X            break;
  1242. X#endif
  1243. X#ifdef M_M380
  1244. X        case M_M380:
  1245. X            return("Olivetti M380");
  1246. X            break;
  1247. X#endif
  1248. X#ifdef M_DELL
  1249. X        case M_DELL:
  1250. X            return("Dell 386");
  1251. X            break;
  1252. X#endif
  1253. X#ifdef M_D325
  1254. X        case M_D325:
  1255. X            return("Dell 325");
  1256. X            break;
  1257. X#endif
  1258. X#ifdef M_ALR
  1259. X        case M_ALR:
  1260. X            return("Adv Logic Res");
  1261. X            break;
  1262. X#endif
  1263. X#ifdef M_ZDS
  1264. X        case M_ZDS:
  1265. X            return("Zenith Data");
  1266. X            break;
  1267. X#endif
  1268. X    }
  1269. X    return("i386");
  1270. X}    /* end of ISC_machinetype_text */
  1271. X#endif
  1272. X
  1273. X/*+-------------------------------------------------------------------------
  1274. X    ISC_displaytype_text(adapter)
  1275. X--------------------------------------------------------------------------*/
  1276. X#ifdef ME_COMPAQVGA    /* ISC machdep.h */
  1277. Xchar *
  1278. XISC_displaytype_text(adapter)
  1279. Xunsigned char adapter;
  1280. X{
  1281. X
  1282. X    switch(adapter)
  1283. X    {
  1284. X        case ME_UNKNOWN:
  1285. X            return("unknown to sys");
  1286. X            break;
  1287. X        case ME_EGA:
  1288. X            return("EGA");
  1289. X            break;
  1290. X        case ME_CGA80:
  1291. X            return("CGA");
  1292. X            break;
  1293. X        case ME_MONO:
  1294. X            return("MONO");
  1295. X            break;
  1296. X        case ME_COMPAQHR:
  1297. X            return("Compaq mono");
  1298. X            break;
  1299. X        case ME_Z449:
  1300. X            return("Zenith Z449");
  1301. X            break;
  1302. X        case ME_T5100:
  1303. X            return("Toshiba T5100");
  1304. X            break;
  1305. X        case ME_COMPAQVGA:
  1306. X            return("Compaq VGA");
  1307. X            break;
  1308. X        case ME_OTHERVGA:
  1309. X            return("VGA");
  1310. X            break;
  1311. X#ifdef ME_PVGA1
  1312. X        case ME_PVGA1:
  1313. X            return("Paradise VGA1");
  1314. X            break;
  1315. X#endif /*ME_PVGA1*/
  1316. X#ifdef ME_V7VGA
  1317. X        case ME_V7VGA:
  1318. X            return("Video 7 VGA");
  1319. X            break;
  1320. X#endif /*ME_V7VGA*/
  1321. X    }
  1322. X    return("???");
  1323. X}    /* end of ISC_displaytype_text */
  1324. X#endif
  1325. X
  1326. X/*+-------------------------------------------------------------------------
  1327. X    display_bootinfo(win,y,x)
  1328. X--------------------------------------------------------------------------*/
  1329. Xvoid
  1330. Xdisplay_bootinfo(win,y,x)
  1331. XWINDOW *win;
  1332. Xint y;
  1333. Xint x;
  1334. X{
  1335. Xregister itmp;
  1336. Xregister struct bootmem *bmem;
  1337. X
  1338. X    use_cp(win,cpBANNER);
  1339. X    wmove(win,y++,x);
  1340. X    waddstr(win,"-- Bootinfo ----------");
  1341. X#ifdef M_UNIX    /* ISC doesn't have this in struct */
  1342. X    wmove(win,y++,x);
  1343. X    disp_static_long(win,"basemem  ","%7ldk     ",bootinfo.basemem / 1024);
  1344. X    wmove(win,y++,x);
  1345. X    disp_static_long(win,"extmem   ","%7ldk     ",bootinfo.extmem / 1024);
  1346. X#endif
  1347. X#ifdef ME_COMPAQVGA    /* ISC machdep.h */
  1348. X    wmove(win,y++,x);
  1349. X    wprintw(win,"machine %14.14s",
  1350. X        ISC_machinetype_text(bootinfo.machenv.machine));
  1351. X    wmove(win,y++,x);
  1352. X    wprintw(win,"disp %17.17s",
  1353. X        ISC_displaytype_text(bootinfo.machenv.adapter));
  1354. X#endif
  1355. X    wmove(win,y++,x);
  1356. X    disp_static_long(win,"bflags   ","%08lx     ",bootinfo.bootflags);
  1357. X
  1358. X    wmove(win,y++,x); waddstr(win,"memory available      ");
  1359. X    for(itmp = 0; itmp < bootinfo.memavailcnt; itmp++)
  1360. X    {
  1361. X        bmem = &bootinfo.memavail[itmp];
  1362. X#ifdef B_MEM_DOWN
  1363. X        if(bmem->flags & B_MEM_DOWN)
  1364. X        {
  1365. X            bmem->base -= bmem->extent;
  1366. X            bmem->flags &= ~B_MEM_DOWN;
  1367. X        }
  1368. X#endif
  1369. X        wmove(win,y++,x);
  1370. X        wprintw(win,"%08lx %08lx %s",bmem->base,bmem->extent,
  1371. X            bmemf_text(bmem->flags));
  1372. X    }
  1373. X
  1374. X    wmove(win,y++,x); waddstr(win,"memory used           ");
  1375. X    for(itmp = 0; itmp < bootinfo.memusedcnt; itmp++)
  1376. X    {
  1377. X        bmem = &bootinfo.memused[itmp];
  1378. X#ifdef B_MEM_DOWN
  1379. X        if(bmem->flags & B_MEM_DOWN)
  1380. X        {
  1381. X            bmem->base -= bmem->extent;
  1382. X            bmem->flags &= ~B_MEM_DOWN;
  1383. X        }
  1384. X#endif
  1385. X        wmove(win,y++,x);
  1386. X        wprintw(win,"%08lx %08lx %s",bmem->base,bmem->extent,
  1387. X            bmemf_text(bmem->flags));
  1388. X    }
  1389. X
  1390. X}    /* end of display_bootinfo */
  1391. X
  1392. X/* vi: set tabstop=4 shiftwidth=4: */
  1393. X/* end of bootinfo.c */
  1394. SHAR_EOF
  1395. $TOUCH -am 0715025090 bootinfo.c &&
  1396. chmod 0644 bootinfo.c ||
  1397. echo "restore of bootinfo.c failed"
  1398. set `wc -c bootinfo.c`;Wc_c=$1
  1399. if test "$Wc_c" != "6342"; then
  1400.     echo original size 6342, current size $Wc_c
  1401. fi
  1402. # ============= detail.c ==============
  1403. echo "x - extracting detail.c (Text)"
  1404. sed 's/^X//' << 'SHAR_EOF' > detail.c &&
  1405. X/* CHK=0xCDFD */
  1406. X/*+-------------------------------------------------------------------------
  1407. X    detail.c - UNIX 386 system monitor detail window
  1408. X
  1409. X  Defined functions:
  1410. X    detail_init()
  1411. X    detail_panel_cmd(cmd)
  1412. X    detail_panel_update()
  1413. X    detpanel_destroy()
  1414. X    detpanel_extra_init()
  1415. X    detpanel_extra_update()
  1416. X    detpanel_ps_init(full43)
  1417. X    detpanel_ps_update()
  1418. X    detpanel_sio_init()
  1419. X    detpanel_sio_update()
  1420. X
  1421. X--------------------------------------------------------------------------*/
  1422. X/*+:EDITS:*/
  1423. X/*:07-10-1990-14:53-root@n4hgf-clear msg line on detail cmd - fix 24-line bug */
  1424. X/*:06-27-1990-01:57-wht@n4hgf-1.10-incorporate suggestions from alpha testers */
  1425. X/*:06-25-1990-17:34-wht@n4hgf-add detail extra for 25 line tubes */
  1426. X/*:06-25-1990-04:14-wht@n4hgf-1.02-better error handling */
  1427. X/*:06-24-1990-20:53-wht@n4hgf-v1.01-add ISC support thanks to peter@radig.de */
  1428. X/*:06-21-1990-14:26-r@n4hgf-version x0.12 seems bug free */
  1429. X/*:06-15-1990-18:32-wht@n4hgf-creation */
  1430. X
  1431. X#define M_TERMINFO
  1432. X
  1433. X#include <curses.h>
  1434. X#undef timeout /* conflict in curses.h and bootinfo.h per trb@ima.ima.isc.com */
  1435. X#include <panel.h>
  1436. X#include <signal.h>
  1437. X#include <string.h>
  1438. X#include <fcntl.h>
  1439. X#include <nlist.h>
  1440. X#include <errno.h>
  1441. X#include <time.h>
  1442. X#include <pwd.h>
  1443. X#include <sys/types.h>
  1444. X#include <utmp.h>
  1445. X#include <sys/utsname.h>
  1446. X#include <sys/stat.h>
  1447. X#include <sys/ascii.h>
  1448. X#undef NGROUPS_MAX
  1449. X#undef NULL
  1450. X#include <sys/param.h>
  1451. X#include <sys/bootinfo.h>
  1452. X#include <sys/tuneable.h>
  1453. X#include <sys/sysinfo.h>
  1454. X#include <sys/sysmacros.h>
  1455. X#include <sys/immu.h>
  1456. X#include <sys/region.h>
  1457. X#include <sys/proc.h>
  1458. X#include <sys/var.h>
  1459. X
  1460. X#include "nlsym.h"
  1461. X#include "libkmem.h"
  1462. X#include "libnlsym.h"
  1463. X#include "u386mon.h"
  1464. X
  1465. X#define DPT_NONE        0
  1466. X#define DPT_PS            1
  1467. X#define DPT_PS_LONG        2
  1468. X#define DPT_EXTRA        3
  1469. X#define DPT_SIO            4
  1470. X
  1471. XPANEL *mkpanel();
  1472. X
  1473. Xextern PANEL *pscr;
  1474. Xextern WINDOW *wscr;
  1475. X
  1476. XPANEL *pdet;
  1477. XWINDOW *wdet = (WINDOW *)0;
  1478. Xu_char detpanel_type = DPT_NONE;
  1479. Xint detpanel_length;
  1480. Xint detpanel_cols;
  1481. X
  1482. X/*+-------------------------------------------------------------------------
  1483. X    detpanel_ps_init(full43)
  1484. X--------------------------------------------------------------------------*/
  1485. Xvoid
  1486. Xdetpanel_ps_init(full43)
  1487. Xint full43;
  1488. X{
  1489. X/*
  1490. X#define DETAIL_PS_COLS ((LINES >= 43) ? EXTRA4_TLX - 1 : PER_SEC4_TLX)
  1491. Xdetpanel_cols = DETAIL_PS_COLS;
  1492. X*/
  1493. X
  1494. X#define DETAIL_PS_TLY ((LINES >= 43) ? ((full43)?PER_SEC_TLY:PER_SEC_TLY+14)\
  1495. X                                     : PER_SEC_TLY)
  1496. X
  1497. X#define DETAIL_PS_LENGTH        (MSG_TLY - DETAIL_PS_TLY)
  1498. X
  1499. X    detpanel_length = DETAIL_PS_LENGTH;
  1500. X    detpanel_cols = COLS;
  1501. X    if(!(pdet = mkpanel(detpanel_length,detpanel_cols,DETAIL_PS_TLY,0)))
  1502. X    {
  1503. X        leave_text("cannot make detail panel",1);
  1504. X    }
  1505. X    show_panel(pdet);
  1506. X    top_panel(pdet);
  1507. X    wdet = panel_window(pdet);
  1508. X    display_proc_stats(wdet,1);
  1509. X
  1510. X}    /* end of detpanel_ps_init */
  1511. X
  1512. X/*+-------------------------------------------------------------------------
  1513. X    detpanel_ps_update()
  1514. X--------------------------------------------------------------------------*/
  1515. Xvoid
  1516. Xdetpanel_ps_update()
  1517. X{
  1518. X    display_proc_stats(wdet,0);
  1519. X}    /* end of detpanel_ps_update */
  1520. X
  1521. X/*+-------------------------------------------------------------------------
  1522. X    detpanel_extra_init()
  1523. X--------------------------------------------------------------------------*/
  1524. Xvoid
  1525. Xdetpanel_extra_init()
  1526. X{
  1527. X#define DETAIL_EXTRA_TLY        PER_SEC_TLY
  1528. X#define DETAIL_EXTRA_LENGTH        (MSG_TLY - DETAIL_EXTRA_TLY)
  1529. X
  1530. X    detpanel_length = DETAIL_EXTRA_LENGTH;
  1531. X    detpanel_cols = COLS;
  1532. X    if(!(pdet = mkpanel(detpanel_length,detpanel_cols,DETAIL_EXTRA_TLY,0)))
  1533. X    {
  1534. X        leave_text("cannot make detail panel",1);
  1535. X    }
  1536. X    show_panel(pdet);
  1537. X    top_panel(pdet);
  1538. X    wdet = panel_window(pdet);
  1539. X    display_var(wdet,0,EXTRA1_TLX);
  1540. X    display_bootinfo(wdet,0,EXTRA2_TLX);
  1541. X    display_tune(wdet,0,EXTRA3_TLX);
  1542. X    display_proc(wdet,0,EXTRA4_TLX);
  1543. X
  1544. X}    /* end of detpanel_extra_init */
  1545. X
  1546. X/*+-------------------------------------------------------------------------
  1547. X    detpanel_extra_update()
  1548. X--------------------------------------------------------------------------*/
  1549. Xvoid
  1550. Xdetpanel_extra_update()
  1551. X{
  1552. X    display_proc(wdet,0,EXTRA4_TLX);
  1553. X}    /* end of detpanel_extra_update */
  1554. X
  1555. X/*+-------------------------------------------------------------------------
  1556. X    detpanel_sio_init()
  1557. X--------------------------------------------------------------------------*/
  1558. X#ifdef M_UNIX
  1559. Xvoid
  1560. Xdetpanel_sio_init()
  1561. X{
  1562. X#define DETAIL_SIO_TLY ((LINES >= 43) ? (PER_SEC_TLY+14) : PER_SEC_TLY)
  1563. X#define DETAIL_SIO_LENGTH        (CMD_TLY - DETAIL_SIO_TLY)
  1564. X
  1565. X    detpanel_length = DETAIL_SIO_LENGTH;
  1566. X    detpanel_cols = COLS;
  1567. X    if(!(pdet = mkpanel(detpanel_length,detpanel_cols,DETAIL_SIO_TLY,0)))
  1568. X    {
  1569. X        leave_text("cannot make detail panel",1);
  1570. X    }
  1571. X    show_panel(pdet);
  1572. X    top_panel(pdet);
  1573. X    wdet = panel_window(pdet);
  1574. X    display_sio_summary(wdet,1);
  1575. X}    /* end of detpanel_sio_init */
  1576. X#endif
  1577. X
  1578. X/*+-------------------------------------------------------------------------
  1579. X    detpanel_sio_update()
  1580. X--------------------------------------------------------------------------*/
  1581. X#ifdef M_UNIX
  1582. Xvoid
  1583. Xdetpanel_sio_update()
  1584. X{
  1585. X    display_sio_summary(wdet,0);
  1586. X}    /* end of detpanel_sio_update */
  1587. X#endif
  1588. X
  1589. X/*+-------------------------------------------------------------------------
  1590. X    detpanel_destroy()
  1591. X--------------------------------------------------------------------------*/
  1592. Xvoid
  1593. Xdetpanel_destroy()
  1594. X{
  1595. X    hide_panel(pdet);
  1596. X    delwin(wdet);
  1597. X    wdet = (WINDOW *)0;
  1598. X    del_panel(pdet);
  1599. X    top_panel(pscr);
  1600. X    disp_msg(cpINFO,"");
  1601. X    detpanel_type = DPT_NONE;
  1602. X}    /* end of detpanel_destroy */
  1603. X
  1604. X/*+-------------------------------------------------------------------------
  1605. X    detail_panel_cmd(cmd)
  1606. X
  1607. X  command: m main screen
  1608. X           p proc status
  1609. X--------------------------------------------------------------------------*/
  1610. Xvoid
  1611. Xdetail_panel_cmd(cmd)
  1612. Xchtype cmd;
  1613. X{
  1614. X    disp_msg(cpINFO,"");
  1615. X    switch(cmd)
  1616. X    {
  1617. X        case 'm':
  1618. X            if(detpanel_type != DPT_NONE)
  1619. X                detpanel_destroy();
  1620. X            break;
  1621. X
  1622. X        case 'P':
  1623. X            if(detpanel_type == DPT_PS_LONG)
  1624. X                break;
  1625. X            if(detpanel_type != DPT_NONE)
  1626. X                detpanel_destroy();
  1627. X            detpanel_ps_init(1);
  1628. X            detpanel_type = DPT_PS_LONG;
  1629. X            break;
  1630. X
  1631. X        case 'p':
  1632. X            if(detpanel_type == DPT_PS)
  1633. X                break;
  1634. X            if(detpanel_type != DPT_NONE)
  1635. X                detpanel_destroy();
  1636. X            detpanel_ps_init(0);
  1637. X            detpanel_type = DPT_PS;
  1638. X            break;
  1639. X
  1640. X        case 'e':
  1641. X            if(LINES >= 43)
  1642. X                break;
  1643. X            if(detpanel_type == DPT_EXTRA)
  1644. X                break;
  1645. X            if(detpanel_type != DPT_NONE)
  1646. X                detpanel_destroy();
  1647. X            detpanel_extra_init();
  1648. X            detpanel_type = DPT_EXTRA;
  1649. X            break;
  1650. X
  1651. X#ifdef M_UNIX
  1652. X        case 's':
  1653. X            if(detpanel_type == DPT_SIO)
  1654. X                break;
  1655. X            if(detpanel_type != DPT_NONE)
  1656. X                detpanel_destroy();
  1657. X            detpanel_sio_init();
  1658. X            detpanel_type = DPT_SIO;
  1659. X            break;
  1660. X#endif
  1661. X
  1662. X    }
  1663. X}    /* end of detail_panel_cmd */
  1664. X
  1665. X/*+-------------------------------------------------------------------------
  1666. X    detail_panel_update()
  1667. X--------------------------------------------------------------------------*/
  1668. Xvoid
  1669. Xdetail_panel_update()
  1670. X{
  1671. X    switch(detpanel_type)
  1672. X    {
  1673. X        case DPT_PS:
  1674. X        case DPT_PS_LONG:
  1675. X            detpanel_ps_update();
  1676. X            break;
  1677. X        case DPT_EXTRA:
  1678. X            detpanel_extra_update();
  1679. X            break;
  1680. X#ifdef M_UNIX
  1681. X        case DPT_SIO:
  1682. X            detpanel_sio_update();
  1683. X            break;
  1684. X#endif
  1685. X    }
  1686. X}    /* end of detail_panel_update */
  1687. X
  1688. X/*+-------------------------------------------------------------------------
  1689. X    detail_init()
  1690. X--------------------------------------------------------------------------*/
  1691. Xvoid
  1692. Xdetail_init()
  1693. X{
  1694. X    det_proc_init();    /* see det_proc.c */
  1695. X}    /* end of detail_init */
  1696. X
  1697. X/* vi: set tabstop=4 shiftwidth=4: */
  1698. X/* end of detail.c */
  1699. SHAR_EOF
  1700. $TOUCH -am 0715025090 detail.c &&
  1701. chmod 0644 detail.c ||
  1702. echo "restore of detail.c failed"
  1703. set `wc -c detail.c`;Wc_c=$1
  1704. if test "$Wc_c" != "7352"; then
  1705.     echo original size 7352, current size $Wc_c
  1706. fi
  1707. echo "End of part 1, continue with part 2"
  1708. exit 0
  1709.  
  1710. --------------------------------------------------------------------
  1711. Warren Tucker, TuckerWare emory!n4hgf!wht or wht@n4hgf.Mt-Park.GA.US
  1712. Sforzando (It., sfohr-tsahn'-doh).   A direction to perform the tone
  1713. or chord with special stress, or marked and sudden emphasis.
  1714.  
  1715.