---
name: "pmdabtrfs"
section: "1"
platform: "linux"
package: "pcp"
version: "7.2.2-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/pmdabtrfs"
---

# pmdabtrfs(1)

btrfs filesystem performance metrics domain agent (PMDA)

## NAME

**pmdabtrfs** - btrfs filesystem performance metrics domain agent (PMDA)

## SYNOPSIS

**$PCP\_PMDAS\_DIR/btrfs/pmdabtrfs** \[**-D** *debug*\] \[**-d** *domain*\] \[**-l** *logfile*\]

## DESCRIPTION

**pmdabtrfs** is a Performance Metrics Domain Agent (PMDA) which extracts performance metrics from the btrfs filesystem via sysfs (**/sys/fs/btrfs**).

The **btrfs** PMDA exports metrics covering filesystem information (label, sizes, generation, checksum algorithm), transaction commit statistics, space allocation for data, metadata and system block groups, per-device error statistics, and async discard statistics.

Metrics are organized into two instance domains: one for btrfs filesystems (keyed by UUID) and one for devices (keyed by UUID::devid). Labels are provided for each instance, including the filesystem UUID, label, and device ID where applicable.

A brief description of the **pmdabtrfs** command line options follows:

- **-d**

  The performance metrics *domain* number must be set to a unique value.

- **-l**

  Location of the log file. By default, a log file named *btrfs.log* is written in the current directory of [**pmcd**(1)](/pmcd/1.md) when **pmdabtrfs** is started, i.e. **$PCP\_LOG\_DIR/pmcd**. If the log file cannot be created or is not writable, output is written to the standard error instead.

## INSTALLATION

The btrfs PMDA requires a Linux system with one or more mounted btrfs filesystems. The PMDA reads statistics from sysfs and does not require root privileges.

Install the PMDA using the Install script:

```
# cd $PCP_PMDAS_DIR/btrfs
# ./Install
```

To remove the PMDA use the Remove script:

```
# cd $PCP_PMDAS_DIR/btrfs
# ./Remove
```

## DEBUGGING OPTIONS

The **-D** or **--debug** option enables the output of additional diagnostics on *stderr* to help triage problems, although the information is sometimes cryptic and primarily intended to provide guidance for developers rather than for end-users. *debug* is a comma separated list of debugging options; use [**pmdbg**(1)](/pmdbg/1.md) with the **-l** option to obtain a list of the available debugging options and their meaning.

Debugging options specific to **pmdabtrfs** are as follows:

| | |
| --- | --- |
| Option | Description |
| appl0 | warn if the btrfs sysfs directory cannot be found |

## ENVIRONMENT

The **BTRFS\_PATH** environment variable can be set to override the default sysfs path (**/sys/fs/btrfs**) for testing purposes.

## SEE ALSO

[**PCPIntro**(1)](/PCPIntro/1.md), [**pmcd**(1)](/pmcd/1.md), [**pcp.conf**(5)](/pcp.conf/5.md) and [**pcp.env**(5)](/pcp.env/5.md).
