home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sources.unix
- From: lm@Sunburn.Stanford.EDU (Larry McVoy)
- Subject: v26i020: perfmon - line- and screen-oriented interface to rstatd(8)
- Sender: unix-sources-moderator@pa.dec.com
- Approved: vixie@pa.dec.com
-
- Submitted-By: lm@Sunburn.Stanford.EDU (Larry McVoy)
- Posting-Number: Volume 26, Issue 20
- Archive-Name: perfmon
-
- These work on Sun's or anything else running rstatd(8). You may need to
- enable rstatd in /etc/inetd.conf (Sun ships it turned on, though). Bug
- fixes to me, I'll repost. Thanks.
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of shell archive."
- # Contents: Makefile barmon.8 barmon.c hoststat.8 hoststat.c
- # Wrapped by lm@Sunburn.Stanford.EDU on Sat Jan 18 14:23:36 1992
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'Makefile' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'Makefile'\"
- else
- echo shar: Extracting \"'Makefile'\" \(414 characters\)
- sed "s/^X//" >'Makefile' <<'END_OF_FILE'
- X# @(#)Makefile 1.1 1/18/92
- X
- XALL = hoststat barmon
- XMAN = hoststat.8 barmon.8
- XCFLAGS = -O4
- X
- Xall: $(ALL)
- X
- Xbarmon: barmon.c
- X $(CC) $(CFLAGS) barmon.c -o barmon -lcurses -ltermlib -lrpcsvc
- X
- Xhoststat: hoststat.c
- X $(CC) $(CFLAGS) hoststat.c -o hoststat -lrpcsvc
- X
- Xinstall: $(ALL) $(MAN)
- X mv $(ALL) /usr/etc
- X mv $(MAN) /usr/man/man8
- X
- Xclean:
- X /bin/rm -f *.o a.out core
- X sccs clean
- X
- Xclobber:
- X @make clean
- X /bin/rm -f $(ALL)
- END_OF_FILE
- if test 414 -ne `wc -c <'Makefile'`; then
- echo shar: \"'Makefile'\" unpacked with wrong size!
- fi
- # end of 'Makefile'
- fi
- if test -f 'barmon.8' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'barmon.8'\"
- else
- echo shar: Extracting \"'barmon.8'\" \(3188 characters\)
- sed "s/^X//" >'barmon.8' <<'END_OF_FILE'
- X.\" @(#)barmon.8 1.1 1/18/92 14:04:30 (c) 1992 Larry McVoy
- X.TH BARMON 8 "November 1991"
- X.SH NAME
- Xbarmon \- display performance bar graphs for several hosts
- X.SH SYNOPSIS
- X.B barmon
- X.I "host1 host2 ..."
- X[
- X.I interval
- X]
- X.SH DESCRIPTION
- X.B barmon
- Xuses the
- X.BR rstatd (8)
- Xto gather system statistics from the specified hosts and then displays
- Xthat information interactively on a tty using curses(3).
- XThe display is a series of bar graphs divided by host
- Xon the Y axis and activity type on the X axis.
- XIt is typically used to watch a number of processors running distributed
- Xapplications. Other uses include monitoring a network of machines for
- Xoverloading, balance, etc.
- X.LP
- XUpon start up,
- X.B barmon
- Xwill be a little sluggish because it is pinging all the hosts for
- Xstatistics. After the information is retrieved, the screen is cleared
- Xand a graph like so will be shown (this graph shows one machine paging,
- Xall others are idle):
- X.sp 2
- X.nf
- X [% USER CPU][% SYS CPU ][Pkts 100][Disk 40][Page 60]
- Xsbox0 [ ][ ][ ][ ][ ]
- Xsbox1 [UUU ][ ][ ][DDDDDDDDDD][PPPPPPPPPP]
- Xsbox4 [ ][ ][ ][ ][ ]
- X.fi
- X.sp 2
- XThe graph is updated every
- X.I interval
- Xseconds (default: 5 seconds).
- X.LP
- XAll of the fields of
- X.B barmon
- Xare averaged over
- X.IR interval .
- XThe fields are:
- X.TP 12
- X.B "% USER CPU"
- XPercentage of time spent on user CPU in the last interval.
- X.TP
- X.B "% SYS CPU"
- XPercentage of time spent on system (kernel) CPU in the last interval.
- X.TP
- X.B "PKTS"
- XNumber of network packets (both input and output) seen in the
- Xlast interval.
- X.TP
- X.B "DISK"
- XNumber of disk operations (both input and output) seen in the
- Xlast interval.
- X.TP
- X.B "PAGE"
- XNumber of paging operations (both input and output) seen in the
- Xlast interval.
- X.LP
- X.ne 6
- XThe fields with numbers in the title are auto scaled each interval.
- XIf a field is marked 200, that means a full bar indicates 200 events,
- Xa half bar indicates 100, and so on. All the fields are auto scaled
- Xacross all the hosts, so if the standard deviation is high, you start
- Xlosing information.
- X.SH BUGS
- XThe rstat()ing hosts effect the timing enough that sometimes the numbers
- Xcome out wrong. They are usually too large. I tried to address this
- Xsomewhat by fudging the numbers down and by using interval timers
- Xinstead of sleep(3). Don't use short intervals.
- X.LP
- XSilently ignores unreachable hosts. However, a dead host tends to slow
- Xdown startup quite a bit.
- X.LP
- XA host that crashes causes the program to exit.
- X.LP
- XRstatd(8) does not dig out all the info I'd like. It would be cool if we
- Xcould implement vmstat(8) and xperfmon(8) with rstatd(8).
- X.LP
- XBarmon(8) does not display all the information it could. The I/O operations
- Xcould be displayed as "IIIOOOO" to indicate "in" or "out" direction since
- Xrstat(8) does tell you this information.
- X.LP
- X(I'd refer you to rstat(3) to figure out the fields but that seems to be
- Xundocumented. Sigh. I figured it out by looking at the rstat.h include
- Xfile.)
- X.LP
- XRstatd(8) seems to be a Sun only thing - lobby BSD to include it.
- X.SH AUTHOR
- XLarry McVoy, Stanford University, lm@sunburn.stanford.edu
- END_OF_FILE
- if test 3188 -ne `wc -c <'barmon.8'`; then
- echo shar: \"'barmon.8'\" unpacked with wrong size!
- fi
- # end of 'barmon.8'
- fi
- if test -f 'barmon.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'barmon.c'\"
- else
- echo shar: Extracting \"'barmon.c'\" \(5630 characters\)
- sed "s/^X//" >'barmon.c' <<'END_OF_FILE'
- Xstatic char *what = "@(#)barmon.c 1.7 1/18/92 (c) 1991 Larry McVoy";
- X#include <stdio.h>
- X#include <curses.h>
- X#include <sys/dk.h>
- X#include <time.h>
- X#include <signal.h>
- X#include <sys/time.h>
- X#include <ctype.h>
- X#include <rpcsvc/rstat.h>
- X
- X#define LABEL 10
- X/*
- X * XXX - this should be an array of structs.
- X */
- X#define USRLABEL "[% USER CPU]"
- X#define USRWID 11
- X#define USRLEFT LABEL
- X#define USRRIGHT (USRLEFT+USRWID)
- X#define SYSLABEL "[% SYS CPU ]"
- X#define SYSWID 11
- X#define SYSLEFT (USRRIGHT+1)
- X#define SYSRIGHT (SYSLEFT+SYSWID)
- X#define PKTFMT "[PKTS %5d]"
- X#define PKTWID 11
- X#define PKTLEFT (SYSRIGHT+1)
- X#define PKTRIGHT (PKTLEFT+PKTWID)
- X#define PKTADJUST 100
- X#define DISKFMT "[DISK %5d]"
- X#define DISKWID 11
- X#define DISKLEFT (PKTRIGHT+1)
- X#define DISKRIGHT (DISKLEFT+DISKWID)
- X#define DISKADJUST 10
- X#define PAGEFMT "[PAGE %5d]"
- X#define PAGEWID 11
- X#define PAGELEFT (DISKRIGHT+1)
- X#define PAGERIGHT (PAGELEFT+PAGEWID)
- X#define PAGEADJUST 10
- X#define SLPDEFAULT 5
- X#define sane(x) ((x) > 100000 ? (-1) : (x))
- X#define scale(x) sane(secs == 1 ? (x) : (x) / secs)
- X#define sleep(x) usleep(1000000 * (x))
- X
- Xchar **hosts;
- Xstruct statstime *orig, *new;
- Xstruct mystat {
- X int usr;
- X int sys;
- X int pkt;
- X int page;
- X int disk;
- X} *save;
- Xint secs;
- Xint n;
- Xint pagemax = 10, pktmax = 100, diskmax = 20;
- Xint newpagemax = 10, newpktmax = 100, newdiskmax = 20;
- Xcatch() {}
- X
- Xmain(ac, av)
- X char **av;
- X{
- X int i;
- X char *calloc();
- X struct itimerval it;
- X time_t clock;
- X
- X if (isdigit(av[ac - 1][0])) {
- X secs = atoi(av[ac - 1]);
- X ac--;
- X } else {
- X secs = SLPDEFAULT;
- X }
- X hosts = (char**)calloc(ac, sizeof(char *));
- X orig = (struct statstime*)calloc(ac, sizeof(struct statstime));
- X new = (struct statstime*)calloc(ac, sizeof(struct statstime));
- X save = (struct mystat*)calloc(ac, sizeof(struct mystat));
- X
- X /*
- X * Go through it once to fire up all the rstatd's.
- X */
- X for (i = 1; i < ac; ++i) {
- X if (rstat(av[i], &orig[i - 1]) == 0) {
- X hosts[n++] = av[i];
- X } else {
- X perror(av[i]);
- X exit(1);
- X }
- X }
- X
- X /*
- X * Initialize
- X * XXX - cath sigint and restore modes?
- X */
- X initscr();
- X clear();
- X mvaddstr(0, USRLEFT, USRLABEL);
- X mvaddstr(0, SYSLEFT, SYSLABEL);
- X mvprintw(0, PKTLEFT, PKTFMT, pktmax);
- X mvprintw(0, DISKLEFT, DISKFMT, diskmax);
- X mvprintw(0, PAGELEFT, PAGEFMT, pagemax);
- X for(i = 1; i < ac; ++i) {
- X if (strlen(av[i]) >= LABEL)
- X av[i][LABEL] = 0; /* XXX off by 1? */
- X mvaddstr(i, 0, av[i]);
- X mvaddch(i, USRLEFT, '[');
- X mvaddch(i, USRRIGHT, ']');
- X mvaddch(i, SYSLEFT, '[');
- X mvaddch(i, SYSRIGHT, ']');
- X mvaddch(i, PKTLEFT, '[');
- X mvaddch(i, PKTRIGHT, ']');
- X mvaddch(i, DISKLEFT, '[');
- X mvaddch(i, DISKRIGHT, ']');
- X mvaddch(i, PAGELEFT, '[');
- X mvaddch(i, PAGERIGHT, ']');
- X }
- X
- X /*
- X * Set up an interval timer - this should help get rid of delays.
- X */
- X it.it_interval.tv_sec = secs;
- X it.it_interval.tv_usec = secs;
- X it.it_value.tv_sec = secs;
- X it.it_value.tv_usec = secs;
- X signal(SIGALRM, catch);
- X setitimer(ITIMER_REAL, &it, 0);
- X sigblock(sigmask(SIGALRM));
- X
- X /*
- X * Do it again now that it is fast.
- X */
- X for (i = 0; i < ac - 1; ++i) {
- X rstat(hosts[i], &orig[i]);
- X }
- X while (1) {
- X /*
- X * We need the signal handling because of the fact that the
- X * rstat could be infinitely long.
- X * XXX - need corbin's async rpc's.
- X */
- X sigpause(0);
- X newpktmax = newdiskmax = newpagemax = 0;
- X for (i = 0; i < ac - 1; ++i) {
- X getstats(i);
- X }
- X#define adjustmax(n, o, a) if (n > o) { \
- X o = ((n + a - 1) / a) * a; \
- X } else if (n < o / 2) { \
- X o /= 2; \
- X o = ((o + a - 1) / a) * a; \
- X }
- X adjustmax(newdiskmax, diskmax, DISKADJUST);
- X adjustmax(newpktmax, pktmax, PKTADJUST);
- X adjustmax(newpagemax, pagemax, PAGEADJUST);
- X mvprintw(0, PKTLEFT, PKTFMT, pktmax);
- X mvprintw(0, DISKLEFT, DISKFMT, diskmax);
- X mvprintw(0, PAGELEFT, PAGEFMT, pagemax);
- X for (i = 0; i < ac - 1; ++i) {
- X display(i);
- X }
- X time(&clock);
- X mvprintw(23, 0, "%.24s", ctime(&clock));
- X refresh();
- X }
- X}
- X
- X/*
- X * Get the statistics and rescale
- X */
- Xgetstats(i)
- X{
- X int y, u, s, d, pkt, pg, pos;
- X
- X if (rstat(hosts[i], &new[i]) != 0) {
- X perror(hosts[i]);
- X exit(1);
- X }
- X u = scale(new[i].cp_time[0] - orig[i].cp_time[0]);
- X s = scale(new[i].cp_time[2] - orig[i].cp_time[2]);
- X pkt = scale(new[i].if_ipackets - orig[i].if_ipackets) +
- X scale(new[i].if_opackets - orig[i].if_opackets);
- X d = scale(new[i].dk_xfer[0] - orig[i].dk_xfer[0]) +
- X scale(new[i].dk_xfer[1] - orig[i].dk_xfer[1]) +
- X scale(new[i].dk_xfer[2] - orig[i].dk_xfer[2]) +
- X scale(new[i].dk_xfer[3] - orig[i].dk_xfer[3]);
- X pg = scale(new[i].v_pgpgin - orig[i].v_pgpgin) +
- X scale(new[i].v_pgpgout - orig[i].v_pgpgout);
- X while (u + s > 100) /* timing errors */
- X u--, s--;
- X
- X#define adjust(x, w, m) if (x > m) x = m; \
- X x = (x + ((m/(w-1) / 2))) * (w - 1) / m;
- X adjust(u, USRWID, 100);
- X adjust(s, SYSWID, 100);
- X if (newpktmax < pkt)
- X newpktmax = pkt;
- X adjust(pkt, PKTWID, pktmax);
- X if (newdiskmax < d)
- X newdiskmax = d;
- X adjust(d, DISKWID, diskmax);
- X if (newpagemax < pg)
- X newpagemax = pg;
- X adjust(pg, PAGEWID, pagemax);
- X save[i].usr = u;
- X save[i].sys = s;
- X save[i].pkt = pkt;
- X save[i].disk = d;
- X save[i].page = pg;
- X orig[i] = new[i];
- X}
- X
- Xdisplay(i)
- X{
- X int y, pos;
- X
- X y = i + 1;
- X for (pos = USRLEFT + 1; pos < USRRIGHT; ++pos)
- X mvaddch(y, pos, save[i].usr-- > 0 ? 'U' : ' ');
- X for (pos = SYSLEFT + 1; pos < SYSRIGHT; ++pos)
- X mvaddch(y, pos, save[i].sys-- > 0 ? 'S' : ' ');
- X for (pos = PKTLEFT + 1; pos < PKTRIGHT; ++pos)
- X mvaddch(y, pos, save[i].pkt-- > 0 ? 'N' : ' ');
- X for (pos = DISKLEFT + 1; pos < DISKRIGHT; ++pos)
- X mvaddch(y, pos, save[i].disk-- > 0 ? 'D' : ' ');
- X for (pos = PAGELEFT + 1; pos < PAGERIGHT; ++pos)
- X mvaddch(y, pos, save[i].page-- > 0 ? 'P' : ' ');
- X}
- END_OF_FILE
- if test 5630 -ne `wc -c <'barmon.c'`; then
- echo shar: \"'barmon.c'\" unpacked with wrong size!
- fi
- # end of 'barmon.c'
- fi
- if test -f 'hoststat.8' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'hoststat.8'\"
- else
- echo shar: Extracting \"'hoststat.8'\" \(3156 characters\)
- sed "s/^X//" >'hoststat.8' <<'END_OF_FILE'
- X.\" @(#)hoststat.8 1.1 1/18/92 14:13:44 (c) 1991 Larry McVoy
- X.TH HOSTSTAT 8 "November 1991"
- X.SH NAME
- Xhoststat \- report performance statistics for several hosts
- X.SH SYNOPSIS
- X.B hoststat
- X.I "host1 host2 ..."
- X[
- X.I interval
- X]
- X.SH DESCRIPTION
- X.B hoststat
- Xuses the
- X.BR rstatd (8)
- Xto gather system statistics from the specified hosts.
- XIt is typically used to watch a number of processors running distributed
- Xapplications. Other uses include monitoring a network of machines for
- Xoverloading, balance, etc.
- X.LP
- XUpon start up,
- X.B hoststat
- Xdisplays a one-line summary of the activity on each system over the last
- Xsecond.
- XThis information is repeated every
- X.I interval
- Xseconds (default: 5 seconds).
- X.LP
- XFor example, the following command displays a summary of what the
- Xsystem is doing every five seconds.
- X.LP
- X.RS
- X.nf
- X.ft B
- Xexample% hoststat sunbox0 sunbox1 sunbox2 sunbox3
- X.if t .sp .5v
- X host load ipkt opkt err d0 d1 d2 d3 ipg opg intr cs usr sys idl
- Xsunbox0 1.4 717 768 2 40 88 0 0 59 13 2643 3730 34 154 16
- Xsunbox1 0.4 72 73 0 0 0 0 0 6 0 216 144 67 38 0
- Xsunbox2 0.4 5 5 0 0 0 0 0 2 0 34 31 99 2 0
- Xsunbox3 0.6 0 1 0 0 0 0 0 0 0 14 19 87 14 0
- X host load ipkt opkt err d0 d1 d2 d3 ipg opg intr cs usr sys idl
- Xsunbox0 0.5 453 514 2 9 14 0 0 23 18 1500 2220 13 87 1
- Xsunbox1 0.1 54 46 0 0 0 0 0 3 0 141 100 78 22 0
- Xsunbox2 0.1 35 32 0 0 0 0 0 1 0 96 77 84 16 0
- Xsunbox3 0.1 0 0 0 0 0 0 0 0 0 1 15 90 10 0
- X.if t .sp .5v
- X^C
- Xexample%
- X.fi
- X.ft R
- X.RE
- X.LP
- XAll of the fields of
- X.B hoststat
- Xare averaged over the
- X.I interval
- Xspecified.
- XThe fields are:
- X.TP 8
- X.B load
- XThe 1 minute load average.
- X.TP 8
- X.B ipkt
- XThe number of input packets (summation of all network interfaces).
- X.TP 8
- X.B opkt
- XThe number of output packets (as above).
- X.TP 8
- X.B err
- XThe number of packets considered errors, both output and collusion errors
- X(as above).
- X.TP 8
- X.B d0
- XDisk activity on the ``first'' disk. The names are useless but you can usually
- Xfigure out which is which.
- X.TP 8
- X.B d1
- XDisk activity on the ``second'' disk.
- X.TP 8
- X.B d2
- XDisk activity on the ``third'' disk.
- X.TP 8
- X.B d3
- XDisk activity on the ``fourth'' disk.
- X.TP 8
- X.B ipg
- XPages faulted in.
- X.TP 8
- X.B opg
- XPages paged out (by pageout daemon or freebehind of sequential I/O).
- X.TP 8
- X.B intr
- XDevice interrupts.
- X.TP 8
- X.B cs
- XContext switches.
- X.TP 8
- X.B usr
- XPercentage of CPU time spent executing user applications.
- X.TP 8
- X.B sys
- XPercentage of CPU time spent in the kernel.
- X.TP 8
- X.B idl
- XPercentage of CPU time spent idle.
- X.SH BUGS
- XThe rstat()ing hosts effect the timing enough that sometimes the numbers
- Xcome out wrong. They are usually too large. Use larger intervals if you
- Xstart getting bogus numbers.
- X.LP
- XSilently ignores unreachable hosts. Crashing hosts crashes the program.
- X.LP
- XRstatd(8) doesn't dig out all the info I'd like. It would be cool if we
- Xcould implement vmstat(8) and xperfmon(8) with rstatd(8).
- X.LP
- X(I'd refer you to rstat(3) to figure out the fields but that seems to be
- Xundocumented. Sigh.)
- X.SH AUTHOR
- XLarry McVoy, Stanford University
- END_OF_FILE
- if test 3156 -ne `wc -c <'hoststat.8'`; then
- echo shar: \"'hoststat.8'\" unpacked with wrong size!
- fi
- # end of 'hoststat.8'
- fi
- if test -f 'hoststat.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'hoststat.c'\"
- else
- echo shar: Extracting \"'hoststat.c'\" \(2386 characters\)
- sed "s/^X//" >'hoststat.c' <<'END_OF_FILE'
- X#include <rpcsvc/rstat.h>
- X#include <sys/dk.h>
- X#include <ctype.h>
- X#include <stdio.h>
- X
- X#define SLPDEFAULT 10
- X#define sane(x) ((x) > 100000 ? (-1) : (x))
- X#define scale(x) sane(secs == 1 ? (x) : (x) / secs)
- X#define sleep(x) usleep(1000000 * (x))
- X
- Xchar **hosts;
- Xstruct statstime *orig;
- Xint secs;
- Xint n;
- X
- Xmain(ac, av)
- X char **av;
- X{
- X int i;
- X char *calloc();
- X
- X for (i = 1; i < ac && !isdigit(av[i][0]); i++)
- X ;
- X hosts = (char**)calloc(i, sizeof(char *));
- X orig = (struct statstime*)calloc(i, sizeof(struct statstime));
- X
- X /*
- X * Go through it once to fire up all the rstatd's.
- X */
- X for (i = 1; i < ac; ++i) {
- X fprintf(stderr, "%s ", av[i]);
- X if (rstat(av[i], &orig[i - 1]) == 0) {
- X hosts[n++] = av[i];
- X }
- X }
- X fprintf(stderr, "\n");
- X for (i = 1; i < ac; ++i) {
- X if (!hosts[i])
- X continue;
- X rstat(av[i], &orig[i - 1]);
- X }
- X /*
- X * Initialize
- X */
- X sleep(secs = 1);
- X for (i = 0; i < ac - 1; ++i) {
- X if (!hosts[i])
- X continue;
- X dohost(i);
- X }
- X secs = isdigit(av[ac - 1][0]) ? atoi(av[ac -1]) : SLPDEFAULT;
- X while (1) {
- X sleep(secs);
- X for (i = 0; i < ac - 1; ++i) {
- X if (!hosts[i])
- X continue;
- X dohost(i);
- X }
- X }
- X}
- X
- Xdohost(i)
- X{
- X struct statstime st;
- X static count;
- X
- X if (count++ % n == 0) {
- X printf("%8.8s %4s %4s %4s %3s %3s %3s %3s %3s ",
- X "host", "load", "ipkt", "opkt", "err",
- X "d0", "d1", "d2", "d3");
- X printf("%3s %3s %4s %5s ",
- X "ipg", "opg", "intr", "cs");
- X printf("%3s %3s %3s\n", "usr", "sys", "idl");
- X }
- X if (rstat(hosts[i], &st) != 0) {
- X perror(hosts[i]);
- X exit(1);
- X }
- X printf("%8.8s %4.1f %4d %4d %3d %3d %3d %3d %3d %3d %3d %4d %5d ",
- X hosts[i],
- X scale(st.avenrun[0] / 256.),
- X scale(st.if_ipackets - orig[i].if_ipackets),
- X scale(st.if_opackets - orig[i].if_opackets),
- X scale((st.if_collisions + st.if_oerrors) -
- X (orig[i].if_collisions + orig[i].if_oerrors)),
- X scale(st.dk_xfer[0] - orig[i].dk_xfer[0]),
- X scale(st.dk_xfer[1] - orig[i].dk_xfer[1]),
- X scale(st.dk_xfer[2] - orig[i].dk_xfer[2]),
- X scale(st.dk_xfer[3] - orig[i].dk_xfer[3]),
- X scale(st.v_pgpgin - orig[i].v_pgpgin),
- X scale(st.v_pgpgout - orig[i].v_pgpgout),
- X scale(st.v_intr - orig[i].v_intr),
- X scale(st.v_swtch - orig[i].v_swtch),
- X 0);
- X printf("%3d %3d %3d\n",
- X scale(st.cp_time[0] - orig[i].cp_time[0]),
- X scale(st.cp_time[2] - orig[i].cp_time[2]),
- X scale(st.cp_time[3] - orig[i].cp_time[3]));
- X orig[i] = st;
- X}
- END_OF_FILE
- if test 2386 -ne `wc -c <'hoststat.c'`; then
- echo shar: \"'hoststat.c'\" unpacked with wrong size!
- fi
- # end of 'hoststat.c'
- fi
- echo shar: End of shell archive.
- exit 0
-