Copyright (C) 2000-2012 |
Manpages FETCHIPACSection: IPAC (8)Updated: AUGUST 2000 Index Return to Main Contents NAMEfetchipac - read and save kernel ip accounting dataSYNOPSISfetchipacDESCRIPTIONfetchipac is part of the ipac linux ip accounting package.fetchipac reads the kernel ip counters and stores this information for further processing by ipacsum(8). To do this, it first runs through a lock mechanism to prevent multiple instances of fetchipac and / or ipacset(8) to run at the same time. Then, it reads the ipac rule file, /var/run/ip-accounting-rules, so it knows what the names are for the results from the kernel. Next, it reads the kernel ip accounting data from the appropriate file in /proc/net, which is /proc/net/ip_acct if you have an ipfwadm system (kernel 2.0.*) or /proc/net/ip_fwchains if you have an ipchains system (kernel 2.1.* or newer). fetchipac opens this file in read/write mode; this makes the kernel set all counters to zero in the moment the file is opened and we can be sure to count every byte only once. After reading and closing those files, fetchipac creates a new file in the directory /var/log/ip-acct. The file name is derived from the current system time in the format YYYYMMDD-HHMMSS. The data read is then stored in this file. The file format is simple: First, all rule names are listed, one on each line. Then, the magic delimiter "#-#-#-#-#" goes on a line on its own. Then, data lines follow; each rule has its own line, and the data comes in the same sequence as the rule names above it. Each data line has two space separated decimal numbers in the range 0 .. 2^64-1. The first number is the packet count, the second number is the byte count. FILES/etc/ipac.conf
DIAGNOSTICSWarning: ipac chains and/or jumps are corrupted. Trying to fix them
BUGSThe mechanism does not save disk space: Every time fetchipac runs, it created a new (small) file. It would be better to store the data into a database. (Which is in fact a planned project for ipac.)Resetting accounting data counters on ipchains systems resets all counters; there is no way to reset only ipac's counters. Thus, you probably can't use other ip accounting software together which ipac on the same system. VERSIONThis man page belongs to ipac version 1.10. For updates and other information, look at http://www.comlink.apc.org/~moritz/ipac.htmlHISTORYfetchipac is part of ipac since the beginning. Until February 2000, it has been a shell script and was then rewritten in C.AUTHORMoritz Both <moritz@daneben.de>SEE ALSOipacset(8), ipacsum(8), ipfw(4).
IndexThis document was created by man2html, using the manual pages. Time: 15:53:23 GMT, March 29, 2024 |