Subject: port-i386/3153: vmstat/iostat exits when no disk on system
To: None <gnats-bugs@gnats.netbsd.org>
From: None <hwr@pilhuhn.de>
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
>Last-Modified:
>Originator: Heiko W.Rupp
>Organization:
private
>Release: 1.1
>Environment:
System: NetBSD snert.pilhuhn.de 1.1 NetBSD 1.1 (SNERT+PPP) #0: Mon Jan 20 15:15:19 MET 1997 hwr@snert.pilhuhn.de:/usr/src/sys/arch/i386/compile/SNERT+PPP i386
>Description:
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
>How-To-Repeat:
Build a system that boots from a floppy and that gets root and swap via NFS.
Then start vmstat.
>Fix:
in vmstat.c:
if (dk_ndrive <= 0) {
(void)fprintf(stderr, "vmstat: dk_ndrive %d\n", dk_ndrive);
exit(1);
remove the exit and just remember that no disks are present.
>Audit-Trail:
>Unformatted: