NAME pmem - report per-process memory usage SYNOPSIS pmem [-a archive] [-h host] [-n pmnsfile] [-S starttime] [-u username] [-w] [-z] [-Z timezone] DESCRIPTION pmem reports per-process memory usage statistics within the Performance Co-Pilot framework. Both virtual size and pro-rated physical memory usage are reported. Unless directed to another host by the -h option, pmem will contact the PMCD (see pmcd(1)) on the local host to obtain the required information. Alternatively, the -a option may be used to obtain the required information from an archive (see pmlogger(1)). If the -a option is used, then the -S option may be used to specify the temporal position relative to the start of the archive in seconds. The -u option restricts the report to the specified username on the target host or archive. Normally the report is truncated at the 80th column. This is over-ridden with the -w option. By default, pmem reports the time of day according to the local timezone on the system where pmem is run. The -Z option changes the timezone to timezone in the format of the environment variable TZ as described in environ(5). The -z option changes the timezone to the local timezone at the host that is the source of the performance metrics, as identified via either the -h or -a options. Normally pmem operates on the default Performance Metrics Namespace (PMNS), however if the -n option is specified an alternative namespace is loaded from the file pmnsfile. If the PCP product is installed, then the tools psmon(1) and mkpmemarch(1) are available to assist in the creation of PCP archives that can be replayed with pmem(1). REPORT FORMAT In the report, all sizes are reported in Kbytes unless shown with a suffix of M, in which case the size is Mbytes (multiples of 1048576 bytes), or a suffix of G, in which case the size is Gbytes (multiples of 1073741824 bytes). The virtual memory usage statistics represent the total virtual size of each process, irrespective of how many pages are valid (resident). The physical memory statistics indicate real memory usage (only valid pages are counted) and are pro-rated on a per-page basis between all processes which reference each page. The columns in the report should be interpreted as follows: pid Process ID. ppid Parent process ID. username User name of process owner. 1 PMEM(1) PMEM(1) vtxt Total virtual memory used by text (executable code) regions mapped by the process. ptxt Pro-rated physical memory used by text regions. vdat Total virtual memory used by all non-executable regions, excluding shared memory regions. This includes initialized data, bss and stack but not shared memory regions. pdat Pro-rated physical memory used by all data regions (data, bss and stack but not shared memory regions). vshm Total virtual memory used by all shared memory regions. pshm Pro-rated physical memory used by shared memory regions. command The command and arguments, truncated so each line in the report is at most 80 columns (unless the -w option is given). The report heading shows the amount of physical memory configured on the target host and the amount of free memory, as reported by the operating system (see the PCP metric mem.freemem). Only memory used in user space is counted - memory used in kernel tables such as that used for ptes (page table entries), and the proc and user structures are not counted because they are allocated in the kernel's address space. If any shared memory segments are found with no process attachment, the size of these are summed. If the total is more than 4096 bytes, then this is reported as vshm belonging to a virtual process with a command of ``orphaned shmem'' and a pid of ``???''. At the end of the report, a summary is printed indicating the totals for each column and the grand totals. The difference between the total physical memory in use by all processes and the total configured physical memory will always be more than the free memory reported by the operating system because the latter also accounts for memory allocated in the kernels address space. All statistics are accurate to within one 256th of a page. FILES $PCP_VAR_DIR/pmns/* default PMNS specification files PCP ENVIRONMENT Environment variables with the prefix PCP_ are used to parameterize the file and directory names used by PCP. On each installation, the file /etc/pcp.conf contains the local values for these variables. The $PCP_CONF variable may be used to specify an alternative configuration file, as described in pcp.conf(4). SEE ALSO mkpmemarch(1), pmcd(1), pmchart(1), pmdumplog(1), pminfo(1), pmlogger(1), pmval(1) and sproc(2). DIAGNOSTICS All are generated on standard error and are intended to be self- explanatory. Page 3