*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->HP-UX 11i man pages -> swapinfo (1m)              


 swapinfo(1M)                                                   swapinfo(1M)

 NAME    [Toc]    [Back]
      swapinfo - system paging space information

 SYNOPSIS    [Toc]    [Back]
      /usr/sbin/swapinfo [-mtadfnrMqw]

 DESCRIPTION    [Toc]    [Back]
      swapinfo prints information about device and file system paging space.
      (Note:  the term `swap' refers to an obsolete implementation of
      virtual memory; HP-UX actually implements virtual memory by way of
      paging rather than swapping.  This command and others retain names
      derived from `swap' for historical reasons.)

      By default, swapinfo prints to standard output a two line header as
      shown here, followed by one line per paging area:

                   Kb      Kb      Kb      PCT     START/  Kb

      The fields are:

      TYPE        One of:

                  dev        Paging space residing on a mass storage device,
                             either taking up the entire device or, if the
                             device contains a file system, taking up the
                             space between the end of the file system and
                             the end of the device.  This space is
                             exclusively reserved for paging, and even if it
                             is not being used for paging, it cannot be used
                             for any other purpose.  Device paging areas
                             typically provide the fastest paging.

                  fs         Dynamic paging space available from a file
                             system.  When this space is needed, the system
                             creates files in the file system and uses them
                             as paging space.  File system paging is
                             typically slower than device paging, but allows
                             the space to be used for other things (user
                             files) when not needed for paging.

                  localfs    File system paging space (see fs above) on a
                             file system residing on a local disk.

                  network    File system paging space (see fs above) on a
                             file system residing on another machine.  This
                             file system would have been mounted on the
                             local machine via NFS.

                  reserve    Paging space on reserve.  This is the amount of
                             paging space that could be needed by processes

 Hewlett-Packard Company            - 1 -   HP-UX 11i Version 2: August 2003

 swapinfo(1M)                                                   swapinfo(1M)

                             that are currently running, but that has not
                             yet been allocated from one of the above paging
                             areas.  See "Paging Allocation" below.

                  memory     Memory paging area (also known as pseudo-swap).
                             This is the amount of system memory that can be
                             used to hold pages in the event that all of the
                             above paging areas are used up.  See "Paging
                             Allocation" below.  This line appears only if
                             memory paging is enabled.

      Kb AVAIL    The total available space from the paging area, in blocks
                  of 1024 bytes (rounded to nearest whole block if
                  necessary), including any paging space already in use.

                  For file system paging areas the value is not necessarily
                  constant.  It is the current space allocated for paging
                  (even if not currently used), plus the free blocks
                  available on the file system to ordinary users, minus
                  RESERVE (but never less than zero).  AVAIL is never more
                  than LIMIT if LIMIT is non-zero.  Since paging space is
                  allocated in large chunks, AVAIL is rounded down to the
                  nearest full allocation chunk.

                  For the memory paging area this value is also not
                  necessarily constant, because it reflects allocation of
                  memory by the kernel as well as by processes that might
                  need to be paged.

      Kb USED     The current number of 1-Kbyte blocks used for paging in
                  the paging area.  For the memory paging area, this count
                  also includes memory used for other purposes and thus
                  unavailable for paging.

      Kb FREE     The amount of space that can be used for future paging.
                  Usually this is the difference between Kb AVAIL and Kb
                  USED.  There could be a difference if some portion of a
                  device paging area is unusable, perhaps because the size
                  of the paging area is not a multiple of the allocation
                  chunk size, or because the tunable parameter swchunk is
                  not set high enough.

      PCT USED    The percentage of capacity in use, based on Kb USED
                  divided by Kb AVAIL; 100% if Kb AVAIL is zero.

      START/LIMIT For device paging areas, START is the block address on the
                  mass storage device of the start of the paging area.  The
                  value is normally 0 for devices dedicated to paging, or
                  the end of the file system for devices containing both a
                  file system and paging space.

 Hewlett-Packard Company            - 2 -   HP-UX 11i Version 2: August 2003

 swapinfo(1M)                                                   swapinfo(1M)

                  For file system paging areas, LIMIT is the maximum number
                  of 1-Kbyte blocks that will be used for paging, the same
                  as the limit value given to swapon.  A file system LIMIT
                  value of none means there is no fixed limit; all space is
                  available except that used for files, less the blocks
                  represented by minfree (see tunefs(1M)) plus RESERVE.

      RESERVE     For device paging areas, this value is always ``-''.  For
                  file system paging areas, this value is the number of 1-
                  Kbyte blocks reserved for file system use by ordinary
                  users, the same as the reserve value given to swapon.

      PRI         The same as the priority value given to swapon.  This
                  value indicates the order in which space is taken from the
                  devices and file systems used for paging.  Space is taken
                  from areas with lower priority values first.  priority can
                  have a value between 0 and 10.  See "Paging Allocation"

      NAME        For device paging areas, the block special file name whose
                  major and minor numbers match the device's ID.  The
                  swapinfo command searches the /dev tree to find device
                  names.  If no matching block special file is found,
                  swapinfo prints the device ID (major and minor values),
                  for example, 28,0x15000.

                  For file system swap areas, NAME is the name of a
                  directory on the file system in which the paging files are

    Paging Allocation    [Toc]    [Back]
      Paging areas are enabled at boot time (for device paging areas
      configured into the kernel) or by the swapon command (see swapon(1M)),
      often invoked by /sbin/init.d/swap_start during system initialization
      based on the contents of /etc/fstab.  When a paging area is enabled,
      some portion of that area is allocated for paging space.  For device
      paging areas, the entire device is allocated, less any leftover
      fraction of an allocation chunk.  (The size of an allocation chunk is
      controlled by the tunable parameter swchunk, and is typically 2 MB.)
      For file system paging areas, the minimum value given to swapon
      (rounded up to the nearest allocation chunk) is allocated.

      When a process is created, or requests additional space, space is
      reserved for it by increasing the space shown on the reserve line
      above.  When paging activity actually occurs, space is used in one of
      the paging areas (the one with the lowest priority number that has
      free space available, already allocated), and that space will be shown
      as used in that area.

      The sum of the space used in all of the paging areas, plus the amount
      of space reserved, can never exceed the total amount allocated in all

 Hewlett-Packard Company            - 3 -   HP-UX 11i Version 2: August 2003

 swapinfo(1M)                                                   swapinfo(1M)

      of the paging areas.  If a request for more memory occurs which would
      cause this to happen, the system tries several options:

      1.   The system tries to increase the total space available by
           allocating more space in file system paging areas.

      2.   If all file system paging areas are completely allocated and the
           request is still not satisfied, the system will try to use memory
           paging as described on the memory line above.  (Memory paging is
           controlled by the tunable parameter swapmem_on, which defaults to
           1 (on).  If this parameter is turned off, the memory line will
           not appear.)

      3.   If memory paging also cannot satisfy the request, because it is
           full or turned off, the request is denied.

      Several implications of this procedure are noteworthy for
      understanding the output of swapinfo:

      +    Paging space will not be allocated in a file system paging area
           (except for the minimum specified when the area is first enabled)
           until all device paging space has been reserved, even if the file
           system paging area has a lower priority value.

      +    When paging space is allocated to a file system paging area, that
           space becomes unavailable for user files, even if there is no
           paging activity to it.

      +    Requests for more paging space will fail when they cannot be
           satisfied by reserving device, file system, or memory paging,
           even if some of the reserved paging space is not yet in use.
           Thus it is possible for requests for more paging space to be
           denied when some, or even all, of the paging areas show zero
           usage - space in those areas is completely reserved.

      +    System available memory is shared between the paging subsystem
           and kernel memory allocators.  Thus, the system may show memory
           paging usage before all available disk paging space is completely
           reserved or fully allocated.

    Logical Volume Manager (LVM)    [Toc]    [Back]
      The swapinfo command displays swap logical volume if the system was
      installed with LVM.  To modify swap logical volume, refer to the LVM
      commands and manpages for lvlnboot and lvrmboot.  For example, to
      remove a swap logical volume, run the following LVM command:

           lvrmboot -s

    Options    [Toc]    [Back]
      swapinfo recognizes the following options:

 Hewlett-Packard Company            - 4 -   HP-UX 11i Version 2: August 2003

 swapinfo(1M)                                                   swapinfo(1M)

           -m   Display the AVAIL, USED, FREE, LIMIT, and RESERVE values in
                Mbytes instead of Kbytes, rounding off to the nearest whole
                Mbyte (multiples of 1024^2).  The output header format
                changes from Kb to Mb accordingly.

           -t   Add a totals line with a TYPE of total.  This line totals
                only the paging information displayed above it, not all
                paging areas; this line might be misleading if a subset of
                -dfrM is specified.

           -a   Show all device paging areas, including those configured
                into the kernel but currently disabled.  (These are normally
                omitted.) The word disabled appears after the NAME, and the
                Kb AVAIL, Kb USED, and Kb FREE values are 0.  The -a option
                is ignored unless the -d option is present or is true by

           -d   Print information about device paging areas only.  This
                modifies the output header appropriately.

           -f   Print information about file system paging areas only.  This
                modifies the output header appropriately.

           -n   Categorize file system paging area information into localfs
                areas and network areas, instead of calling them both fs

           -r   Print information about reserved paging space only.

           -M   Print information about memory paging space only.

                The -d, -f, -n, -r and -M options can be combined.  The
                default is -dfnrM.

           -q   Quiet mode.  Print only a total "Kb AVAIL" value (with the
                -m option, Mb AVAIL); that is, the total paging space
                available on the system (device, file system, reserve, or
                memory paging space only if -d, -f, -r, or -M is specified),
                for possible use by programs that want a quick total.  If -q
                is specified, the -t and -a options are ignored.

           -w   Print a warning about each device paging area that contains
                wasted space; that is, any device paging area whose
                allocated size is less than its total size.  This option is
                effective only if -d is also specified or true by default.

 RETURN VALUE    [Toc]    [Back]
      swapinfo returns 0 if it completes successfully (including if any
      warnings are issued), or 1 if it reports any errors.

 Hewlett-Packard Company            - 5 -   HP-UX 11i Version 2: August 2003

 swapinfo(1M)                                                   swapinfo(1M)

 DIAGNOSTICS    [Toc]    [Back]
      swapinfo prints messages to standard error if it has any problems.

 EXAMPLES    [Toc]    [Back]
      List all file system paging areas with a totals line:

           swapinfo -ft

 WARNINGS    [Toc]    [Back]
      swapinfo needs kernel access for some information.  If the user does
      not have appropriate privileges for kernel access, swapinfo will print
      a warning and assume that the defaults for that information have not
      been changed.

      Users of swapinfo must not rely on the exact field widths and spacing
      of its output, as these will vary depending on the system, the release
      of HP-UX, and the data to be displayed.

      The information in this manual page about paging allocation and other
      implementation details may change without warning; users should not
      rely on the accuracy of this information.

 AUTHOR    [Toc]    [Back]
      swapinfo was developed by HP.

 SEE ALSO    [Toc]    [Back]
      lvlnboot(1M), lvrmboot(1M), swapon(1M), swapon(2), fstab(4).

 Hewlett-Packard Company            - 6 -   HP-UX 11i Version 2: August 2003
[ Back ]
 Similar pages
Name OS Title
swapon HP-UX add swap space for interleaved paging/swapping
dxsysinfo Tru64 Monitors system information such as CPU activity, memory, swap space, and file system usage
getaddressconf Tru64 Get information about the system address space configuration
swapon HP-UX enable device or file system for paging
madvise Tru64 Advise the system of the expected paging behavior of a process
madvise HP-UX advise the system of a process's expected paging behavior
nmadvise Tru64 Advise the system of the expected paging behavior of a process (libnuma)
cap_copy_ext IRIX copy capability from system to user space or from user to system space
acl_copy_ext IRIX copy ACL from system to user space or from user to system space
DtMmdbBookCaseFreeInfo HP-UX frees space used by bookcase information structure
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service