A P P E N D I X  B

Example: Confirm Swap Space Size

This example shows one way to analyze the physical memory on a system board in a SPARC Enterprise M4000/M5000/M8000/M9000 server from Oracle and Fujitsu to determine whether the system has enough swap space to support deletion of a board. It explains how to collect and analyze information using the showdevices(8) command on the XSCF and the swap(1M) command on the Oracle Solaris OS.

In this example, the system board to be deleted contains physical memory and a disk has been attached to it to provide swap space. A disk that is attached to another system board provides additional swap space.

This example is based on the following swap space size and physical memory size. Most of the swap space in the system is still available and the system board can be safely deleted.

1. Execute the showdevices(8) command on the XSCF to show the resources of the system board (XSB#00-0) to be deleted.

This command displays the total physical memory on the board and the I/O devices that are attached.


XSCF> showdevices 00-0
CPU:
----
DID   XSB     id    state     speed    ecache
00    00-0    40    on-line   2048     4
00    00-0    41    on-line   2048     4
00    00-0    40    on-line   2048     4
00    00-0    41    on-line   2048     4
 
Memory:
-------
             board    perm    base                domain  target  deleted  remaining
DID   XSB    mem MB  mem MB  address              mem MB  XSB     mem MB   mem MB
00    00-0   2048    0       0x0000000000000000   4096                        
 
IO Devices:
----------
DID   XSB     device     resource              usage
00   00-0     sd0        /dev/dsk/c0t0d0s1     swap area

Notice in the Memory section that 2048 MB (2GB) of physical memory is on this board. And in the I/O Devices section the /dev/dsk/c0t3d0s1 disk contains a configured swap space.

2. On the domain execute the swap(1M) command with its -l option specified to determine the size of the swap space configured on the disk.


# swap -l
swapfile              dev      swaplo       blocks      free
/dev/dsk/c0t3d0s1     118,1    16           2097152     2097152
/dev/dsk/c1t1d0s1     118,2    16           6291456     4109712

Notice that /dev/dsk/c0t3d0s1, the disk to be deleted, contributes 2097152 blocks. Each block is 512 bytes, so this disk contributes 1GB of swap space. Moreover, the domain has additional swap space available from /dev/dsk/c1t1d0s1, a disk connected to another system board, which contributes 6291456 blocks (3GB). Thus, the total available swap space is 4GB.

3. Execute the swap(1M) command with its -s option to determine the total value of available swap space.

This amount could have been determined in the previous step, but you can use the following command to get a brief summary of the details.


# swap -s
total: 40096k bytes allocated + 2200k reserved = 42296k used, 4152008k available

Notice that most of the 4GB of total swap space is available. When the system board is deleted, 1GB of total swap space will be removed, and the remaining available swap space will be nearly 3GB. Therefore, there is enough remaining swap space to allow this system board to be deleted.