NFEXPIRE(1) | General Commands Manual | NFEXPIRE(1) |
nfexpire
— manage
expiration of flow files based on time or volume.
nfexpire |
-l directory |
nfexpire |
-r directory |
nfexpire |
-e directory
[-s maxsize]
[-t maxlife]
[-w watermark]
[-T runtime] |
nfexpire |
-u path
[-s maxsize]
[-t maxlife]
[-w watermark] |
nfexpire
manages the expiration of netflow
data files based on their lifetime and/or the total volume of all flow
files. The flow files are usually created be any nfdump collector (
nfcapd sfcapd or
nfpcapd )
nfexpire
is used to setup the expire
parameters (maintainance mode) or to actually run the expire process (expire
mode) based on these parameters. The expire process can be triggered by
either a cron job, by the collector process itself (nfcapd, sfcapd auto
expire mode), or by running nfexpire
manually.
nfexpire
interacts with the collector,
therefore it is safe to setup and expire files from a directory which is
used by any collector to store flow files.
nfexpire
stores a statistics file
.nfstat in the given directory to maintain the status
and parameters. You should not modify this file manually unless you know
what you do. The directory argument for
nfexpire
corresponds to the -l
argument on the collector comman line.
The options are as follows:
-l
directorynfexpire
runs on this
directory it automatically rescans the flow files
first to update the statistics. If this an active data directory used by
any collector, the statistics are updated automatically.-r
directory-e
directory-u
or they can be overwritten with the
additional options -s
-t
and -w
. Files are deleted from the oldest towards
the latest according both limits and stops at the
watermark below the limit.-u
directory-s
-t
and
-w
and stores them in the statfile as default
values. Any running collector process in auto expire mode will take these
new values starting with the next expire cycle. Running nfexpire the next
time in expire mode will take these new parameters unless they will be
overwritten by the arguments -s
-t
and -w
.-s
maxsize-t
maxlife-w
watermark-T
runtimenfexpire
to end the expire task
after runtime seconds, even if the task is not yet
completed. nfexpire
updates the statistics and
exists cleanly, so it will pick up next time where it left. By default
nfexpire runs until the task is done.-p
nfexpire
in profile mode. Only
legacy NfSen will need this option.-Y
-h
nfexpire
returns 0 on success and 255
otherwise.
June 19, 2024 | Debian |