Hello,
I am trying to find an answer to an interesting dilemma I'm faced with:
I need to find out the amount of free and not reserved swap space, on a "per swap partition" basis. For example, if my "swapon -s" output looks like:
Swap partition /dev/rz1b (default swap):
Allocated space: 16896 pages (132MB)
In-use space: 5787 pages ( 34%)
Free space: 11109 pages ( 65%)
Swap partition /dev/rz3g:
Allocated space: 95410 pages (745MB)
In-use space: 5517 pages ( 5%)
Free space: 89893 pages ( 94%)
Total swap allocation:
Allocated space: 112306 pages (877MB)
Reserved space: 17017 pages ( 15%)
In-use space: 11304 pages ( 10%)
Available space: 95289 pages ( 84%)
Then I need to know how the reserved space (i.e. the 17017 pages) is allocated between the 2 swap spaces.
Is there any way that this can be done? I know I can use "swapctl" or "table" to get all of the information that swapon spits out, but is there any way to retrieve the amount of reserved space for each swap partition? Is it valid to assume that the reserved space is evenly spaced amongst the remaining free space in the partitions? Probably not.
For example, do I assume that, since the first partition contains 11% of the remaining free space, that it also contains 11% of the reserved space (i.e. 1872 pages), and the other partition contains the other 89% (15145 pages)?
Thanks in advance with your help and/or suggestions,
Joseph Pohlmann
Computer Associates
Software Engineer
tel: +1 513 229-2437
fax: +1 513 229-2883
Joseph.Pohlmann_at_ca.com <mailto:Joseph.Pohlmann_at_ca.com>
Received on Thu Jun 21 2001 - 17:38:12 NZST