Project

General

Profile

Actions

Bug #3831

open

swap -l output header needs work

Added by Peter Tribble almost 10 years ago. Updated almost 10 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:
External Bug:

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"

Actions #1

Updated by Prasad Joshi almost 10 years ago

  • Assignee set to Prasad Joshi
Actions #2

Updated by Yuri Pankov almost 10 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.

Actions

Also available in: Atom PDF