Q. I am running out of swap space due to Oracle database. This is a production server. How do I add a new swap file or area that doesn't demand a reboot of the system?
A. Sun Solaris UNIX offers very easy way to add swap file or space on fly without rebooting Solaris system.
Login as the root user
Type the following command to create swap file. It creates file that are suitable for use as NFS- mounted swap areas.
# mkfile -v 2g tmp-swap.file
-v : Report the names and sizes of created files (verbose)
2g : 2Gbyte file size.
Now turn on or add the new swap file to the Solaris UNIX swap area:
# swap -a tmp-swap.file
The swap command provides a method of adding, deleting, and monitoring the system swap areas used by the memory manager.
This will do the job. Please note that this swap file is slow as compare to your regular raw swap device.
For more information refer to man pages of swap and mkfile command.TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!
- 30 Cool Open Source Software I Discovered in 2013
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012
- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop