Follow the below steps to add SWAP Space on Linux
When applying Oracle EBS patches using ADOP utility you may encounter an error that there is not enough SWAP memory on the server. Follow below steps to add SWAP file on the server. To check the swap size you can run 'free' command.
- Login as root user:
- Create a file in a selected directory to add swap space by typing:
where dir is a directory in which you have permission to add swap space. The myswapfile is the name of the swap file you are creating. The number_blocks_needed is an amount of 1024-byte blocks you want to create. See the dd(1) man page for more information.
- Verify that the file was created by typing:
The new file appears in the directory.
- Initialize the new swap area by typing:
- Run the swapon command to enable the new swap space for paging and swapping by typing the following:
- Verify that the extra swap space was added by typing:
The output shows the allocated swap space.