trynd / wren

Linux boot platform that provides a portable, multi-system, run-in-memory Linux environment.
GNU General Public License v3.0
0 stars 1 forks source link

wren (control script): Reformat usage table with separate RAM and Swap #31

Open codewithmichael opened 9 years ago

codewithmichael commented 9 years ago

This commit reformats the wren usage output table with [STORAGE] and [MEMORY] headers and subdivides the previous memory line into ram, swap, and total. The line is still labeled memory if wren usage memory is called.

Additionally, the unallocated header has been shortened to unalloc in human readable mode and the all subcommand will additionally display the active or save lines even if they are not currently applicable.

Sample Output:

user@computer:~$ sudo wren usage -h
           total    used    free  unalloc
[STORAGE]
active:     1.0G    8.8M  885.9M        -
device:     5.9G    2.9G    2.6G        -
[MEMORY]
ram:        3.9G    1.3G    2.5G        -
swap:         0B      0B      0B        -
total:      3.9G    1.3G    2.5G     1.7G
codewithmichael commented 9 years ago

Note: This is likely to cause a merge conflict with PR #30.

codewithmichael commented 9 years ago

It appears that when a save file is used directly, wren usage correctly hides the "unallocated" header and subsequent fields except for the memory/total line. On that line the field is still hard coded to '-' instead of using "$unallocated_unused" as is done everywhere else.

I will make this correction as part of the merge.