Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/systat Match changes to vmstat.c (splitting of dkrea...



details:   https://anonhg.NetBSD.org/src/rev/b0d19b55a878
branches:  trunk
changeset: 588023:b0d19b55a878
user:      dsl <dsl%NetBSD.org@localhost>
date:      Sun Feb 05 09:58:39 2006 +0000

description:
Match changes to vmstat.c (splitting of dkreadstats).
Read tape stats if there are no disks found - is this possible?

diffstat:

 usr.bin/systat/iostat.c |  16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diffs (53 lines):

diff -r 04b2665f49f1 -r b0d19b55a878 usr.bin/systat/iostat.c
--- a/usr.bin/systat/iostat.c   Sun Feb 05 09:54:50 2006 +0000
+++ b/usr.bin/systat/iostat.c   Sun Feb 05 09:58:39 2006 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: iostat.c,v 1.33 2005/08/07 12:32:38 blymn Exp $        */
+/*     $NetBSD: iostat.c,v 1.34 2006/02/05 09:58:39 dsl Exp $  */
 
 /*
  * Copyright (c) 1980, 1992, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)iostat.c   8.1 (Berkeley) 6/6/93";
 #endif
-__RCSID("$NetBSD: iostat.c,v 1.33 2005/08/07 12:32:38 blymn Exp $");
+__RCSID("$NetBSD: iostat.c,v 1.34 2006/02/05 09:58:39 dsl Exp $");
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -84,6 +84,7 @@
 
        dkinit(1);
        tpinit(1);
+       cpureadstats();
        dkreadstats();
        tpreadstats();
        return(1);
@@ -93,14 +94,12 @@
 fetchiostat(void)
 {
 
-       if (dk_ndrive == 0)
-               return;
-       else
+       cpureadstats();
+
+       if (dk_ndrive != 0)
                dkreadstats();
 
-       if (tp_ndrive == 0)
-               return;
-       else
+       if (tp_ndrive != 0)
                tpreadstats();
 }
 
@@ -235,6 +234,7 @@
        if (dk_ndrive == 0)
                return;
        dkswap();
+       cpuswap();
        tpswap();
 
        etime = cur.cp_etime;



Home | Main Index | Thread Index | Old Index