nacctd(8)
π¦ nacctd(8) β network accounting daemon π¦
okay so bestie, meet nacctd π the little daemon that literally watches your network traffic and writes down receipts. No cap, it's giving billing-department main character energy. Let's get into it β¨
π NAME π
nacctd β network accounting daemon
πΈ SYNOPSIS πΈ
nacctd [-dD] [-c filename]
β¨ DESCRIPTION β¨
The network accounting daemon logs network traffic in a format suitable for generating billing information or usage statistics. So like, if you ever wanted to know who owes you money for the bytes, this is her π
nacctd listens on network interfaces and periodically writes information to a log file. Periodically. Like, she's not spammy about it, she's got a schedule π«Ά
And how do you configure her? By editing her configuration file, /etc/nacctd.conf. That's it, that's the whole vibe check π
π OPTIONS π
-dβ this will letnacctdrun in debug mode π-Dβ this will makenacctdnot detach as a daemon, which is suitable for running it frominittabπ-cconfigfile β specify the path of an alternative config file π
π CONFIGURATION FILE OPTIONS π
bestie this is the whole personality section, pay attention π
flush <n>β flush every n seconds. This gives the interval in seconds when the accumulated data is flushed to the output file. Typically set to300(five minutes) β°fdelay <n>β this defines after how many seconds of inactivity a certain record of traffic information may be written out. This helps making the log files smaller since only one output record will be generated for related traffic. Typically set to60seconds. It's the "okay are you DONE talking" timer πfile <f>β specifies the main output file for the daemon to log network traffic to πdumpfile <f>β specifies a file to dump data to that is not yet written to the main output file. This is to prevent data loss should a crash occur π On startup an existing file of this name will be moved to<f>.onotdev <interface>β don't log entries for this interface π«device <interface>β specifies a network interface to put into promiscuous mode π (she's nosy, on purpose)iflimit <interface>β log only packets on this interface. Mutually exclusive withhostlimitβοΈignoremask <netmask>β specifies a netmask (in dotted quad format) for which traffic is ignored. This allows traffic on the local LAN to be excluded πignorenet <network> <netmask>β ignore traffic on this network. Ignoring a net withignorenetis not as efficient asignoremask. Thus you should exclude your local network withignoremaskin preference toignorenetβ‘masqif <ipaddr>β specifies an ip number we are masquerading as. This re-maps ip/port for incoming connections (e.g. FTP-data) to ip/port of the masqueraded destination πdebug <n>β sets the debugging level to n πheaders <interface-type> <data-start> <type-field>β defines where the real data starts for each type of interface.<interface-type>is one ofeth,lo,plip,isdnetc.<data-start>is the offset in bytes to the start of the real data.<type-field>is the offset of the type field in bytes, or a0if there is no type field. If SLIP or PPP devices are specified here, association of dynamic ip addresses with usernames won't work (seedynamicipbelow) β οΈdynamicip <dir>β specifies a directory to get username information from, where users are logged into ppp or slip accounts and assigned dynamic ip addresses. The directory should contain a file for each logged in user, where the filename is their IP address, and the file contains their username. Typically, these files will be created byip-upscripts π§dynamicnet <network> <netmask>β specifies the network the slip/ppp dynamic ips are assigned from πexclude-name-lookup <network> <netmask>β specifies a (sub)net to exclude from dynamic ip name lookup πhostlimit <ipaddr>β log only packets to/from this host. This may be specified multiple times for multiple hosts. This option is mutually exclusive withiflimitβοΈdisable <n>β don't include field n in the output format βοΈdontignore <network> <netmask>β don't ignore hosts on the specified (sub)net that would otherwise have been excluded by anignorenetstatement. This can be a useful to account for proxy traffic by specifying the proxy servers' subnet π«Άline <interface> <device>β specifies fixed mapping of slip/ppp interface names to tty devices. This is used to assign traffic to a user ifnacctdruns on the ppp/slip server and the relation between network interface and serial line is fixed. This option is obsolete π΅
π OUTPUT FILE FORMAT π
The output file consists of lines with up to 10 fields, or less if the configuration file disables one or more fields. (Hey, that's what disable <n> was for π)
timestamp protocol src-addr src-port dst-addr dst-port count size user interface
timestampβ time in seconds past the epoch (standard UNIX time format) π°οΈprotocolβ IP protocolcountβ count of packetssizeβ size of datauserβ associated user in case of a slip/ppp link, this will always be"unknown"for other interfaces π€·
If the type is an ICMP message, field 4 is the ICMP message type and field 6 is the ICMP message code π¨
β οΈ Please note that for forwarded packets there will be one line for EACH interface the packet passed. So if you are running this on your slip-server you will get all the traffic over the slip interfaces TWICE, once for thesl*devices and once for theeth*device. The same goes for ppp and generally for all forwarded traffic. You can specify withnotdeventries which interfaces you don't want to see in the log. fr fr, double the lines, double the chaos π
π FILES π
/etc/nacctd.confβ configuration file/var/log/net-acctβ default location for the main output file/var/log/net-acct-dumpβ default location for the dump of data not yet written to the main file
π«Ά SEE ALSO π«Ά
/usr/share/doc/net-acct/*, tcpdump(8), trafshow(1).
π CAVEATS π
This manual page is incomplete, and possibly inaccurate. Not me telling on myself but okay π
π AUTHORS π
- Ulrich Callmeier
- Richard Clark
<rclark@ethos.co.nz> - This manual page was written by Alex King
<alex@king.net.nz>, for the Debian GNU/Linux system, using material from the original documentation π
okay that's the whole page bestie, you're officially certified in network accounting π β¨ and yeah, this one's dated 16 Dec 2001, from the System Manager's Manual β vintage, iconic, a classic π go forth and log some traffic, mwah π¦
π¦ where this page comes from
- debian bookworm: net-acct 0.71-9.1
- debian trixie: net-acct 0.71-11 Β· GPL-2.0-or-later
- ubuntu jammy: net-acct 0.71-9.1
- ubuntu noble: net-acct 0.71-9.1
- ubuntu questing: net-acct 0.71-11
- ubuntu resolute: net-acct 0.71-11build1 Β· GPL-2.0-or-later
- Copyright 2001 Alex King (alex@king.net.nz)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms