chps Command

Purpose

Changes the attributes of a paging space.

Syntax

chps-t ps_helper ] [-s LogicalPartitions  |   -d LogicalPartitions ] [ -f  ] [-c  ChecksumSize ] [  -a { } ] PagingSpace

Description

The chps command changes the attributes of a paging space. The PagingSpace parameter specifies the name of the paging space to be changed.

To change the size of a Network File System (NFS) paging space, the size of the file that resides on the server must first be changed and then the swapon command used to notify the client of the change in size of the paging space.

Note: There is a paging space limit of 64 GB per device.

If the -t flag is specified, the argument will be assumed to be a third-party helper executable. If the helper executable is present in the /sbin/helpers/pagespace path then it will be spawned passing all the arguments and with the -c flag to specify chps command. The /etc/swapspaces path will be modified accordingly if the helper executable returns zero. The helper executable must change the attributes. If the helper program doesn’t exist in the /sbin/helpers/pagespace path, the chps command will display the usage error. The helper executable must exit with a 0 if successful and a non-zero if it fails.

You could also use the System Management Interface Tool (SMIT) smit chps fast path to run this command.

Note: The primary paging space is hardcoded in the boot record. Therefore, the primary paging space will always be activated when the system is restarted. The chps command is unable to deactivate the primary paging space.

Flags

Item Description
-a Specifies to use a paging space at the next system restart.
y
Specifies that the paging space is active at subsequent system restarts.
n
Specifies that the paging space is inactive at subsequent system restarts.
-d LogicalPartitions Specifies the number of logical partitions to subtract.
-c ChecksumSize Specifies the size of the checksum to use for the paging space, in bits. Valid options are 0 (checksums disabled), 8, 16 and 32. If -c is not specified, it will default to 0. The chps command with this option will fail on a swapped on paging space unless -f is used.
-f Specifies that the checksum size set by -c will be used for the next swapon of the paging space. This option has no effect if -c is not used or if the paging space is not swapped on.
-s LogicalPartitions Specifies the number of logical partitions to add.
-t Specifies to use the helper program under /sbin/helpers/pagespace directory.
ps_helper
Name of the helper program for a third party device.

Security

Attention RBAC users and Trusted AIX® users: This command can perform privileged operations. Only privileged users can run privileged operations. For more information about authorizations and privileges, see Privileged Command Database in Security. For a list of privileges and the authorizations associated with this command, see the lssecattr command or the getcmdattr subcommand.

Examples

  1. To change the size of the myvg paging space, enter:
    chps  -s 4 myvg
    This adds four logical partitions to the myvg paging space.
  2. To define the PS02 paging space as configured and active at subsequent system restarts, enter:
    chps  -a y PS02
    This specifies that the PS02 paging space is to be active at subsequent system restarts.
  3. To set the checksum size of the myvg paging space to 1 byte, enter:
    chps  -c 8 mypg
    This sets the myvg paging space checksum size to 8 bits, if it is not swapped on.
  4. To change the size of the myvg paging space using helper program foo enter:
    chps  -t foo –s4 myps
    This adds four logical partitions to myps by calling the helper program foo.

Files

Item Description
/etc/swapspaces Specifies the paging space devices and their attributes.