Age | Commit message (Collapse) | Author | Files | Lines |
|
It is possible to use a interval even of 0, although it would not
really make sense. It's not a bug either, so throw a warning to the
user in that case on 1Gbit/s.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
ifpps always reported the same values for median as for average in the
CPU load fields (usr, sys, idle, iowait). This is of course incorrect.
The bug was due to 3 sub-problems:
- Summing up long double values (m_cpu_*) in an uint64_t (all)
- Not using %Lf (for long double) in mvwprintw()
- Explicitely use floating point division in MEDIAN_EVEN
Fix the bug by summing up in a separate accumulator of type long double,
use the correct format string for long double and divide by 2.0 in
MEDIAN_EVEN to force the result to be (long) double.
Reported-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Instead of (more or less) arbitrarily listing the command line options,
sort them according to the following rule:
- options with required argument, alphabetically by short option
- options without argument, alphabetically by short option
- common options -v/--version and -h/--help
Do this in the short options string, the long options struct, the
in-program usage and the man page.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Add whitespace padding in one occurence of 'med:' output.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Ignore the config.log file in Git as this is automatically generated.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
This was missing in commit 971b1d95 ("ifpps: Optionally display median
values for CPU load and interrupts"). Update the usage to reflect the
changes too.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Using the -m/--median command line option, median values across all CPUs
are displayed for CPU load, interrupts per interval, sw interrupts per
interval and absolute number of interrupts.
Also update the manpage accordingly.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
We have to pass NEED_TCPDUMP_LIKE_FILTER define through gcc as it
otherwise is not possible to let the pcap compiler invoke through
netsniff-ng, but not through astraceroute.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Not sure how this came in with the last commit, but fix it to the
correct format.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
On errors in the configuration, redirect everything to config.log,
and not some parts to config.log and some others to $TMPDIR/config.log.
This will give a nice summary of what goes wrong to the user. Also,
in case everything looks fine, the config.log file will be created,
but with size 0 and no warning is thrown. So looks good.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
It looks like there are some incompatibilities in bash's expr match
among different versions. Using set -x, gives us on bash 4.2.45:
+ TOOLS=' netsniff-ng trafgen ifpps bpfc'
+ for tool in '$_tools'
+ case "$tool" in
++ expr match '"curvetun' 'astraceroute"' '$1'
expr: syntax error
+ m=
+ '[' '' == 0 ']'
So rather avoid using "expr match" and switch to "case" for substring
matching, which should be more portable.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
tools_remove "libnetfilter-conntrack" makes no sense, so replace it
with the actual correct tools_remove "flowtop".
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
If pkg-config doesn't find a library it prints an error to stderr.
Instead of directly printing them as part of the configure output,
redirect them to config.log and let the user know about it in case there
are any messages.
Suggested-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
When running ifpps on systems with 16, 32 or more CPUs, 'avg:...'
field is not being padded with witespaces as the rest of the CPU
lines. This patch does that.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Collecting device statistics on high speed every second can be very
costly, so warn about this in ncurses mode.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
In Fedora or RHEL/CentOS releases the machine type is already part
of the package name, so show it only, if it does not appear there.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Lets make the headline output a bit more useful and show the current
kernel version and well as the machine/hardware type.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
In case some in the near future NICs with 40Gbit/s will appear. Allow
ifpps to get the correct ethtool speed.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
If will now look like the following:
cpu6 +: 237357 irqs
cpu2 |: 117538 irqs
cpu0 |: 8419 irqs
cpu7 |: 4523 irqs
cpu5 |: 4312 irqs
cpu1 -: 1432 irqs
avg: 47606.8
This makes it a bit more precise/intuitive that we sort from max
to min.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
In order to get a better overview, lets align the avg numbers to the
other shown decimals. However, for this we would need to remove the
avg units as we deal with floats here. But we know the units from the
above numbers anyway. I think this makes it more clear to follow.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Just a whitespace fix to align the strings to the fmt string.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
As this is useful for a couple of people, emphasize this in ifpps'
manpage as well.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
To be more consistent with config.h, rename __WITH_PROTOS into
HAVE_DISSECTOR_PROTOS.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
To get the normal Makefile a bit cleaner, push the tool specific
build options into <tool>/Makefile.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
As curvetun needs to undergo some major cleanups, we exclude it from
the main build process for the moment until we have fixed all of it
in a non-rc release.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
In netsniff-ng, we only use libz in combination with libgeoip, so if
we lack either one of them, do not link against the other either.
This would be a waste otherwise.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
"-U" has been forgotten to add into shortopts. "--update" works as
expeceted however. So simply add "U".
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Geoip dependency should not be mandatory as it's not a core part of
netsniff-ng. This also facilitates compilation on platforms where
geoip is not available.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
ifpps supports a gnuplot-like output. Therefore, recommend the use
of gnuplot. It is not mandatory though.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Brind the doc more up to date since we do have DISTRO=1 et al
available from the build system. Thus, no manual hand-tweaking
needs to be done, only in rare cases if really necessary.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
This brings in a fresh version of the oui file via oui-update.py.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
In some part of the help text, we speak about <toolnames> in some
other <toolname>. Lets consolidate this to <tool> to avoid any
possible confusion.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Since it's out of the normal build process for now, describe how to
build it for advanced users.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Make this more clear by proper indent and slightly improved description.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
We are two, so its maintainers instead of maintainer.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Tobias Klauser, one of the two netsniff-ng maintainers, did a lot
of excellent work since he joined our team. He has now reached a
commit count that is currently equal to Markus' count, but since
Tobias is more active, move him one position higher. Thanks for the
good work Tobias!
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Consolidate the two mgmt include files into one.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Use the common crypto header file as this is intended for that.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Rename those files so that they are conform to the rest of the files
we have in our repository.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
stats_avg will be reset to 0 on the first call to stats_top() before
displaying any results, thus this memset() is not necessary.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Remove trailing whitespace where they're not necessary for the
background to extend beyond the text. Replace whitespaces needed for
tabbing by setting the appropriate format string field width modifiers.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Since we now also display the average (and in the future possibly also
the standard deviation), reduce the default number of CPUs displayed to
5, to keep terminal space usage low.
Suggested-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Calculate the average for CPU usage, IRQs/t and absolute IRQs across all
CPUs (also the ones which are not displayed) and show them below the
respective per-CPU values.
Mention this fact the man page accordingly.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Commit f5c10ae4e3 ("dissector: do not panic on unknown hatype") let
netsniff-ng not panic anymore on unkown ha types, but without explicitly
starting netsniff-ng in hex or ascii printing mode, no dissection
will happen.
This patch fixes this situation so that at least ascii_hex() will be
called in case the link type is not known to us.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
The sponsors have been moved to AUTHORS from Sponsors in commit 9d310488
("docs: move sponsor names into authors "), thus adjust the pointer to
them in README accordingly.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
flex and bison are needed for bpfc and trafgen, so check for their
existance. If they are not present, lets remove those two from the
build in case users do not want it.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
This patch is a bundle of multiple fixes.
1) Fix compilation of astraceroute when HAVE_LIBPCAP=1:
astraceroute doesn't need libpcap, so add an additional
guard/define to bpf.h and bpf_comp.c and netsniff-ng.c.
Also since we generate a config.h file, we do not need
to have this additional compile flag anymore.
2) Fix tstamping.{h,c} to use the configure script instead
of the Makefile. For doing this, also fix the object
inclusion in netsniff-ng/Makefile.
Last but not least, rename __WITH_... into HAVE_... as this
is more clean.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
In order to be able to better track regressions or to give support,
let us track the Git id as well in version information. This makes
the ``--version'' switch actually useful.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
While we're at it, also let configure script generate the config.h
file. The generation of it is currently quite static, but that could
change in future. While at it, we also generate a GITVERSION define,
that we will use for ``--version'' output of the individual tools for
being able to provide better support since we can see what concrete
commit people are using when building from Git repo.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|