---
name: "trafstats"
section: "8"
platform: "linux"
package: "trafstats"
version: "0.4.20-1"
release: "Debian 3.0 (Woody)"
platforms: ["linux"]
url: "https://new.carta.tech/trafstats"
---

# trafstats(8)

Gather and store network usage data into a postgresql database

## NAME

trafstats - Gather and store network usage data into a postgresql database

## SYNOPSIS

**trafstats** \[ **OPTIONS** \]

## DESCRIPTION

**trafstats** uses libpcap to constantly sniff and periodically store  into a database accurate traffic usage statistics.

## OPTIONS

- **-i** *interface***, --interface** *interface*

  Specify which *interface* to sniff on.

- **-d** *delay***, --storage-delay** *delay*

  Specify the *delay* in seconds between storing the statistics into the database.

- **-I** *time***, --timer-interval** *time*

  Specify the amount of *time* in seconds before a new timestamp will be generated.

- **-D** *database***, --database** *database*

  Specify the name of the *database* to use.

- **-u** *username***, --user** *username*

  Specify what *username* to access the database as.

- **-M**, **--no-daemon**

  Do not detach; instead keep running in the foreground.

- **-V** *value***, --verbose** *value*

  Specify the amount of verbosity to use. These *values* correspond loosely to the definitions in syslog.h. Anything higher than 7 (equiv to LOG\_DEBUG) will generate incredible amounts of syslog traffic and probably has some privacy issues as well.

- **-C**, **--ip-only**

  Do not store source and destination ports; instead keeping them zeroed. This is useful if your network has a very large number of computers and the database server is not so large. This will decrease the amount of entries stored in the database by an order of 10-50 except in extreme circumstances.

- **-q**, **--quiet**

  Equivalent of --verbose 0; do not send ANY log messages, even critical/terminal ones. Not recommended.

- **-v** increase the verbosity level by one.

  ## AUTHOR

This manual page was written by Rens Houben (shadur@systemec.nl) for the Debian GNU/Linux system (but may be used by others)
