From nobody@www.freebsd.org  Sat Jun 15 09:46:13 2002
Return-Path: <nobody@www.freebsd.org>
Received: from nwww.freebsd.org (www.FreeBSD.org [216.136.204.117])
	by hub.freebsd.org (Postfix) with ESMTP id 655A337B41D
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 15 Jun 2002 09:46:13 -0700 (PDT)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by nwww.freebsd.org (8.12.2/8.12.2) with ESMTP id g5FGkDhG073080
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 15 Jun 2002 09:46:13 -0700 (PDT)
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.2/8.12.2/Submit) id g5FGkDNG073079;
	Sat, 15 Jun 2002 09:46:13 -0700 (PDT)
Message-Id: <200206151646.g5FGkDNG073079@www.freebsd.org>
Date: Sat, 15 Jun 2002 09:46:13 -0700 (PDT)
From: Andy Farkas <andyf@speednet.com.au>
To: freebsd-gnats-submit@FreeBSD.org
Subject: pstat/swapinfo(8) is buggy
X-Send-Pr-Version: www-1.0

>Number:         39339
>Category:       bin
>Synopsis:       pstat/swapinfo(8) is buggy
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jun 15 09:50:01 PDT 2002
>Closed-Date:    Mon Jun 17 23:37:47 PDT 2002
>Last-Modified:  Mon Jun 17 23:37:47 PDT 2002
>Originator:     Andy Farkas
>Release:        4.6-RELEASE
>Organization:
Speednet
>Environment:
FreeBSD 4.6-RELEASE #0: Sun Jun 16 00:17:40 EST 2002     
>Description:
$ grep swap /etc/fstab
/dev/ad0s1b  none  swap  sw  0  0
/dev/ad2s1b  none  swap  sw  0  0
/dev/da0s1b  none  swap  sw  0  0
/dev/da1s1b  none  swap  sw  0  0
/dev/da2s1b  none  swap  sw  0  0
$ /usr/sbin/pstat -s
Device          1K-blocks     Used    Avail Capacity  Type
/dev/ad0s1b        262016        0   262016     0%    Interleaved
/dev/rad2s1b       262016        0   262016     0%    Interleaved
/dev/rda0s1b       262016        0   262016     0%    Interleaved
/dev/rda1s1b       262016        0   262016     0%    Interleaved
Total             1048064        0  1048064     0%

Notice that /dev/da2s1b is not shown. This is the buggy bit.

Notice that it displays "raw" devices for only some swap partitions.

Also, 'man 8 swapinfo' suggests that "If you supply the option again, as in -ss, the system will display a breakdown of the swap bitmap/radix-tree."

$ /usr/sbin/swapinfo -ss
swapinfo: illegal option -- s
usage: swapinfo [-k] [-M core] [-N system]


>How-To-Repeat:
     
>Fix:
      
>Release-Note:
>Audit-Trail:

From: Makoto Matsushita <matusita@jp.FreeBSD.org>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/39339: pstat/swapinfo(8) is buggy
Date: Sun, 16 Jun 2002 02:37:10 +0900

 andyf> Notice that /dev/da2s1b is not shown. This is the buggy bit.
 
 This is by design; kernel option "NSWAPDEV" should be set to increase
 the number of swap devices.
 
 See src/sys/i386/conf/LINT, and discover what this option means, and
 why this value is not so large by default (in src/sys/vm/vm_swap.c).
 
 -- -
 Makoto `MAR' Matsushita

From: Andy Farkas <andyf@speednet.com.au>
To: <freebsd-gnats-submit@FreeBSD.org>
Cc:  
Subject: Re: bin/39339: pstat/swapinfo(8) is buggy
Date: Tue, 18 Jun 2002 16:28:36 +1000 (EST)

 Please close.
 
 NSWAPDEV should be mentioned in the pstat(8) man page - I will submit a
 new PR.
 
 --
 
  :{ andyf@speednet.com.au
 
         Andy Farkas
     System Administrator
    Speednet Communications
  http://www.speednet.com.au/
 
 
 
State-Changed-From-To: open->closed 
State-Changed-By: matusita 
State-Changed-When: Mon Jun 17 23:37:01 PDT 2002 
State-Changed-Why:  
Requested by the originator. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=39339 
>Unformatted:
