System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

swapon -s do not show results

SOLVED
Go to solution

swapon -s do not show results

Hi,

I have a problem with swapon -s command, when i execute swapon -s show following:
root@xxxxxxxxxx:/# swapon -s

Total swap allocation:
Allocated space: 0 pages (0.00KB)
In-use space: 0 pages ( 0%)
Available space: 0 pages ( 0%)
root@xxxxxxxxxx:/#

In sysconfigtab file i haven't any line with vm swapdevice configuration. In other systems i have the following line (swapdevice = /dev/disk/dsk0b) but i haven't in this.

How can i modify this configuration???

Thank's in advance
Jesús.
8 REPLIES
Ivan Ferreira
Honored Contributor
Solution

Re: swapon -s do not show results

First, check if your disk label contains swap information, use:

disklabel -r dskX

You should see a swap partition, for example, dsk0b, check for a line like this:

b: 59597664 1048576 swap # 371*- 21505*


Then to add that partition as swap follow this procedure:

swapon /dev/disk/dsk0b

Create a file called vm.stanza, with this contents:

vm:
swapdevice=/dev/disk/dsk0b

And then run:

sysconfigdb -m -f vm.stanza
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Ivan Ferreira
Honored Contributor

Re: swapon -s do not show results

Hi Jesus, also, in your profile:

http://forums1.itrc.hp.com/service/forums/publicProfile.do?userId=BR877275&forumId=1

It shows:

I have assigned points to 0 of 17 responses to my questions.

It's nice to thank by giving points to the answers you get.

Please see:

http://forums1.itrc.hp.com/service/forums/helptips.do?#28

Have a nice day.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Ann Majeske
Honored Contributor

Re: swapon -s do not show results

Note Ivan's response is for Tru64 V5.*. The procedure is different for V4.*. You did not specify which version/patch kit you are running.

Ann

Re: swapon -s do not show results

Ivan,

Thank you very much for your response, i try to make it.

Only one thing, when i make the procedure, i think to need reboot the system, is correct this?

Thank's in advance.
Jesús.
Vladimir Fabecic
Honored Contributor

Re: swapon -s do not show results

Ussually you do not have to reboot the system to add swap space.
Please post output of:
# disklabel -r dsk0
In vino veritas, in VMS cluster

Re: swapon -s do not show results

This is the output of the command disklabel -r dsk0, the swap partition is b

8 partitions:
# size offset fstype fsize bsize cpg # ~Cyl values
a: 4000000 0 AdvFS # 0 - 787*
b: 13000000 4000001 swap # 787*- 3346*
c: 35565080 0 unused 0 0 # 0 - 7000
d: 0 0 unused 0 0 # 0 - 0
e: 0 0 unused 0 0 # 0 - 0
f: 0 0 unused 0 0 # 0 - 0
g: 10000000 17000001 AdvFS # 3346*- 5314*
h: 8000000 27000001 AdvFS # 5314*- 6889*
Vladimir Fabecic
Honored Contributor

Re: swapon -s do not show results

Looks like you do not have swap device defined in sysconfigtab.
What you have to do is (this is for version 5.X)
- edit sysconfigtab and add line:
"swapdevice = /dev/disk/dsk0b" under vm section
- do:
# swapon -a (this should mount swap)
- do:
# swapon -s
to check everything is OK
No need to reboot. In case anything goes wrong, post error message.
And please post your OS version.
In vino veritas, in VMS cluster

Re: swapon -s do not show results

Hi,

My OS version is 5.1A, i have executed the swapon [swap device] command and it has finished correctly.

I have added the swap device in sysconfigtab and only need reboot de system for check that the sysconfigtab is correct.

Thank you for all.

Jesús.