Sponsored Content
Full Discussion: how to get swapping info
Top Forums UNIX for Dummies Questions & Answers how to get swapping info Post 50972 by Optimus_P on Thursday 6th of May 2004 04:22:07 PM
Old 05-06-2004
depends on the os.

in solaris you can use vmstat or the swap command.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Swapping questions

How can you tell how much a Solaris box is swapping? At what point do page in and page out become a problem? Here is a vmstat output. > vmstat procs memory page disk faults cpu r b w swap free re mf pi po fr de sr m0 m1 m2 m3 in sy cs us sy id... (1 Reply)
Discussion started by: 98_1LE
1 Replies

2. Filesystems, Disks and Memory

Paging and Swapping

Hi Guys: Would like to know how to check system swapping and paging and some theory on how they function. I am an oracle dba and my environment is 8171 on AIX 433. We have a 1GB of RAM on the box and I am educating myself to see how much more SGA can be accommodated on the box and what are the... (2 Replies)
Discussion started by: ST2000
2 Replies

3. SuSE

Swapping

Hello! Why does my SuSE GNU/Linux machine swap? I have a Gig of ram, currently 14MBs of free RAM, 724MB - buffers and caches... That is 685MB of cached RAM, then kernel really should'nt have to swap, It should release cached memory in my thinkin... It has only swaped 3MB's but still,... (3 Replies)
Discussion started by: Esaia
3 Replies

4. UNIX for Dummies Questions & Answers

Swapping in VI editor

Hi, I am attempting to replace several similar words with another word in vi. Here is what I have written for the script: 3dTcat -prefix SuperBrik_4WAY_HRF ../JULY10_2007A/results2TENT/stats.JULY10_2007A+tlrc ../JULY10_2007G/results2TENT/stats.JULY10_2007G+tlrc... (1 Reply)
Discussion started by: Jahn
1 Replies

5. Shell Programming and Scripting

Swapping strings in a file

Hi, How to swap two strings in a file ? Ex: "ABC" to be swapped with "XYZ" "ABC" and "XYZ" donot occur in a same line . String has "" Regards Tej (8 Replies)
Discussion started by: tej_89
8 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. UNIX for Advanced & Expert Users

Please advise good source of info about swapping

Hi Everyone, I have some misunderstanding about swapping. Is it true that swap a) required always (I mean I cannot set size 0 bytes) and b) some pages are saved on disk in idle time even free memory is enough ? Could you please advise some good reading about it? (10 Replies)
Discussion started by: sant
10 Replies

8. Shell Programming and Scripting

Swapping fields

Hallo Team, This is the command that i am running : grep ",Call Forward Not Reachable" *2013* this is the output that i am getting (i did a head -10 but the files can be more than 1000) ... (8 Replies)
Discussion started by: kekanap
8 Replies

9. Solaris

Swapping

Hi Guys I am using SPARC-T4 (chipid 0, clock 2998 MHz), SunOS 5.10 Generic_150400-38 sun4v. How do I see if the server was doing some swapping like yesterday? I had a java application error with java.lang.OutOfMemoryError, now I want to check if the server was not doing some swapping at... (4 Replies)
Discussion started by: Phuti
4 Replies

10. Shell Programming and Scripting

Swapping lines

Hi there, I have a text that I'm trying to format into something more readable. However, I'm stuck in the last step. I've searched and tried things over the internet with no avail. OS: Mac After parsing the original text that I won't put here, I managed to get something like this, but this... (8 Replies)
Discussion started by: Kibou
8 Replies
SWAPCTL(2)						      BSD System Calls Manual							SWAPCTL(2)

NAME
swapctl -- modify swap configuration LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <unistd.h> #include <sys/swap.h> int swapctl(int cmd, void *arg, int misc); DESCRIPTION
The swapctl function is used to add and delete swap devices, and modify their configuration. The cmd parameter specifies the operation to be performed. The arg and misc parameters have different meanings, depending on the cmd parame- ter. 1. If cmd is SWAP_NSWAP, the current number of swap devices in the system is returned. The arg and misc parameters are ignored. 2. If cmd is SWAP_STATS, the current statistics for swap devices are returned in the arg parameter. No more than misc swap devices are returned. The arg parameter should point to an array of at least misc struct swapent structures: struct swapent { dev_t se_dev; /* device id */ int se_flags; /* entry flags */ int se_nblks; /* total blocks */ int se_inuse; /* blocks in use */ int se_priority; /* priority */ char se_path[PATH_MAX+1]; /* path to entry */ }; The flags are defined as SWF_INUSE in use: we have swapped here SWF_ENABLE enabled: we can swap here SWF_BUSY busy: I/O happening here SWF_FAKE fake: still being built 3. If cmd is SWAP_ON, the arg parameter is used as a pathname of a file to enable swapping to. The misc parameter is used to set the priority of this swap device. 4. If cmd is SWAP_OFF, the arg parameter is used as the pathname of a file to disable swapping from. The misc parameter is ignored. 5. If cmd is SWAP_CTL, the arg and misc parameters have the same function as for the SWAP_ON case, except that they change the prior- ity of a currently enabled swap device. 6. If cmd is SWAP_DUMPDEV, the arg parameter is used as the pathname of a device to use as the dump device, should the system panic. 7. If cmd is SWAP_GETDUMPDEV, the arg parameter points to a dev_t, which is filled in by the current dump device. When swapping is enabled on a block device, the first portion of the disk is left unused to prevent any disklabel present from being over- written. This space is allocated from the swap device when the SWAP_ON command is used. The priority of a swap device can be used to fill faster swap devices before slower ones. A priority of 0 is the highest, with larger num- bers having lower priority. For a fuller discussion on swap priority, see the SWAP PRIORITY section in swapctl(8). RETURN VALUES
If the cmd parameter is SWAP_NSWAP or SWAP_STATS, swapctl() returns the number of swap devices, if successful. The SWAP_NSWAP command is always successful. Otherwise it returns 0 on success and -1 on failure, setting the global variable errno to indicate the error. ERRORS
swapctl() succeeds unless: [EACCES] Search permission is denied for a component of the path prefix. [EBUSY] The device specified by arg has already been made available for swapping. [EFAULT] arg points outside the process' allocated address space. [EINVAL] The device configured by arg has no associated size, or the cmd was unknown. [EIO] An I/O error occurred while opening the swap device. [ELOOP] Too many symbolic links were encountered in translating the pathname. [ENAMETOOLONG] A component of a pathname exceeded {NAME_MAX} characters, or an entire path name exceeded {PATH_MAX} characters. [ENOENT] The named device does not exist. For the SWAP_CTL command, the named device is not currently enabled for swapping. [ENOTDIR] A component of the path prefix is not a directory. [ENXIO] The major device number of arg is out of range (this indicates no device driver exists for the associated hardware); or the block device specified by arg is not marked as a swap partition in the disklabel. [EPERM] The caller is not the super-user. SEE ALSO
swapctl(8) HISTORY
The swapctl() function call appeared in NetBSD 1.3. The se_path member was added to struct swapent in NetBSD 1.4, when the header file was also moved from <vm/vm_swap.h> to its current location in <sys/swap.h>. AUTHORS
The current swap system was designed and implemented by Matthew Green <mrg@eterna.com.au>, with help from Paul Kranenburg <pk@NetBSD.org> and Leo Weppelman <leo@NetBSD.org>, and insights from Jason R. Thorpe <thorpej@NetBSD.org>. BSD
May 17, 2010 BSD
All times are GMT -4. The time now is 08:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy