---
name: "psrecord"
section: "1"
platform: "linux"
package: "python3-psrecord"
version: "1.4-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/psrecord"
---

# psrecord(1)

A small utility that records the CPU and memory activity of a process. Can also output results to a plot.

## NAME

psrecord - A small utility that records the CPU and memory activity of a process. Can also output results to a plot.

## DESCRIPTION

usage: psrecord \[-h\] \[--log LOG\] \[--log-format LOG\_FORMAT\] \[--plot PLOT\]

-

  \[--duration DURATION\] \[--interval INTERVAL\] \[--include-children\] \[--include-io\] process\_id\_or\_command

Record CPU and memory usage for a process

### positional arguments:

- process\_id\_or\_command

  the process id or command.

### options:

- **-h**, **--help**

  show this help message and exit

- **--log** LOG

  output the statistics to a file. If neither **--log** nor **--plot** are specified, print to print to standard output.

- **--log-format** LOG\_FORMAT

  the format of the log file, can be one of "plain" or "csv"

- **--plot** PLOT

  output the statistics to a plot.

- **--duration** DURATION

  how long to record for (in seconds). If not specified, the recording is continuous until the job exits.

- **--interval** INTERVAL

  how long to wait between each sample (in seconds). By default the process is sampled as often as possible.

- **--include-children**

  include sub-processes in statistics (results in a slower maximum sampling rate).

- **--include-io**

  include include\_io I/O stats
