home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
misc
/
volume22
/
u386mon
/
patch01
< prev
next >
Wrap
Text File
|
1991-08-16
|
18KB
|
570 lines
Newsgroups: comp.sources.misc
From: Warren Tucker <wht@n4hgf.Mt-Park.GA.US>
Subject: v22i023: u386mon - Sys V Rel 3.x Performance Monitor rev 2.40, Patch01
Message-ID: <1991Aug16.024410.16017@sparky.IMD.Sterling.COM>
X-Md4-Signature: d3daaac3adfcf30de27294609648773c
Date: Fri, 16 Aug 1991 02:44:10 GMT
Approved: kent@sparky.imd.sterling.com
Submitted-by: Warren Tucker <wht@n4hgf.Mt-Park.GA.US>
Posting-number: Volume 22, Issue 23
Archive-name: u386mon/patch01
Environment: SYSVR3
Patch-To: u386mon: Volume 22, Issue 3-9
This patch fixes a bug where incorrect data is displayed for processes
which are swapping and in the indeterminate state. There is a moment in
which u386mon can learn a process' U-area is on the swap file, go to
read it and, lo, the process is being swapped back in. I have a few
sanity tests for that condition, but they cannot be foolproof. Thanks
to Andreas Jennen <aball.in-berlin.de> for pointing this out.
Also, Steve Alexander <stevea@i88.isc.com> reported the STREAMS and
table additions work fine on ISC 2.2, so I have enabled them.
To use:
1. cd to the u386mon source directory
2. unshar this file
3. read README.P1
#!/bin/sh
# This is u386mon-2.40-patch1, a shell archive (shar 3.46)
# made 08/14/1991 19:37 UTC by wht@n4hgf
# Source directory /u1/src/unew
#
# existing files WILL be overwritten
#
# This shar contains:
# length mode name
# ------ ---------- ------------------------------------------
# 1710 -rw-r--r-- README.P1
# 220 -rw-r--r-- PATCH1.APPLY
# 11965 -rw-r--r-- PATCH1.01
# 53 -rw-r--r-- patchlevel.h
#
# ============= README.P1 ==============
echo 'x - extracting README.P1 (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'README.P1' &&
Xu386mon 2.40 - Patch 1 - Wed Aug 14 12:15:46 EDT 1991
X
XThe patch:
X----------
X
XThis patch fixes a bug where incorrect data is displayed for processes
Xwhich are swapping and in the indeterminate state. There is a moment in
Xwhich u386mon can learn a process' U-area is on the swap file, go to
Xread it and, lo, the process is being swapped back in. I have a few
Xsanity tests for that condition, but they cannot be foolproof. Thanks
Xto Andreas Jennen <aball.in-berlin.de> for pointing this out.
X
XAlso, Steve Alexander <stevea@i88.isc.com> reported the STREAMS and
Xtable additions work fine on ISC 2.2, so I have enabled them.
X
XI ran this version for four months pretty much constantly and thought it
Xbug-free. Right! Hopefully, this will be the only bug fix patch for
Xthis version ;-<.
X
XRather than issue a laboriously long patch to fix a booboo in the
Xedit history of all ther sources, a script is provided to apply part
Xof the patch with the patch utility and part with sed.
X
XWhat you get out of it:
X-----------------------
X
X1. All users get the benefit of no more corrupted displays during
Xswapping.
X
X2. ISC users get the STREAMS and table display previously enabled only
Xfor SCO and SVR31.
X
XTo apply the patch:
X-------------------
X
X1. unshar this file in the u386mon source directory (which you probably
Xhave already done if you are reading this).
X
X2. You may wish to look over PATCH1.APPLY before executing it.
XIt will process all files matching *.[ch] and Make* in the current
Xdirectory tree. I believe this is a safe thing to do, but just so
Xyou won't be surprised at the unconventional procedure, look it over.
X
X3. Type
X csh PATCH1.APPLY
X
X4. Type
X make
X su root
X make install
SHAR_EOF
chmod 0644 README.P1 ||
echo 'restore of README.P1 failed'
Wc_c="`wc -c < 'README.P1'`"
test 1710 -eq "$Wc_c" ||
echo 'README.P1: original size 1710, current size' "$Wc_c"
# ============= PATCH1.APPLY ==============
echo 'x - extracting PATCH1.APPLY (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'PATCH1.APPLY' &&
X#!/bin/csh
Xpatch -p < PATCH1.01
Xforeach i( `find . -name '*.[ch]' -print;find . -name 'Make*' -print` )
Xecho fixing edit history in $i
Xsed -e 's/release 3.40/release 2.40/' < $i > /tmp/kludge.$$
Xmv /tmp/kludge.$$ $i
Xend
SHAR_EOF
chmod 0644 PATCH1.APPLY ||
echo 'restore of PATCH1.APPLY failed'
Wc_c="`wc -c < 'PATCH1.APPLY'`"
test 220 -eq "$Wc_c" ||
echo 'PATCH1.APPLY: original size 220, current size' "$Wc_c"
# ============= PATCH1.01 ==============
echo 'x - extracting PATCH1.01 (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'PATCH1.01' &&
X:
X#-------------------------------------------------------
X# PATCH1.01
X# Swapping Process Bug + ISC Upgrade
X# created by gendiff x1.03 on 14 Aug 1991 19:31 UTC
X#-------------------------------------------------------
X*** /u1/src/u386mon/det_proc.c Wed Aug 14 15:26:10 1991
X--- det_proc.c Wed Aug 14 15:30:46 1991
X***************
X*** 20,25
X
X --------------------------------------------------------------------------*/
X /*+:EDITS:*/
X /*:08-01-1991-23:34-wht@n4hgf-release 3.40 source control point */
X /*:02-14-1991-11:26-martin@hppcmart-Whittle procs with no cpu time*/
X /*:08-10-1990-14:12-jmd@p1so/wht@n4hgf-2.20-add Tandem Integrity S2 */
X
X--- 20,26 -----
X
X --------------------------------------------------------------------------*/
X /*+:EDITS:*/
X+ /*:08-11-1991-13:58-root@n4hgf-keep bogus numbers from polluting display */
X /*:08-01-1991-23:34-wht@n4hgf-release 3.40 source control point */
X /*:02-14-1991-11:26-martin@hppcmart-Whittle procs with no cpu time*/
X /*:08-10-1990-14:12-jmd@p1so/wht@n4hgf-2.20-add Tandem Integrity S2 */
X***************
X*** 587,592
X static char timestr[10];
X time_t mm,ss;
X extern int hz;
X
X ticks /= hz;
X mm = ticks / 60L;
X
X--- 588,596 -----
X static char timestr[10];
X time_t mm,ss;
X extern int hz;
X+
X+ if(ticks < 0) /* keep bogus numbers from polluting display */
X+ return("------");
X
X ticks /= hz;
X mm = ticks / 60L;
X*** /u1/src/u386mon/detail.c Wed Aug 14 15:26:10 1991
X--- detail.c Wed Aug 14 15:30:50 1991
X***************
X*** 19,24
X
X --------------------------------------------------------------------------*/
X /*+:EDITS:*/
X /*:08-01-1991-23:34-wht@n4hgf-release 3.40 source control point */
X /*:05-15-1991-17:22-wht@n4hgf-2.3 patches for SVR31 from nba@sysware.dk */
X /*:04-16-1991-16:51-martin@hppcmart-Fix display problems */
X
X--- 19,25 -----
X
X --------------------------------------------------------------------------*/
X /*+:EDITS:*/
X+ /*:08-14-1991-13:04-wht@n4hgf-STREAMS and table works for ISC 2.2 */
X /*:08-01-1991-23:34-wht@n4hgf-release 3.40 source control point */
X /*:05-15-1991-17:22-wht@n4hgf-2.3 patches for SVR31 from nba@sysware.dk */
X /*:04-16-1991-16:51-martin@hppcmart-Fix display problems */
X***************
X*** 171,178
X } /* end of detpanel_extra_update */
X
X /*+-------------------------------------------------------------------------
X! detpanel_streams_init()
X! SCO only streams stats
X --------------------------------------------------------------------------*/
X #if defined(M_UNIX) || defined(SVR31)
X void
X
X--- 172,178 -----
X } /* end of detpanel_extra_update */
X
X /*+-------------------------------------------------------------------------
X! detpanel_streams_init() - streams stats
X --------------------------------------------------------------------------*/
X #if defined(M_UNIX) || defined(SVR31) || defined(ISC22)
X void
X***************
X*** 174,180
X detpanel_streams_init()
X SCO only streams stats
X --------------------------------------------------------------------------*/
X! #if defined(M_UNIX) || defined(SVR31)
X void
X detpanel_streams_init()
X {
X
X--- 174,180 -----
X /*+-------------------------------------------------------------------------
X detpanel_streams_init() - streams stats
X --------------------------------------------------------------------------*/
X! #if defined(M_UNIX) || defined(SVR31) || defined(ISC22)
X void
X detpanel_streams_init()
X {
X***************
X*** 245,251
X detpanel_table_init()
X SCO only table stats
X --------------------------------------------------------------------------*/
X! #if defined(M_UNIX) || defined(SVR31)
X void
X detpanel_table_init()
X {
X
X--- 245,251 -----
X detpanel_table_init()
X SCO only table stats
X --------------------------------------------------------------------------*/
X! #if defined(M_UNIX) || defined(SVR31) || defined(ISC22)
X void
X detpanel_table_init()
X {
X***************
X*** 373,379
X detpanel_type = DPT_EXTRA;
X break;
X
X! #if defined(M_UNIX) || defined(SVR31)
X case 'n':
X if(detpanel_type == DPT_STREAMS)
X break;
X
X--- 373,379 -----
X detpanel_type = DPT_EXTRA;
X break;
X
X! #if defined(M_UNIX) || defined(SVR31) || defined(ISC22)
X case 'n':
X if(detpanel_type == DPT_STREAMS)
X break;
X***************
X*** 435,441
X detpanel_sio_update();
X break;
X #endif
X! #if defined(M_UNIX) || defined (SYSVR31)
X case DPT_STREAMS:
X detpanel_streams_update();
X break;
X
X--- 435,441 -----
X detpanel_sio_update();
X break;
X #endif
X! #if defined(M_UNIX) || defined(SVR31) || defined(ISC22)
X case DPT_STREAMS:
X detpanel_streams_update();
X break;
X***************
X*** 458,464
X detail_init()
X {
X det_proc_init(); /* see det_proc.c */
X! #if defined(M_UNIX) || defined(SVR31)
X init_stream();
X init_table();
X #ifdef SCO322
X
X--- 458,464 -----
X detail_init()
X {
X det_proc_init(); /* see det_proc.c */
X! #if defined(M_UNIX) || defined(SVR31) || defined(ISC22)
X init_stream();
X init_table();
X #ifdef SCO322
X*** /u1/src/u386mon/nlsym.h Wed Aug 14 15:26:34 1991
X--- nlsym.h Wed Aug 14 15:31:05 1991
X***************
X*** 9,14
X
X --------------------------------------------------------------------------*/
X /*+:EDITS:*/
X /*:08-01-1991-23:34-wht@n4hgf-release 3.40 source control point */
X /*:05-15-1991-17:22-wht@n4hgf-2.3 patches for SVR31 from nba@sysware.dk */
X /*:04-16-1991-02:25-martin@hppcmart additions for SCO 3.2.2 */
X
X--- 9,15 -----
X
X --------------------------------------------------------------------------*/
X /*+:EDITS:*/
X+ /*:08-14-1991-13:04-wht@n4hgf-STREAMS and table works for ISC 2.2 */
X /*:08-01-1991-23:34-wht@n4hgf-release 3.40 source control point */
X /*:05-15-1991-17:22-wht@n4hgf-2.3 patches for SVR31 from nba@sysware.dk */
X /*:04-16-1991-02:25-martin@hppcmart additions for SCO 3.2.2 */
X***************
X*** 102,108
X #if defined(M_UNIX)
X #define Nindex_SIO_TTY 68
X #endif
X! #if defined(M_UNIX) || defined(SVR31)
X #define Nindex_STRST 69
X #define Nindex_RBSIZE 70
X #define Nindex_NMBLOCK 71
X
X--- 103,109 -----
X #if defined(M_UNIX)
X #define Nindex_SIO_TTY 68
X #endif
X! #if defined(M_UNIX) || defined(SVR31) || defined(ISC22)
X #define Nindex_STRST 69
X #define Nindex_RBSIZE 70
X #define Nindex_NMBLOCK 71
X***************
X*** 132,138
X #if defined(M_UNIX)
X #define sio_ttyaddr (nlsym[Nindex_SIO_TTY].n_value)
X #endif
X! #if defined(M_UNIX) || defined(SVR31)
X #define strstaddr (nlsym[Nindex_STRST].n_value)
X #define rbsizeaddr (nlsym[Nindex_RBSIZE].n_value)
X #define nmblockaddr (nlsym[Nindex_NMBLOCK].n_value)
X
X--- 133,139 -----
X #if defined(M_UNIX)
X #define sio_ttyaddr (nlsym[Nindex_SIO_TTY].n_value)
X #endif
X! #if defined(M_UNIX) || defined(SVR31) || defined(ISC22)
X #define strstaddr (nlsym[Nindex_STRST].n_value)
X #define rbsizeaddr (nlsym[Nindex_RBSIZE].n_value)
X #define nmblockaddr (nlsym[Nindex_NMBLOCK].n_value)
X***************
X*** 144,150
X #define ractiveaddr (nlsym[Nindex_RACTIVE].n_value)
X #define cfreecntaddr (nlsym[Nindex_CFREECNT].n_value)
X #define calloutaddr (nlsym[Nindex_CALLOUT].n_value)
X! #endif /* defined(M_UNIX) || defined(SVR31) */
X #ifdef SCO322
X #define flstatsaddr (nlsym[Nindex_FLSTATS].n_value)
X #define wd1010statsaddr (nlsym[Nindex_WD1010STATS].n_value)
X
X--- 145,151 -----
X #define ractiveaddr (nlsym[Nindex_RACTIVE].n_value)
X #define cfreecntaddr (nlsym[Nindex_CFREECNT].n_value)
X #define calloutaddr (nlsym[Nindex_CALLOUT].n_value)
X! #endif /* defined(M_UNIX) || defined(SVR31) || defined(ISC22) */
X #ifdef SCO322
X #define flstatsaddr (nlsym[Nindex_FLSTATS].n_value)
X #define wd1010statsaddr (nlsym[Nindex_WD1010STATS].n_value)
X***************
X*** 234,240
X #else
X { "spl" },
X #endif
X! #if defined(M_UNIX) || defined(SVR31)
X { "strst" },
X { "rbsize" },
X { "nmblock" },
X
X--- 235,241 -----
X #else
X { "spl" },
X #endif
X! #if defined(M_UNIX) || defined(SVR31) || defined(ISC22)
X { "strst" },
X { "rbsize" },
X { "nmblock" },
X*** /u1/src/u386mon/u386mon.c Wed Aug 14 15:26:08 1991
X--- u386mon.c Wed Aug 14 15:31:11 1991
X***************
X*** 1,4
X! char *revision = "3.40";
X /*+-------------------------------------------------------------------------
X u386mon.c - UNIX 386 (and other) system monitor
X wht@n4hgf.Mt-Park.GA.US and many others
X
X--- 1,4 -----
X! char *revision = "3.4";
X /*+-------------------------------------------------------------------------
X u386mon.c - UNIX 386 (and other) system monitor
X wht@n4hgf.Mt-Park.GA.US and many others
X***************
X*** 38,43
X
X --------------------------------------------------------------------------*/
X /*+:EDITS:*/
X /*:08-01-1991-23:35-wht@n4hgf-release 3.40 source control point */
X /*:05-15-1991-17:22-wht@n4hgf-2.3 patches for SVR31 from nba@sysware.dk */
X /*:05-14-1991-06:11-root@n4hgf-evidently a fast cpu gets 0 cpu sometimes :-) */
X
X--- 38,45 -----
X
X --------------------------------------------------------------------------*/
X /*+:EDITS:*/
X+ /*:08-14-1991-13:04-wht@n4hgf-STREAMS and table works for ISC 2.2 */
X+ /*:08-11-1991-14:05-root@n4hgf-use PATCHLEVEL */
X /*:08-01-1991-23:35-wht@n4hgf-release 3.40 source control point */
X /*:05-15-1991-17:22-wht@n4hgf-2.3 patches for SVR31 from nba@sysware.dk */
X /*:05-14-1991-06:11-root@n4hgf-evidently a fast cpu gets 0 cpu sometimes :-) */
X***************
X*** 70,75
X /*:06-15-1990-18:32-wht@n4hgf-creation */
X
X #include "config.h"
X #define M_TERMINFO
X #include <curses.h>
X #undef timeout /* conflict in curses.h and bootinfo.h per trb@ima.ima.isc.com */
X
X--- 72,78 -----
X /*:06-15-1990-18:32-wht@n4hgf-creation */
X
X #include "config.h"
X+ #include "patchlevel.h"
X #define M_TERMINFO
X #include <curses.h>
X #undef timeout /* conflict in curses.h and bootinfo.h per trb@ima.ima.isc.com */
X***************
X*** 796,802
X {
X case 'P':
X case 'p':
X! #if defined(M_UNIX) || defined(SVR31)
X case 'n':
X case 't':
X #endif
X
X--- 799,805 -----
X {
X case 'P':
X case 'p':
X! #if defined(M_UNIX) || defined(SVR31) || defined(ISC22)
X case 'n':
X case 't':
X #endif
X***************
X*** 972,977
X waddstr(wscr,basename(*argv));
X waddch(wscr,(chtype)' ');
X waddstr(wscr,revision);
X
X #if defined(mips)
X waddstr(wscr,"/Tandem");
X
X--- 975,981 -----
X waddstr(wscr,basename(*argv));
X waddch(wscr,(chtype)' ');
X waddstr(wscr,revision);
X+ wprintw(wscr,"%d",PATCHLEVEL); /* good for nine patches */
X
X #if defined(mips)
X waddstr(wscr,"/Tandem");
X***************
X*** 1005,1011
X banner_free_x = x+2;
X while(x < getmaxx(wscr))
X waddch(wscr,(chtype)' '),x++;
X! wmove(wscr,0,71);
X waddstr(wscr,"wht@n4hgf");
X if(plock_indicator)
X {
X
X--- 1009,1015 -----
X banner_free_x = x+2;
X while(x < getmaxx(wscr))
X waddch(wscr,(chtype)' '),x++;
X! wmove(wscr,0,COLS - 9);
X waddstr(wscr,"wht@n4hgf");
X if(plock_indicator)
X {
X***************
X*** 1028,1034
X #if defined(M_UNIX)
X waddstr(wscr,"s=sio ");
X #endif
X! #if defined(M_UNIX) || defined(SVR31)
X waddstr(wscr,"n=net t=table ");
X #endif
X #if defined(SCO322)
X
X--- 1032,1038 -----
X #if defined(M_UNIX)
X waddstr(wscr,"s=sio ");
X #endif
X! #if defined(M_UNIX) || defined(SVR31) || defined(ISC22)
X waddstr(wscr,"n=net t=table ");
X #endif
X #if defined(SCO322)
X***************
X*** 1117,1123
X #endif
X
X lt = localtime(&now);
X! wmove(wscr,0,62);
X use_cp(wscr,cpBANNER);
X wprintw(wscr,"%02d:%02d:%02d",lt->tm_hour,lt->tm_min,lt->tm_sec);
X
X
X--- 1121,1127 -----
X #endif
X
X lt = localtime(&now);
X! wmove(wscr,0,COLS - 18);
X use_cp(wscr,cpBANNER);
X wprintw(wscr,"%02d:%02d:%02d",lt->tm_hour,lt->tm_min,lt->tm_sec);
X
X***************
X*** 1406,1412
X case 'P':
X case 'p':
X case 'm':
X! #if defined(M_UNIX) || defined(SVR31)
X case 'n':
X case 't':
X #endif
X
X--- 1410,1416 -----
X case 'P':
X case 'p':
X case 'm':
X! #if defined(M_UNIX) || defined(SVR31) || defined(ISC22)
X case 'n':
X case 't':
X #endif
SHAR_EOF
chmod 0644 PATCH1.01 ||
echo 'restore of PATCH1.01 failed'
Wc_c="`wc -c < 'PATCH1.01'`"
test 11965 -eq "$Wc_c" ||
echo 'PATCH1.01: original size 11965, current size' "$Wc_c"
# ============= patchlevel.h ==============
echo 'x - extracting patchlevel.h (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'patchlevel.h' &&
X#define PATCHLEVEL 1 /* scheme good for 9 patches */
SHAR_EOF
chmod 0644 patchlevel.h ||
echo 'restore of patchlevel.h failed'
Wc_c="`wc -c < 'patchlevel.h'`"
test 53 -eq "$Wc_c" ||
echo 'patchlevel.h: original size 53, current size' "$Wc_c"
exit 0
----------------------------------------------------------------------------
Warren Tucker, TuckerWare emory!n4hgf!wht or wht@n4hgf.Mt-Park.GA.US
"I was 35 years old before I knew a pie was meant to be eaten." - Moe Howard
exit 0 # Just in case...
--
Kent Landfield INTERNET: kent@sparky.IMD.Sterling.COM
Sterling Software, IMD UUCP: uunet!sparky!kent
Phone: (402) 291-8300 FAX: (402) 291-4362
Please send comp.sources.misc-related mail to kent@uunet.uu.net.