Sponsored Content
Full Discussion: increase size of /tmp
Top Forums UNIX for Dummies Questions & Answers increase size of /tmp Post 37935 by RTM on Wednesday 2nd of July 2003 11:44:55 AM
Old 07-02-2003
Please post your OS and version, any error messages from /var/adm/messages (or if you have it configured other than default - from the file you are sending error messages to), the output from df -k, version and type of any volume manager you are using.

The following probably won't help right off since you state you don't have any free space.

From Sunsolve:
Quote:
Problem: receiving error message:
WARNING: /tmp: File system full, swap space limit exceeded

/tmp becomes full when the following quasi equation looks like this for your
system:
((ram + swap - processes) * .9) - files_in_/tmp = 0
| | | | |
| ---------- | /tmp (avail)
| | |
| virtual memory |
| |
-------------------------------
|
/tmp (total)

Resolution Top

There are many things that can be done to remedy the problem, among them;
1. add more ram
2. add more swap
3. kill processes
4. delete files in /tmp

A fast and simple solution to add more swap is to create a swap file
and add it to the existing swap:

#mkfile <megs>m <path_to_filesystem_with_plenty_of_space>/swap
#swap -a <path_to_filesystem_with_plenty_of_space>/swap

Example:

#mkfile 20m /newdir/swapfile
#swap -a /newdir/swapfile

To make this swap space available (add the swap file to virtual memory) each
time the system is rebooted, add a line in the /etc/vfstab.

#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
...
/swapfile - - swap - no -

This is inefficient though. Filesystems waste space for administrative reasons
(about 10%). They are slower than accessing raw disk too.
It is better to use a raw disk parition as a swap file.

There may be plenty of virtual memory. The problem could be that some processes
are simply using too much swap and need to be killed/restarted. Some badly
written/configured programs will take up all available memory no matter how
much of it is available.

The see which processes are using the most memory run the following command:

# /usr/bin/ps -el | sort -rn -k 10
8 S 52475 2594 345 0 40 20 60b1adc0 17325 6098872e ? 57:24 Xsun
8 S 52475 8111 8092 0 51 20 60d6efa0 3882 61915dfe pts/4 1:06 sotool
8 S 52475 9054 19313 0 51 20 60d07658 1568 pts/6 0:26 dtmail
8 S 0 3211 1 1 43 20 609f2038 1207 60989a16 ? 66:41 esd
8 S 0 3213 1 0 40 20 6095c6e0 1146 60989a66 ? 27:01 esd
8 S 52475 2739 2728 0 51 20 60cea208 1128 60b2a0c6 ? 0:01 nametool
^
The above ps output is sorted by process size. |
The biggest offenders are at the top. |
The 10th column is the process size in pages. _______|

To see how big a page is in kbytes, run the pagesize command:
# pagesize
8192
 

10 More Discussions You Might Find Interesting

1. HP-UX

increase size

Hi All, one of the mount point in Hp ux server has reached 95% its a data base file and can not be deleted. so i want to know how to increase the size of mount point i am new to unix ,please help me (1 Reply)
Discussion started by: jyoti
1 Replies

2. Solaris

Increase size of /tmp swap File

Hi Guys I need to increase the size of my /tmp swap file. What is the easiest way to do this. Thanks Carson (2 Replies)
Discussion started by: cmackin
2 Replies

3. UNIX for Dummies Questions & Answers

How to extend /tmp size?

Dear all, I wanna to extend my /tmp size. I deleted the all files of /tmp but it still shows there's no more space on it. The OS is Red Hat Enterprise Linux AS release 4 (Nahant Update 5). # df /tmp/ -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/VolGroup00-LogVol00... (3 Replies)
Discussion started by: mr_bold
3 Replies

4. UNIX for Dummies Questions & Answers

How to increase process size ???

Hi All, Could anybody tell me how to increase/decrease a process size in UNIX HP machine ? Whether the process size limitation will cause core dump ? Thanks, Rohit.. (1 Reply)
Discussion started by: ronix007
1 Replies

5. Solaris

Increase /tmp size temporarily

Hi all system Solaris 10 10/09 s10x_u8wos_08a X86 ufs file system I would like to install SunStudio. After the gui comes up it shows that i need to add swap space of at least 900m. the command swap-s shows 880m free. My question is can you temporarily increase swap by 1 or 2... (3 Replies)
Discussion started by: kc2dws
3 Replies

6. UNIX for Dummies Questions & Answers

Increase size to sd[b-c]

hi guys I am working on my vmware workstation. I have a /dev/sdb which is 5GB. I am using LVM. Now I increase /dev/sdb 2 more GB. fdisk -l shows 7 GB but pvscan still shows 5GB. how do I make my system recognize the new 7GB added and be able to add those to my physical volumen and... (1 Reply)
Discussion started by: kopper
1 Replies

7. Solaris

Swap size increase

Dear All, How to increase the swap size when physicall memory reaches 60 %. OR it can be only done after the physicall memory is full. Rgds Rj (8 Replies)
Discussion started by: jegaraman
8 Replies

8. Solaris

/tmp size is less whereas size allocated to swap is more

Hi, the /tmp size is less whereas the size allocated to swap is quite big. how to increase the size of /tmp - #: swap -l swapfile dev swaplo blocks free /dev/md/dsk/d20 85,20 8 273096 273096 #: swap -s total: 46875128k bytes allocated + 2347188k reserved =... (2 Replies)
Discussion started by: psb74
2 Replies

9. Solaris

How to use space in /tmp to increase root?

Hello All, I have solaris server running, uname -a SunOS host 5.9 Generic_112233-12 sun4u sparc SUNW,Sun-Fire-280R Filesystem Size Used Available Capacity Mounted on /dev/md/dsk/d0 9.8G 8.7G 1.0G 90% / /dev/dsk/c1t1d0s3 4.3G 7.7M 4.2G ... (17 Replies)
Discussion started by: gull05
17 Replies

10. Solaris

Increase /tmp file system size dynamically in Solaris zone

Hi Please let me know how to increase the size of /tmp file system from 512m to 1024m dynamically without reboot in solaris zone # df -h Filesystem size used avail capacity Mounted on zones/zone1 11G 1.0G 10.0G 10% / /dev 11G 1.0G ... (6 Replies)
Discussion started by: sb200
6 Replies
swap(1M)                                                  System Administration Commands                                                  swap(1M)

NAME
swap - swap administrative interface SYNOPSIS
/usr/sbin/swap -a swapname [swaplow] [swaplen] /usr/sbin/swap -d swapname [swaplow] /usr/sbin/swap -l /usr/sbin/swap -s DESCRIPTION
The swap utility provides a method of adding, deleting, and monitoring the system swap areas used by the memory manager. OPTIONS
The following options are supported: -a swapname Add the specified swap area. This option can only be used by the super-user. swapname is the name of the swap file: for example, /dev/dsk/c0t0d0s1 or a regular file. swaplow is the offset in 512-byte blocks into the file where the swap area should begin. swaplen is the desired length of the swap area in 512-byte blocks. The value of swaplen can not be less than 16. For example, if n blocks are specified, then (n-1) blocks would be the actual swap length. swaplen must be at least one page in length. The size of a page of memory can be determined by using the pagesize command. See pagesize(1). Since the first page of a swap file is automatically skipped, and a swap file needs to be at least one page in length, the minimum size should be a multiple of 2 pagesize bytes. The size of a page of memory is machine dependent. swaplow + swaplen must be less than or equal to the size of the swap file. If swaplen is not specified, an area will be added starting at swaplow and extending to the end of the designated file. If neither swaplow nor swaplen are specified, the whole file will be used except for the first page. Swap areas are normally added automatically during system startup by the /sbin/swapadd script. This script adds all swap areas which have been specified in the /etc/vfstab file; for the syntax of these specifications, see vfstab(4). To use an NFS or local file-system swapname, you should first create a file using mkfile(1M). A local file-system swap file can now be added to the running system by just running the swap -a command. For NFS mounted swap files, the server needs to export the file. Do this by performing the following steps: 1. Add the following line to /etc/dfs/dfstab: share -F nfs -o rw=clientname,root=clientname path-to-swap-file 2. Run shareall(1M). 3. Have the client add the following line to /etc/vfstab: server:path-to-swap-file - local-path-to-swap-filenfs --- local-path-to-swap-file -- swap --- 4. Have the client run mount: # mount local-path-to-swap-file 5. The client can then run swap -a to add the swap space: # swap -a local-path-to-swap-file -d swapname Delete the specified swap area. This option can only be used by the super-user. swapname is the name of the swap file: for example, /dev/dsk/c0t0d0s1 or a regular file. swaplow is the offset in 512-byte blocks into the swap area to be deleted. If swaplow is not specified, the area will be deleted starting at the second page. When the command completes, swap blocks can no longer be allocated from this area and all swap blocks previously in use in this swap area have been moved to other swap areas. -l List the status of all the swap areas. The output has five columns: path The path name for the swap area. dev The major/minor device number in decimal if it is a block special device; zeroes otherwise. swaplo The swaplow value for the area in 512-byte blocks. blocks The swaplen value for the area in 512-byte blocks. free The number of 512-byte blocks in this area that are not currently allocated. The list does not include swap space in the form of physical memory because this space is not associated with a particular swap area. If swap -l is run while swapname is in the process of being deleted (by swap -d), the string INDEL will appear in a sixth column of the swap stats. -s Print summary information about total swap space usage and availability: allocated The total amount of swap space in bytes currently allocated for use as backing store. reserved The total amount of swap space in bytes not currently allocated, but claimed by memory mappings for possi- ble future use. used The total amount of swap space in bytes that is either allocated or reserved. available The total swap space in bytes that is currently available for future reservation and allocation. These numbers include swap space from all configured swap areas as listed by the -l option, as well swap space in the form of physical memory. USAGE
On the 32-bit operating system, only the first 2 Gbytes -1 are used for swap devices greater than or equal to 2 Gbytes in size. On the 64-bit operating system, a block device larger than 2 Gbytes can be fully utilized for swap up to 2**63 -1 bytes. ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment variables that affect the execution of swap: LC_CTYPE and LC_MESSAGE. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
pagesize(1), mkfile(1M), shareall(1M), getpagesize(3C), vfstab(4), attributes(5), largefile(5) WARNINGS
No check is done to determine if a swap area being added overlaps with an existing file system. SunOS 5.10 20 Jan 2004 swap(1M)
All times are GMT -4. The time now is 01:55 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy