---
name: "psmwatch"
section: "1"
platform: "linux"
package: "ion"
version: "3.2.1+dfsg-1.1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/psmwatch"
---

# psmwatch(1)

PSM memory partition activity monitor

## NAME

psmwatch - PSM memory partition activity monitor

## SYNOPSIS

**psmwatch** *shared\_memory\_key* *memory\_size* *partition\_name* *interval* *count* \[ verbose \]

## DESCRIPTION

For *count* interations, **psmwatch** sleeps *interval* seconds and then invokes the *psm\_print\_trace()* function (see [*psm*(3)](/psm/3.md)) to report on PSM dynamic memory management activity in the PSM-managed shared memory partition identified by *shared\_memory\_key* during that interval.  If the optional **verbose** parameter is specified, the printed PSM activity trace will be verbose as described in [*psm*(3)](/psm/3.md).

To prevent confusion, the specified *memory\_size* and *partition\_name* are compared to those declared when this shared memory partition was initially managed; if they don't match, **psmwatch** immediately terminates.

If *interval* is zero, **psmwatch** merely prints a current usage summary for the indicated shared-memory partition and terminates.

**psmwatch** is helpful for detecting and diagnosing memory leaks.  For debugging the ION protocol stack:

- *shared\_memory\_key*

  Normally "65281", but might be overridden by the value of wmKey in the .ionconfig file used to configure the node under study.

- *memory\_size*

  As given by the value of wmKey in the .ionconfig file used to configure the node under study.  If this value is not stated in the .ionconfig file, the default value is "5000000".

- *partition\_name*

  Always "ionwm".

## EXIT STATUS

- "0"

  **psmwatch** has terminated.

## FILES

No configuration files are needed.

## ENVIRONMENT

No environment variables apply.

## DIAGNOSTICS

The following diagnostics may be issued to the **ion.log** log file:

- Can't attach to psm.

  ION system error.  One possible cause is that ION has not yet been initialized on the local computer; run [*ionadmin*(1)](/ionadmin/1.md) to correct this.

- Can't start trace.

  Insufficient ION working memory to contain trace information.  Reinitialize ION with more memory.

## BUGS

Report bugs to \<ion-bugs@korgano.eecs.ohiou.edu\>

## SEE ALSO

[*psm*(3)](/psm/3.md), [*sdrwatch*(1)](/sdrwatch/1.md)
