---
name: "pmacct"
section: "1"
platform: "linux"
package: "pmacct"
version: "1.7.8-2+b2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/pmacct"
---

# pmacct(1)

frontend to pmacctd.

## NAME

pmacct - frontend to pmacctd.

## SYNOPSIS

**pmacct** *query*

## DESCRIPTION

**pmacct** is a frontend to **pmacctd**(8) when used in volatile memory mode.

The type of query is specified using options. At least one of the options **-C**, **-c**, **-e**, **-s**, or **-t** is mandatory, but with **-c** either of **-M** or **-N** must be used for further specification.

## OPTIONS

For displaying data either of these options are used:

- **-s**

  Show full statistics.

- **-c** *aggregate*

  Specify primitives in a match aggregation, in order to present  partial statistics. Either **-M** or **-N** must be used to specify matching data for this option. Here  *aggregate* is a comma separated string constructed from the following identifiers, in arbitrary order:

  src\_mac, dst\_mac, vlan, src\_host, dst\_host, src\_net, dst\_net, src\_mask, dst\_mask, src\_port, dst\_port, tos, proto, src\_as, dst\_as, sum\_mac, sum\_host, sum\_net, sum\_as, sum\_port, in\_iface, out\_iface, tag, tag2, flows, class, std\_comm, ext\_comm, as\_path, peer\_src\_ip, peer\_dst\_ip, peer\_src\_as, peer\_dst\_as, src\_as\_path, src\_std\_comm, src\_med, src\_ext\_comm, src\_local\_pref, is\_symmetric.

  Only entries which match the aggregate are printed.

Management of the server daemon is offered by three options:

- **-e**

  Clear all statistics. For a partial clear, see **-r**.

- **-t**

  Show memory table status.

- **-C**

  Show a table of all active classifiers.

## MODIFIERS

The primary options above can be influenced by some secondary options:

- **-p** *file*

  Unix socket location for client-server communication. Default is */tmp/collect.pipe*.

- **-a**

  Display all table fields, even currently unused fields.

- **-S**

  Calculate a summed total of all counters, instead of returning a counter for each individual match; applies to **-N**.

- **-n** {bytes\|packets\|flows\|all}

  Select which counters to print. This applies only to **-N**.

- **-T** {bytes\|packets\|flows}

  Output statistics ordered by decreasing value of the indicated field. This option applies to **-M** and to **-s**.

- **-r**

  Reset counters in the present selection after printing their values. The option applies only to **-M** and to **-N**.

- **-l**

  Perform a locking on the table.

- **-M** {*match\_data* \| file:*filename*}

  Print a formatted table for all entries matching the given data. An aggregation must be specified using **-c**, and the field order given there must be observed when stating the data here. The output can be influenced using **-T**.

-

  Here *match\_data* is a number of substrings separated by semicolon, each substring being a comma separated list of acceptable values in a match aggregation. A wildcard ´\*´ can be used to match any value in a specific field.

-

  As an alternative, a location *filename* of a file can be specified. This file provides the substrings mentioned above as separate lines. The prefix ´file:´ is a verbatim marker.

- **-N** *{match\_data* \| file:*filename*}

  Print counters only, no text fields, header, or footer. This presupposes **-c**, and can be influenced by **-n** and **-S**.  The arguments are identical to those for **-M**.

## EXAMPLES

The file */usr/share/doc/pmacct/EXAMPLES.gz* contains suggestions prepared by the upstream author.

For suggestions, critisism, and bugs, get in contact with Paolo Lucente \<paolo@pmacct.net\>.

## SEE ALSO

**pmacctd**(8)

## AUTHOR

This text was originally compiled by Mats Erik Andersson for the Debian project, but may be distributed for other uses under the same licensing as the software itself.
