[hobbit] OSF physical memory, good reference

David Gore David.Gore at mci.com
Sun Aug 7 15:38:00 CEST 2005


Unfortunately we are on Tru64 4.x

me at somehost.com:/some/file/system> swapon -s
Swap partition /dev/rz25b (default swap):
    Allocated space:        64000 pages (500MB)
    In-use space:               1 pages (  0%)
    Free space:             63999 pages ( 99%)

Swap partition /dev/rz18b:
    Allocated space:       256000 pages (2000MB)
    In-use space:               1 pages (  0%)
    Free space:            255999 pages ( 99%)

Swap partition /dev/rz10b:
    Allocated space:        64000 pages (500MB)
    In-use space:               1 pages (  0%)
    Free space:             63999 pages ( 99%)


Total swap allocation:
    Allocated space:       384000 pages (3000MB)
    Reserved space:         28050 pages (  7%)
    In-use space:               3 pages (  0%)
    Available space:       355950 pages ( 92%)

me at somehost.com:/some/file/system> uname -a
OSF1 rsoimpm1.mcilink.com V4.0 1229 alpha

It does appear that most of our hosts do not have the 'Reserved space' 
line, but otherwise it is similar to Anton's output.  I have included 
the man page in case you were interested.

David

-------------- next part --------------
swapon(8)                                                           swapon(8)

NAME

  swapon - Specifies additional file for paging and swapping

SYNOPSIS

  /sbin/swapon [-asv] [-p priority] [-l lowsize] [-h highsize] filename

DESCRIPTION

  The swapon command is used to specify additional paging files. A paging
  file can be a block special device.  (Digital UNIX does not currently sup-
  port paging and swapping to a regular file.  All swapping and paging areas
  must be block special devices.) The swapon command uses a priority default
  of 4 for block special devices.  Calls to swapon normally occur in the sys-
  tem multiuser state initialization.

  When you make more swap space available with the swapon command, the addi-
  tional swap space is available until the system is rebooted.  To make addi-
  tional swap space permanent, you must specify the swap file entry in the
  /etc/fstab file.

  The swapon command flags can override the partition specifications in the
  /etc/fstab file.

  (Because Digital UNIX does not currently support paging and swapping to a
  regular file, the -p option is not supported.) The -p flag specifies the
  priority of the paging file.  When the kernel looks for a paging file, it
  pages to the highest priority file that is available.  If the file is una-
  vailable, it tries a file of the next highest priority, and so on until it
  finds a file onto which it can page. (A file becomes unavailable when it
  has no more space.) Priorities are 0, 1, 2, 3, 4, with 0 being lowest
  priority, and 4 being highest priority. Multiple paging files can have the
  same priority. For example, there can be two files installed at priority 4.
  Files of the same priority are paged out to in a round-robin fashion to
  balance their usage.

  (Because Digital UNIX does not currently support paging and swapping to a
  regular file, the -l and -h options are not supported.)  The -l option is
  used to specify the low water mark.  Normally, the -a option is used, caus-
  ing all files marked as sw (swap files) in the /etc/fstab file to be made
  available.  The -h option is used to specify the high water mark.  The
  operating system will not expand the paging file to be larger than the high
  water mark.  If the paging file grows larger than the low water mark, and
  then shrinks below the low water mark, the operating system will not make
  the file smaller than the low water mark. If the low water mark is set to
  0, then the paging file will not shrink after paging space is freed.  The
  default value for the low water mark is 20Mbytes; the default value for the
  high water mark is unlimited.

  You can use Logical Storage Manager (LSM) volumes for additional swap
  space.  For high system availability, you can mirror the LSM volumes.  The
  Logical Storage Manager manual describes how to use the swapon command to
  configure an LSM mirrored volume as additional swap space.

  There are two strategies for swap space allocation: immediate mode and
  deferred or over-commitment mode.  The two strategies differ in the point
  in time at which swap space is allocated.  If immediate mode is used, swap
  space is allocated when modifiable virtual address space is created.  If
  deferred mode is used, swap space is not allocated until the system needs
  to write a modified virtual page to swap space.  Immediate mode is the
  default swap space allocation strategy.

  Immediate mode is more conservative than deferred mode because each modifi-
  able virtual page is assigned a page of swap space when it is created.  If
  you use the immediate mode of swap space allocation, you must allocate a
  swap space that is at least as large as the total amount of modifiable vir-
  tual address space that will be created on your system.  Immediate mode
  requires significantly more swap space than deferred mode because it
  guarantees that there will be enough swap space if every modifiable virtual
  page is modified.

  If you use the deferred mode of swap space allocation, you must estimate
  the total amount of virtual address space that will be both created and
  modified, and compare that total amount with the size of your system's phy-
  sical memory.  If this total amount is greater than the size of physical
  memory, the swap space must be large enough to hold the modified virtual
  pages that do not fit into your physical memory.  If your system's workload
  is complex and you are unable to estimate the appropriate amount of swap
  space by using this mode, you should first use the default amount of swap
  space and adjust the swap space as needed.

  To determine which swap space allocation mode is being used, check for the
  existence of a soft link named /sbin/swapdefault, which points to the pri-
  mary swap partition.  If the /sbin/swapdefault file exists, the system uses
  the immediate mode for swap space allocation.  To enable the deferred mode,
  rename or delete this soft link.

  If the /sbin/swapdefault file does not exist and you want to use the
  immediate mode of swap space allocation, become superuser and create the
  file by using the following command syntax:

  ln -s /dev/rzxy /sbin/swapdefault

  The x variable specifies the device number for the device that holds the
  primary swap partition, and the y variable specifies the swap partition.
  Usually, the swap device number is the same as the boot device number, and
  the primary swap partition is partition b.

  You must reboot the system for the new mode to take effect.

FLAGS

  -a        Installs all paging files specified in the /etc/fstab file.

  -h highsize
            The high water mark.  Currently not supported.

  -l lowsize
            The low water mark.  Currently not supported.

  -p priority
            The priority of the specified paging file.  Currently not sup-
            ported.

  -s        Displays swap space utilization.  For each swap partition, this
            flag displays the total amount of allocated swap space, the
            amount of swap space that is being used, and the amount of free
            swap space.

  -v        Generates verbose output.

NOTES

  There is no way to stop paging and swapping on a file.  It is therefore not
  possible to use swap files that can be dismounted during system operation.

  The new -p flag replaces earlier versions of the -p flag, which caused the
  swapon command to designate the paging file as a preferred paging file.

EXAMPLES

  The following example shows a swap file entry in an /etc/fstab file:

       /dev/rz0b   swap2   ufs   sw   0   0

  The following command adds the /dev/rz0b block device file as swap space:

       swapon /dev/rz0b

ERRORS

  You may receive the following messages when using the swapon command:

    +  special-device or an overlapping partition is open.
       Quitting...

       This message indicates that you tried to add a partition as a swap
       device that is actively in use by UFS, AdvFS, swap, or LSM.

    +  special-device is marked in use for fstype in the disklabel.
       If you continue with the operation you can possibly destroy existing
       data.
       CONTINUE? [y/n]

       This message indicates that you tried to use a partition as a swap
       device that is not currently in active use but is marked for use in
       the disk label's partition map.  For example, the partition may be
       part of an LSM volume or an AdvFS domain.

       If you know that the partition you specified to swapon does not con-
       tain any data, you can choose to override the warning.  In this case,
       the fstype in the disk label will be modified to swap.

       Note that you can use the disklabel -s command to set the fstype in
       the disk label to unused for partitions that do not contain any valid
       data.  See disklabel(8) for more information.

    +  Partition(s) which overlap special-device are marked in use.
       If you continue with the operation you can possibly destroy existing
       data.
       CONTINUE? [y/n]

       This message indicates that the partition you specified is not marked
       for use, but other, overlapping partitions on the disk are marked for
       use.  If you override this warning, the fstype in the disk's label
       will be modified.  The partition you specified to swapon will be
       marked as in use as a swap device and all overlapping partition will
       be marked UNUSED.

  The following examples illustrate these messages:

   1.  Adding a partition that is marked for use as a swap device:
            # /usr/sbin/swapon /dev/rz11g

            /dev/rz11g disk is marked in use for LSMpubl in the disklabel.
            If you continue with the operation you can possibly destroy
            existing data.
            CONTINUE? [y/n]
       Partition g of disk rz11 is part of a disk marked for use by LSM.  If
       LSM is not actively using this partition and the partition does not
       contain any data, you may want to override this warning, by answering
       y.  In this case, partition g will be marked as swap in the disk
       label.

   2.  Adding a partition as a swap device whose overlapping partitions are
       marked for use:
            # /usr/sbin/swapon /dev/rz11c

            Partition(s) which overlap /dev/rz11c are marked in use.
            If you continue with the operation you can possibly destroy
            existing data.
            CONTINUE? [y/n]
       If you answer yes, partition c on disk rz11 will be marked swap in the
       disk label and all partitions that overlap c will be marked UNUSED.

   3.  Adding a partition which is currently in use as a swap device:
            # /usr/sbin/swapon /dev/rz11g

            /dev/rz11g or an overlapping partition is open.
            Quitting...

   4.  Adding a partition which does not have a disk label as a swap device:
            # /usr/sbin/swapon /dev/rz11c

            The disklabel for /dev/rz11c does not exist or is corrupted.
            Quitting...
       See disklabel(8) for information on installing a disk label on a disk.

FILES

  /sbin/swapon
            Specifies the command path

  /etc/fstab
            Specifies information about file systems and swap files.

  /sbin/swapdefault
            Specifies the primary swap partition and indicates that the
            immediate mode of swap space allocation is being used.

RELATED INFORMATION

  Functions:  swapon(2)

  System Administration

-------------- next part --------------
vmstat(1)                                                           vmstat(1)

NAME

  vmstat - Displays virtual memory statistics

SYNOPSIS

  vmstat interval [count]

  vmstat [-f|-M|-P|-s]

  The vmstat command displays system statistics for virtual memory,
  processes, trap, and CPU activity.

OPTIONS

  -f  Displays only statistics about the number of forks since system startup
      (see the fork() call).

  -M  Displays information about memory usage by buckets.  This information
      can be used for kernel debugging.

  -P  Displays the following accumulated statistics about physical memory
      use:

      Total Physical Memory
          Number of megabytes of installed memory, and the equivalent page
          value.

      Physical Memory Clusters
          How physical memory is clustered.  The starting and ending page
          frames (pfn) and where the memory is utilized (pal, os, and
          *nvram).

      Physical Memory Use
          A breakdown of memory usage by os, the starting and ending page
          frames, type of usage such as unixtable, or bss and the total phy-
          sical memory in use.

      Managed Pages Break Down
          A snapshot of where managed physical memory resided when the vmstat
          command executed.  The display shows the number of pages in the
          free queue, active and inactive pages, wired pages and unified
          buffer cache (ubc) pages.

      WIRED Pages Break Down
          A further breakdown of physical pages that are wired in memory.
          The display typically shows:

            +
            vm and ubc wired pages

            +
            meta data, malloc, and contig pages

            +
            user, kernel, and free ptepages.

  -s  Displays the following accumulated statistics along with the page size:

      active pages
          Total number of pages that are currently in use but can be used for
          paging.

      inactive pages
          Total number of VM pages that are allocated but are most likely to
          be used for paging.

      free pages
          Total number of unreferenced (clean) pages that are available for
          use.

      wire pages
          Total number of pages that are currently in use and cannot be used
          for paging (not a real list).

      virtual memory page faults
          Number of address translation faults that have occurred.

      copy-on-write page faults
          Number of copy-on-write page faults, which occur if the requested
          page is shared by a parent process and one or more child processes
          (using the fork function) and if one of the processes needs to
          modify the page.  In this case, VM loads a new address into the
          translation buffer and copies the contents of the requested page
          into the new address for modification by the process.

      zero file page faults
          Number of zero-filled-on-demand page faults, which occur if VM can-
          not find the page in the internal data structures and if the
          requested page is new and has never been referenced.  In this case,
          VM initializes a physical page (the contents of the page are zeroed
          out) and loads the address into the page table.

      reattaches from reclaim list
          Number of pages that have been faulted while on the inactive list.

      pages paged in
          Number of requests for pages from a pager.

      pages paged out
          Number of pages that have been paged out.

      task and thread context switches
          Number of task and thread context switches per second.

      device interrupts
          Number of nonclock device interrupts per second.

      system calls
          Number of system calls called per second.

DESCRIPTION

  If you specify interval, vmstat displays the statistics listed below every
  interval seconds.  The first report is for all time since a reboot, and
  each subsequent report is for the last interval only.  If you specify count
  after interval, count specifies the number of reports.  For example, vmstat
  1 10 produces 10 reports at 1-second intervals.  You cannot specify count
  without interval, since the first numeric argument to vmstat is always
  assumed to be interval.

  At any time, system memory can be in use by the kernel in kseg, wired
  (pages that are currently in use and cannot be used for paging), on the
  active list (pages that are currently in use but can be used for paging),
  on the inactive list (pages that are allocated but are most likely to be
  used for paging), on the free list (pages that are clean and available for
  use), or used by the Unified Buffer Cache (UBC).  The vmstat command does
  not report on the memory in kseg and memory used by the UBC.

  The following values are displayed:

  Process information:

  r   Number of threads that are running or are runnable.

  w   Number of threads waiting interruptibly.

  u   Number of threads waiting uninterruptibly.

  Virtual memory information:

  act Total number of pages on the active list, the inactive list (pages that
      are allocated but are most likely to be used for paging), and the Uni-
      fied Buffer Cache (UBC) least recently used (LRU) list.

  free
      Total number of pages that are clean and available for use.

  wire
      Total number of pages that are currently in use and cannot be used for
      paging (not a real list).

  fault
      Number of address translation faults that have occurred.

  cow Number of copy-on-write page faults, which occur if the requested page
      is shared by a parent process and one or more child processes (using
      the fork function) and if one of the processes needs to modify the
      page.  In this case, VM loads a new address into the translation buffer
      and copies the contents of the requested page into the new address for
      modification by the process.

  zero
      Number of zero-filled-on-demand page faults, which occur if VM cannot
      find the page in the internal data structures and if the requested page
      is new and has never been referenced.  In this case, VM initializes a
      physical page (the contents of the page are zeroed out) and loads the
      address into the page table.

  react
      Number of pages that have been faulted while on the inactive list.

  pin Number of requests for pages from a pager.

  pout
      Number of pages that have been paged out.

  Interrupt information:

  in  Number of nonclock device interrupts per second.

  sy  Number of system calls called per second.

  cs  Number of task and thread context switches per second.

  CPU information:

  us  Percentage of user time for normal and priority processes.

  sy  Percentage of system time.

  id  Percentage of idle time.

  Specify -f to display fork statistics only.  Specify -s for a single
  display of accumulated statistics, as well as page size.

SEE ALSO

  Commands:  iostat(1)
-------------- next part --------------

iostat(1)                                                           iostat(1)

NAME

  iostat - Reports I/O statistics

SYNOPSIS

  iostat [drive...] [interval] [count]

DESCRIPTION

  The iostat command reports the following information:

    +  For terminals (collectively), the number of characters read and writ-
       ten per second.

    +  For each disk, the number of transfers per second, bytes transferred
       per second (in kilobytes), and the milliseconds per average seek. Not
       all disk drives report seek times.

    +  For the system, the percentage of time the system has spent in user
       mode, in user mode running low priority (nice) processes, in system
       mode, and idling.

  To compute this information, iostat counts the number of seeks and data
  transfer completions, the number of words transferred for each disk, and
  the collective number of input and output characters for terminals.  Also,
  each sixtieth of a second, iostat examines the state of each disk and makes
  a tally if the disk is active.  From these numbers and given the transfer
  rates of the devices, it is possible to determine the average seek times
  for each device.

OPERANDS

  drive...
      Forces iostat to display specific drives.  If drive is not specified,
      iostat displays the first four drives (even if more than four disk
      drives are configured in the system).

  interval
      Causes iostat to report once each interval seconds.  The first report
      is for all time since a reboot, and each subsequent report is for the
      last interval only.

  count
      Specifies the number of reports.  For example, iostat 1 10 would pro-
      duce 10 reports at 1-second intervals.  You cannot specify count
      without interval because the first numeric argument to iostat is
      assumed to be interval.

      If a disk drive is attached and configured but has never been accessed,
      iostat displays the disk name as dkn, where n is the drive number of
      the console name for the drive. For example, if dka500 is the console
      name of the never accessed disk, the name iostat uses is dk500.

EXAMPLES

  The output from this example displays cpu, terminal, and disk statistics
  for the first four disks on the system providing 5 reports in 1 second
  intervals.

       # iostat 1 5
             tty     rz1      rz2      rz3      rz4     cpu
        tin tout bps tps  bps tps  bps tps  bps tps  us ni sy id
          1   52   2   0    1   0   13   1    4   1   8  0  9 83
          1   16   7   1    2   0    5   2    2   0   3  0 10 87
          0    0   0   0    0   0    0   0    0   0   0  0  1 98
          2    2   2   1    0   0   50   6    0   0   9  0  9 82
          1  191   2   1    0   0   47   6    0   0   8  0  9 83

  Note that this example does not show the average seek times (msps) for the
  disk drives.  Not all disk drives report seek time.

SEE ALSO

  Commands:  vmstat(1)


More information about the Xymon mailing list