Visit Our UNIX and Linux User Community

Linux and UNIX Man Pages

Test Your Knowledge in Computers #220
Difficulty: Easy
When multiple routers are used in interconnected networks, the routers can exchange information about destination addresses using a routing protocol.
True or False?
Linux & Unix Commands - Search Man Pages

swap(4) [bsd man page]

SWAP(4) 						     Kernel Interfaces Manual							   SWAP(4)

swap - swap device DESCRIPTION
This file refers to the swap device in use by the system. It should be linked to the special file for the disk or disk partition on which the system swaps. It is used by programs that wish to read from the swap device without knowing its real name. The script /dev/MAKEDEV.local normally is edited by the system builder to set /dev/swap up correctly. FILES
/dev/swap /dev/MAKEDEV script to create special files /dev/MAKEDEV.local script to localize special files SEE ALSO
ps(1), w(1) 3rd Berkeley Distribution January 28, 1988 SWAP(4)

Check Out this Related Man Page

RAM(4)							     Kernel Interfaces Manual							    RAM(4)

ram - ram disk driver SYNOPSIS
/sys/conf/SYSTEM: NRAM ram_size # RAM disk size (512-byte blocks) major device number(s): block: 3 minor device encoding: must be zero (0) DESCRIPTION
The ram pseudo-device provides a very fast extended memory store. It's use is intended for file systems like /tmp and applications which need to access a reasonably large amount of data quickly. The amount of memory dedicated to the ram device is controlled by the NRAM definition in units of 512-byte blocks. This is also patchable in the system binary through the variable ram_size (though a patched system would have to be rebooted before any change took effect; see adb(1)). This makes it easy to test the effects of different ram disk sizes on system performance. It's important to note that any space given to the ram device is permanently allocated at system boot time. Dedicating too much memory can adversely affect system performance by forcing the system to swap heavily as in a memory poor environment. The block file accesses the ram disk via the system's buffering mechanism through a buffer sharing arrangement with the buffer cache. It may be read and written without regard to physical disk records. There is no `raw' interface since no speed advantage is gained by such an interface with the ram disk. DISK SUPPORT
The ram driver does not support pseudo-disks (partitions). The special files refer to the entire `drive' as a single sequentially addressed file. A typical use for the ram disk would be to mount /tmp on it. Note that if this arrangement is recorded in /etc/fstab then /etc/rc will have to be modified slightly to do a mkfs(8) on the ram disk before the standard file system checks are done. FILES
/dev/ram block file /dev/MAKEDEV script to create special files /dev/MAKEDEV.local script to localize special files SEE ALSO
hk(4), ra(4), rl(4), rk(4), rp(4), rx(4), si(4), xp(4) dtab(5), autoconfig(8) DIAGNOSTICS
ram: no space. There is not enough memory to allocate the space needed by the ram disk. The ram disk is disabled. Any attempts to access it will return an error. ram: not allocated. No memory was allocated to the ram disk and an attempt was made to open it. Either not enough memory was available at boot time or the kernel variable ram_size was set to zero. BUGS
The ram driver is only available under 2.11BSD. 3rd Berkeley Distribution Januray 27, 1996 RAM(4)

15 More Discussions You Might Find Interesting

1. Solaris

Coredumps and swap - was part of Solaris Mem Consumption

We have Sun OS running on spark : SunOS ciniwnpr67 5.10 Generic_118833-24 sun4u sparc SUNW,Sun-Fire-V440 Having Physical RAM : Sol10box # prtconf | grep Mem Memory size: 8192 Megabytes My Top Output is : 130 processes: 129 sleeping, 1 on cpu CPU states: 98.8% idle, 0.2% user, 1.0%... (39 Replies)
Discussion started by: rajwinder
39 Replies

2. Solaris

Solaris Mem Consumption

We have Sun OS running on spark : SunOS ciniwnpr67 5.10 Generic_118833-24 sun4u sparc SUNW,Sun-Fire-V440 Having Physical RAM : Sol10box # prtconf | grep Mem Memory size: 8192 Megabytes My Top Output is : 130 processes: 129 sleeping, 1 on cpu CPU states: 98.8% idle, 0.2% user, 1.0%... (27 Replies)
Discussion started by: rajwinder
27 Replies

3. HP-UX

Mirrored root and swap HP9000 machine

How do I check if the root and swap are mirrored on my HP9000 machine? Thank you, N. (33 Replies)
Discussion started by: NicoMan
33 Replies

4. Shell Programming and Scripting

Swapping or switching 2 lines using sed

I made a script that can swap info on two lines using a combination of awk and sed, but was hoping to consolidate the script to make it run faster. If found this script, but can't seem to get it to work in a bash shell. I keep getting the error "Too many {'s". Any help here would be appreciated:... (38 Replies)
Discussion started by: LaTortuga
38 Replies

5. UNIX for Dummies Questions & Answers

Size of swap partition during installation

Greetings. I've been into computers since the '80s, but this is my first attempt at Linux. I'm installing Debian Lenny on a PIII 733 with 10GB hard drive and 512MB Ram. I intend to use the machine primarily as a development server, with things like mySQL, Apache, php, etc. I don't really want... (22 Replies)
Discussion started by: fguy
22 Replies

6. Shell Programming and Scripting

Swapping three lines

I have some text: <date>some_date</date> <text>some_text</text> <name>some_name<name> and I want to transform it to smthng like that: some_name on some_date: some_text I've tried sed: sed 's/<text>\(.*\)<\/text> <name>\(.*\)<\/name>/\2 - \1/' but it says unterminated... (13 Replies)
Discussion started by: dsjkvf
13 Replies

7. Solaris

No Space Left - Memory/Swap issue

:wall:I'm having a bit of a problem with Solaris 10u8 and one of our applications requesting memory and being told, "no space left". The break down: 24GB Physical Memory 8GB swap at the time of occurance, here's what a memory breakdown looks like: Page Summary Pages ... (21 Replies)
Discussion started by: aychbee45
21 Replies

8. Shell Programming and Scripting

Search and swap multiple lines in file using Perl

Hi all, I have a vcd file with a bunch of lines containing an array, like this $var wire 1 b a $end $var wire 1 c a $end $var wire 1 d a $end $var wire 1 e a $end $var wire 1 f b $end $var wire 1 g b $end $var wire 1 h b $end $var wire 1 i b $end I want it like this: $var wire 1 e a... (12 Replies)
Discussion started by: veerabahu
12 Replies

9. Solaris

Possible to increase swap size for existing UFS-based drive slice?

I like to increase swap size for my current server running solaris 10. Seems like the system is not using it's full 16G of physical memory. #swap -l swapfile dev swaplo blocks free /dev/dsk/c0t0d0s1 32,1 16 1058288 1058288 # swap -s total: 4125120k bytes... (17 Replies)
Discussion started by: JT-KGY
17 Replies

10. Programming

Swap call by reference confusion

Hello, This is very silly question as millions discussions on call-by-value vs call-by-reference for programming beginners, but I need to confirm my understanding. #include<stdio.h> void swap(int *p, int *q) //Line 3 { int tmp; tmp = *p; *p = *q; *q = tmp; } int... (15 Replies)
Discussion started by: yifangt
15 Replies

11. Solaris

Swap Solaris 5.10

I have a customers that is getting grid alerts that swap is over 95% utilized. When I do swap -l on the machine I get the following results. $ swap -l swapfile dev swaplo blocks free /swap/swapfile - 16 6291440 6291440 /swap/swapfile2 - 16 8191984... (18 Replies)
Discussion started by: Michael.McGraw
18 Replies

12. UNIX for Advanced & Expert Users

Memory fragmentation in a Linux settop box

Being a moderator at openATV, a forum for Linux settup boxes, I have seen reports, and sometimes am experiencing myself, artefacts during video playback or timeshift. As the artefacts are non repetetive (rewinding and watching again does not show artefacts), I can exclude a corrupted video source.... (23 Replies)
Discussion started by: Fischreiher
23 Replies

13. Solaris

Solaris 10 swap device and filesystem

Hi all, Q1) Due to application requirement, i am required to have more swap space. Currently my swap is on a partition with 32GB. I have another partition with 100GB, but it already has a UFS filesystem on it. Can i just swap -d /dev/dsk/current32gb and swap -a /dev/dsk/ufs100gb ? Will... (17 Replies)
Discussion started by: javanoob
17 Replies

14. Solaris

Force unmount of a SWAP filesystem left over from bad Live Upgrade

Hello, Long story short, we built an alternate boot env. back in July and applied the latest CPU to about 15 servers. Of the 15 servers, 7 servers failed to start the zones after the luactivate / reboot. The zones failed to rename from <zone>-<boot_env> back to <zone>. This is fixed in patch... (16 Replies)
Discussion started by: mainegeek
16 Replies

15. Solaris

Monitoring Paging and Swapping

Hi all, This might sound silly but i am trying to determine if i have sufficient memory or not. My definition of sufficient memory = no swapping + no paging to physical swap file. I know i can use vmstat to monitor swapping and paging and using the SR column as well. But wouldn't it be... (28 Replies)
Discussion started by: javanoob
28 Replies

Featured Tech Videos