Subject: bin/5095: 'swapctl -l' doesn't list swap file name.
To: None <gnats-bugs@gnats.netbsd.org>
From: None <cgd@NetBSD.ORG>
List: netbsd-bugs
Date: 03/02/1998 10:55:52
>Number:         5095
>Category:       bin
>Synopsis:       'swapctl -l' doesn't list swap file name.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Mar  2 11:05:01 1998
>Last-Modified:
>Originator:     Chris G. Demetriou
>Organization:
Kernel Hackers 'r' Us
>Release:        NetBSD 1.3, NetBSD-current (March 1, 1998)
>Environment:
NetBSD 1.3 on arm32, i386, NetBSD-current on i386 (though any NetBSD
version which supports swapctl suffers from the problem).

>Description:
	(It could be that this bug is slightly mis-filed; swapctl
	doesn't print this information, but the kernel probably does
	provide it for swapctl to print.  That might make it at least
	partially a kernel bug.)

	'swapctl -l' doesn't list swap file names.  For instance,
	on one of my arm32 systems:

	1 [dnanc14] cgd % df | grep swap
	sharking:/usr/shark/swap/swap.16.4.208.73    8130188  6862862   616912    92%    /swap
	2 [dnanc14] cgd % swapctl -l
	Device      512-blocks     Used    Avail Capacity  Priority
	/dev/??         327680     4928   322752     2%    0

	(/swap is the only swap device/file in that system), or
	on my laptop:

	brick# swapctl -l
	Device      1K-blocks     Used    Avail Capacity  Priority
	/dev/wd0b       64512        4    64508     0%    0
	brick# swapon /root/swapfile
	brick# swapctl -l
	Device      1K-blocks     Used    Avail Capacity  Priority
	/dev/wd0b       64512        4    64508     0%    0
	/dev/??          8192        0     8192     0%    0
	Total           72704        4    72700     0%

>How-To-Repeat:
	Swapon to a file, swapctl -l.  (see above.)

>Fix:
	Unknown.  Probably something like: keep a copy of the pathname
	swapped on to in the kernel, and make swapctl use it.
>Audit-Trail:
>Unformatted: