06-16-2006 03:46 PM
I am trying to implement a function on HP-UX B 11.11i arch system to find the swap space.
We have a command "swap" in case of Solaris and "free" in case of Linux.
Is there any equivalent command on HP-UX??
I need to know both free as as well as used swap space..
06-16-2006 04:09 PM
If you want to add swap:
1) lvcreate -L #### -n swap -C y -r n /dev/vg##
-L for size of logical volume in MB. -L 1000, for example.
-n for 'name' of logical volume, for example 'swap'.
2) swapon -f -p 1 /dev/vg##/swap
3) sysdef | grep -i maxswapchunks
Note the size of the kernel parameter 'maxswapchunks'
4) sysdef | grep -i swchunk
Note the size of the kernel parameter 'swchunk'
5) Calculate the new value of 'maxswapchunks'
maxswapchunks = total swap / 1024 * swchunk
If you decide to change maxswapchunks answer back and I'll show you how. And paste in these values so I can verify your calculations.
06-16-2006 04:48 PM
06-18-2006 07:05 PM
if you have 32GB of ram, and only create a swap of 8GB it should figure it out by itself what to do with it. allocate what, where and just do it's thing and don't bother me with such details.