03-22-2010
swapon was a SunOS command, that was quite a while ago!
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I just finished installing Solaris 2.6 and several applications just to realize that I made a bonehead mistake during the install. When setting up the filesystems, I entered /tmp and no swap! Is it possible to permanantly declare the entire /tmp partition as swap? I am guessing an entry in the... (4 Replies)
Discussion started by: 98_1LE
4 Replies
2. UNIX for Advanced & Expert Users
Hi,
I have a solaris 9-sparc box, which after bouncing is giving swap space related error messages(that swap space is not enough). could it be possible that there was some command issued or setting made before bouncing, which was lost after bouncing? please let me know how i can add swap space... (1 Reply)
Discussion started by: 0ktalmagik
1 Replies
3. Linux
Hi all
i am facing a problem with ext3 file system
df -h is showing 19gb is used even if there is not a single file on the mount point
/dev/mapper/vg01-archive
55G 19G 33G 36% /archive_log
OS == Linux cdrsvr 2.6.9-55.ELsmp #1 SMP Fri Apr 20 17:03:35 EDT 2007... (1 Reply)
Discussion started by: ajays
1 Replies
4. Solaris
Hi Guys !
I have found this problem many times that the swap space (/tmp space more precisely )of my Server becomes full specially when i run a complete back up of the server .
once the /tmp space is full I am not able to run simple commands as i get error like :
fork no space
on... (6 Replies)
Discussion started by: Paarth
6 Replies
5. Solaris
We have a SPARC system which is running on Solaris-9 and Physical memory size is 16GB.We have allocated 32GB SWAP space(2 times of physical memory).But when we use df -h command it shows following output and SWAP space size shows more than our allocated space
# df -h
Filesystem size used... (2 Replies)
Discussion started by: cyberdemon
2 Replies
6. UNIX for Dummies Questions & Answers
Hi all,
OS = Solaris 5.10
Without using top, can anyone please advise how to get the current swap space that is assigned to a sub-zone that is part of the Solaris zone? Some of the servers does not have the top command and I do not have access to run zone level commands either like zonecfg... (3 Replies)
Discussion started by: newbie_01
3 Replies
7. Shell Programming and Scripting
Hi Folks,
I am looking for a way to write a script to calculate swap usage in Solaris so that the current usage will be shown in Percentage value. Thanks!!
Based on 'swap -s' command
# swap -s
total: 1378936k bytes allocated + 1236880k reserved = 2615816k used, 2725104k available (2 Replies)
Discussion started by: jaapar
2 Replies
8. AIX
Hi everyone,
i have a question about the Memory Management in AIX 6.1.
I have
- 128 GB RAM and
- 70 GB Page Space.
The application i am running on this machine is doing some operations in perl. These are done only once a day and uses both memory and paging space. My problem... (1 Reply)
Discussion started by: Haichao
1 Replies
9. Linux
Hi,
i have done a blunder here, i increased the swap space on Xen5.6 server machine using below steps :-
1056 dd if=/dev/zero of=/root/myswapfile bs=1M count=1024
1057 ls -l /root/myswapfile
1058 chmod 600 /root/myswapfile
1059 mkswap /root/myswapfile
1060 swapon /root/myswapfile
... (1 Reply)
Discussion started by: apm
1 Replies
10. Solaris
Hello Team,
By the way of introduction, I am new member in this forum and proud too :)
Here is my questions:
In one of our Solaris Sparc v9 box, we are facing issues related to swap space. Our custom applications are using swap space even though physical memory is available.
From some... (3 Replies)
Discussion started by: piyush_28
3 Replies
LEARN ABOUT FREEBSD
swapon
SWAPON(2) BSD System Calls Manual SWAPON(2)
NAME
swapon, swapoff -- control devices for interleaved paging/swapping
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <unistd.h>
int
swapon(const char *special);
int
swapoff(const char *special);
DESCRIPTION
The swapon() system call makes the block device special available to the system for allocation for paging and swapping. The names of poten-
tially available devices are known to the system and defined at system configuration time. The size of the swap area on special is calcu-
lated at the time the device is first made available for swapping.
The swapoff() system call disables paging and swapping on the given device. All associated swap metadata are deallocated, and the device is
made available for other purposes.
RETURN VALUES
If an error has occurred, a value of -1 is returned and errno is set to indicate the error.
ERRORS
Both swapon() and swapoff() can fail if:
[ENOTDIR] A component of the path prefix is not a directory.
[ENAMETOOLONG] A component of a pathname exceeded 255 characters, or an entire path name exceeded 1023 characters.
[ENOENT] The named device does not exist.
[EACCES] Search permission is denied for a component of the path prefix.
[ELOOP] Too many symbolic links were encountered in translating the pathname.
[EPERM] The caller is not the super-user.
[EFAULT] The special argument points outside the process's allocated address space.
Additionally, swapon() can fail for the following reasons:
[ENOTBLK] The special argument is not a block device.
[EBUSY] The device specified by special has already been made available for swapping
[ENXIO] The major device number of special is out of range (this indicates no device driver exists for the associated hardware).
[EIO] An I/O error occurred while opening the swap device.
Lastly, swapoff() can fail if:
[EINVAL] The system is not currently swapping to special.
[ENOMEM] Not enough virtual memory is available to safely disable paging and swapping to the given device.
SEE ALSO
config(8), swapon(8), sysctl(8)
HISTORY
The swapon() system call appeared in 4.0BSD. The swapoff() system call appeared in FreeBSD 5.0.
BSD
October 4, 2013 BSD