memsize(1M)


memsize -- report memory size

Synopsis

/sbin/memsize [-adgptul -f [N][.n][kmgp]]

/sbin/memsize [-f [N][.n][kmgp]] dumpfile

Description

The memsize command reports memory size in bytes. If multiple options are specified, they are reported in space-separated fields. If dumpfile is given as an operand, memsize reports the dump's size. The -a, -d, -g, -l, -t, and -u options cannot be used on a dump file.

Options

memsize takes the following options:

-a
Report values for all types of memory, with labels.

-f [N][.n][kmgp]
Although all three arguments are optional, you must supply at least one for the -f option to be meaningful. Values are reported in the number of units specified (1 is the default), and N can be any arbitrary integer. You can specify precision by including a decimal point followed by the n number of digits of floating point precision. By default, memory size is reported in bytes, but you can use an optional, case-insensitive scale tag to report

k:
kilobytes

m:
megabytes

g:
gigabytes

p:
pages, given the current page size.

Note that all integer divisions are rounded up. For example, memsize -fg reports ``1'' if your system has <= 1GB, and reports ``2'' if your system has >1GB and <= 2GB. Floating-point divisions (triggered by a .prec) are conventionally rounded, so a command like -f1000.1g returns ``0.0''). The -f option is very flexible but, in practice, there are only a few useful cases. In particular, dumpcheck and dumpsave use memsize -f512 to get 32-bit results that can be used for dd block sizes.


-d
Report dedicated memory.

-g
Report general memory.

-p
Report portion of memory (with page identity) that can be used to cache file data.

-t
Report total memory.

-u
Report usable memory. This is the default.

-l
Print a label following the value.

Usage

To report usable memory size in pages execute:
   # /sbin/memsize -fp
   32669
To report general memory size in megabytes with 2 digits of floating point precision execute:
   # /sbin/memsize -g -f.2m
   121.27

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004