pmacct(1)

πŸŽ€ pmacct πŸŽ€

okay bestie, welcome to pmacct, the lil frontend glow-up for pmacctd β€” it's from the pmacct manual, section 1, and honestly? she's giving command-line main character energy. let's get into it πŸ’…


✨ NAME ✨

pmacct β€” literally just the frontend to pmacctd. that's the whole vibe. πŸ¦‹


🌸 SYNOPSIS 🌸

pmacct query

πŸ’– DESCRIPTION πŸ’–

so here's the tea: pmacct is a frontend to pmacctd(8) when that daemon is running in volatile memory mode. think of her as the group chat where you ask the daemon questions. 🫢

you pick what kind of query you want with options. and no, you can't just vibe in silence β€” at least one of -C, -c, -e, -s, or -t is mandatory. periodt.

but wait, there's a plot twist: if you're using -c, then you also have to use either -M or -N to actually specify stuff further. no skipping that step, babe. ✨


✨ OPTIONS ✨

πŸ“ showing the data πŸ“

for displaying data, either of these options is used:

  • -s β€” show full statistics. all of it. the whole picture. iconic. πŸ‘‘

πŸ¦‹ -c aggregate πŸ¦‹

specify primitives in a match aggregation, so you can present partial statistics instead of the whole thing. and listen β€” either -M or -N must be used to specify the matching data for this option. iykyk.

here, aggregate is a comma separated string built from these 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 get printed. no match, no entry, sorry babe. πŸ’€

πŸ‘‘ server daemon management πŸ‘‘

management of the server daemon is offered by these three options:

  • -e β€” clear all statistics. for a partial clear, go look at -r instead. 🌸
  • -t β€” show memory table status. like a vibe check for the table. ✨
  • -C β€” show a table of all active classifiers. slay. πŸŽ€

πŸ’… MODIFIERS πŸ’…

the primary options above can be influenced by some secondary options. they're the supporting cast and honestly they ate. 🌈

  • -p file β€” unix socket location for client-server communication. the default is /tmp/collect.pipe. 🫢
  • -a β€” display all table fields, even the ones that are currently unused. nothing left behind. πŸ’–
  • -S β€” calculate a summed total of all counters, instead of returning a counter for each individual match. this one applies to -N. ⭐
  • -n {bytes|packets|flows|all} β€” select which counters to print. this applies only to -N. pick your fighter. πŸ”₯
  • -T {bytes|packets|flows} β€” output statistics ordered by decreasing value of the indicated field. this option applies to -M and to -s. biggest first, always. πŸ‘‘
  • -r β€” reset counters in the present selection after printing their values. applies only to -M and to -N. it's giving "read it and then wipe the slate". πŸ’…
  • -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 you gave there must be observed when you state the data here. the output can be influenced using -T.

here, match_data is a number of substrings separated by semicolon, and each substring is 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, you can specify a location filename of a file. 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, no header, no footer. literally just the numbers, babe. 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. go read it bestie, it's a whole mood. πŸ¦‹

for suggestions, criticism, and bugs, get in contact with Paolo Lucente <paolo@pmacct.net>. he wants to hear from you, fr fr. πŸ’–


⭐ SEE ALSO ⭐

pmacctd(8)


🌸 AUTHOR 🌸

this text was originally compiled by Mats Erik Andersson for the Debian project, but it may be distributed for other uses under the same licensing as the software itself. πŸ’œ


okay that's the whole page, you're officially educated πŸ’… this was version 0.12.1, dated March 2011, from the pmacct(1) manual β€” periodt, no cap, go query something iconic πŸŽ€βœ¨πŸ¦‹