Subject: port-i386/3153: vmstat/iostat exits when no disk on system
To: None <>
From: None <>
List: netbsd-bugs
Date: 01/28/1997 16:49:13
>Number:         3153
>Category:       port-i386
>Synopsis:       vmstat/iostat exits when no disk on system
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 28 08:05:00 1997
>Originator:     Heiko W.Rupp
>Release:        1.1
System: NetBSD 1.1 NetBSD 1.1 (SNERT+PPP) #0: Mon Jan 20 15:15:19 MET 1997 i386


When calling vmstat on system that has no hard drive (e.g. a NFS system):

quaak!1> vmstat
vmstat: dk_ndrive -1

The same also applies to iostat:

quaak# iostat
iostat: invalid dk_ndrive -1

systat(8) also has some problems


Build a system that boots from a floppy and that gets root and swap via NFS.
Then start vmstat.


in vmstat.c:

        if (dk_ndrive <= 0) {
                (void)fprintf(stderr, "vmstat: dk_ndrive %d\n", dk_ndrive);

remove the exit and just remember that no disks are present.