Project

General

Profile

Bug #3831

swap -l output header needs work

Added by Peter Tribble over 7 years ago. Updated over 7 years ago.

Status:
New
Priority:
Normal
Assignee:
Category:
-
Start date:
2013-06-18
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:

Description

Consider the following output from the swap command on a current system

# swap -l
swapfile             dev    swaplo   blocks     free
/dev/zvol/dsk/rpool/swap 142,2         8  4194296  3417480
# swap -lh
swapfile             dev    swaplo   blocks     free
/dev/zvol/dsk/rpool/swap 142,2        4K     2.0G     1.6G


There are two problems here:

1. The header doesn't line up with the values at all. The name of the swap device is longer than whoever implemented this initially thought of, and swap sizes can be a little larger as well

2. For the case where -l is combined with -k or -h, the use of "blocks" in the header is just wrong. It should probably be just "size"

#1

Updated by Prasad Joshi over 7 years ago

  • Assignee set to Prasad Joshi
#2

Updated by Yuri Pankov over 7 years ago

One possible idea - we could strip the "/dev/zvol/dsk/" part if we are swapping to zvol, "rpool/swap" (without leading /) should clearly indicate that it's indeed the case.

Also available in: Atom PDF