oping(1): Correct the lower bound of the box plot.
oping(1): Document the "-w timeout" option.
Merge branches 'mark' and 'timeout'
src/oping.c: Minor coding style changes.
Implement the "-w <timeout>" command line option.
oping: Add the "-m <mark>" command line option.
This exposes the new "MARK" functionatlity to command line users.
This exposes the new "MARK" functionatlity to command line users.
liboping: Add support for SO_MARK.
Marks packets, which can be used for filtering and routing in Linux.
Marks packets, which can be used for filtering and routing in Linux.
oping(1): Update fping's URL.
Thanks to Vincent Legout for reporting this issue.
Thanks to Vincent Legout for reporting this issue.
Change the project's website to noping.cc/ everywhere.
Also change my preferred email address.
Also change my preferred email address.
Bump version to 1.8.0; Update ChangeLog.
src/oping.c: Fix status output.
This is a really dirty hack: If the percentile and/or median output
decreases, the output may have less characters than previously. Add
spaces at the end of the string to clear digits with may have been
there, to avoid the "maximum" value be appear to go through the roof.
This is a really dirty hack: If the percentile and/or median output
decreases, the output may have less characters than previously. Add
spaces at the end of the string to clear digits with may have been
there, to avoid the "maximum" value be appear to go through the roof.
src/oping.c: Fix pretty ping graph movement.
Fixed the wrap-around case and adds support for windows larger than the
history size.
Fixed the wrap-around case and adds support for windows larger than the
history size.
src/oping.c: Improve comments.
Also remove dead code.
Also remove dead code.
src/oping.c: Change the order of graphs.
src/oping.c: Switch graphs when pressing "g".
src/oping.c: Rewrite of the percentile code.
Rather than bucketizing RTTs and approximating the percentile, keep the
last 900 replies (15 minutes by default) in memory and calculate the
percentile from that.
This allows the "prettyping" graph to "move to the left", which is a much
nicer user experience IMHO.
Rather than bucketizing RTTs and approximating the percentile, keep the
last 900 replies (15 minutes by default) in memory and calculate the
percentile from that.
This allows the "prettyping" graph to "move to the left", which is a much
nicer user experience IMHO.
src/oping.c: Add median and 'n'th percentile, remove average and stddev.
Average and standard deviation are not very useful for network latency.
Median and (95th) percentiles are routinely used to measure network
performance, so provide them instead.
Average and standard deviation are not very useful for network latency.
Median and (95th) percentiles are routinely used to measure network
performance, so provide them instead.
src/oping.c: Exit early if no host could be resolved.
Otherwise "noping" would drop the user into an empty ncurses window,
which is very confusing, annoying and unexpected.
Otherwise "noping" would drop the user into an empty ncurses window,
which is very confusing, annoying and unexpected.
src/oping.c: Define thresholds for coloring green and yellow in a central place.
src/oping.c: Make sure the reported percentile value doesn't exceed the maximum.
noping: Color response times based on their percentile.
Update the histogram's "ratio" array after ever response and use that to
color the response time in the noping application.
Update the histogram's "ratio" array after ever response and use that to
color the response time in the noping application.
oping manual page: Document the "-g histogram" option.
src/oping.c: Add a "-g histrogram" option.
noping: Add the "-g" option.
Initial implementation of a box plot.
Still needs a command line switch and documentation.
Still needs a command line switch and documentation.
oping, noping: Implement percentile reporting.
configure.ac: Change homepage and bug report address.
liboping.pc: Let configure create the pkg-config file.
Bump version to 1.7.0; Update ChangeLog.
Merge pull request #4 from barak/upstream
minor build system tweaks, to generate oping.pc file for pkg-config oping
minor build system tweaks, to generate oping.pc file for pkg-config oping
Merge branch 'bp/exit'
Conflicts:
src/mans/oping.pod
src/oping.c
Conflicts:
src/mans/oping.pod
src/oping.c
Merge branch 'ab/prettyping'
Make the prettyping output work with and without colors.
simplify autogen.sh
generate and install oping.pc file, for pkg-config oping
add bug email and project url to configure.ac AC_INIT
ping_receive_all(): Return immediately when select(2) is interrupted.
Previously the function would continue and only return when all hosts
were received or a timeout occurred. This meant that hitting ^C would
only stop "oping" after half a second or so. This this, oping also exits
immediately.
Previously the function would continue and only return when all hosts
were received or a timeout occurred. This meant that hitting ^C would
only stop "oping" after half a second or so. This this, oping also exits
immediately.
Add support for both, ncurses and ncursesw.
Add documentation for the "-u" and "-U" options.
src/oping.h: Don't use the ncurses internal _nc_unicode_locale() function.
The "-u" and "-U" options are now handled in a single variable so that the
last option "wins".
The "-u" and "-U" options are now handled in a single variable so that the
last option "wins".
add commandline flag for forcing or disabling unicode
note that "forcing" may not work: ncurses still expects your locale to
be correct, so maybe the force flag should also explicitely set a utf8
locale?
note that "forcing" may not work: ncurses still expects your locale to
be correct, so maybe the force flag should also explicitely set a utf8
locale?
move unicode detection to a separate function
this will ease transition to a commandline option override
this will ease transition to a commandline option override
autodetect unicode, and fallback to ACS scancodes on failure
this is fairly ugly - we use a hidden ncurses function to detect
unicode (but at least we don't reimplement it), then we mess around
with the character arrays to display the rights symbols
i am not sure i like this, but i prefer to braindump than to stall, so
let's move forward.
this is fairly ugly - we use a hidden ncurses function to detect
unicode (but at least we don't reimplement it), then we mess around
with the character arrays to display the rights symbols
i am not sure i like this, but i prefer to braindump than to stall, so
let's move forward.
Refactor the graph printing into its own function.
This makes it much easier and cleaner to add a second, non-Unicode
implementation and possibly even a non-color version.
This makes it much easier and cleaner to add a second, non-Unicode
implementation and possibly even a non-color version.
switch to ncursesw in the build chain
Merge remote-tracking branch 'anarcat/autogen'
ignore generated file
better wrapping: add a cursor and respect inner borders
rework scaling algorithm so it covers the whole range
i did this after some stress testing, now it covers the whole range on input
i did this after some stress testing, now it covers the whole range on input
cleanup safety checks
make sure that if we go beyond the max ratio, we just mark it as one
make sure that if we go beyond the max ratio, we just mark it as one
wrap around the window once the histogram grows too big
remove a little quirk i introduced by mistake
this was breaking the border
this was breaking the border
make histogram colors with a nicer background
restore usual ping display, now that histograms are in a different window
put histograms into the independent window, to eventually restore ping times display
add autogen script for clueless people like me
implement some prettyping-inspired display instead of textual
this is a first stab at porting "prettyping.sh" into noping. the idea
is to show a histogram of ping times instead of numerical values. with
some work, we could actually show both, but this focuses on
implementing the hard part (the histogram) properly.
it is very rudimentary for now:
* the math may be wrong for the size of the bar, I was mostly in a
rush to make unicode work and have something pretty quickly.
* all hosts are on the same line: each should have its own line
* the histogram should be displayed in a separate window
* it should use background colors as well
* it should fallback when the terminal is not unicode-capable
* the scaling logic is fully automatic, which necessarily gives weird
results at first
this requires switching to the ncursesw library and other unicode
ncurses hackery described in this post:
http://newsgroups.derkeiler.com/Archive/Rec/rec.games.roguelike.development/2010-09/msg00050.html
pretty ping is a awk/bash script, MIT-licensed, available here:
https://bitbucket.org/denilsonsa/small_scripts/src/tip/prettyping.sh
this is a first stab at porting "prettyping.sh" into noping. the idea
is to show a histogram of ping times instead of numerical values. with
some work, we could actually show both, but this focuses on
implementing the hard part (the histogram) properly.
it is very rudimentary for now:
* the math may be wrong for the size of the bar, I was mostly in a
rush to make unicode work and have something pretty quickly.
* all hosts are on the same line: each should have its own line
* the histogram should be displayed in a separate window
* it should use background colors as well
* it should fallback when the terminal is not unicode-capable
* the scaling logic is fully automatic, which necessarily gives weird
results at first
this requires switching to the ncursesw library and other unicode
ncurses hackery described in this post:
http://newsgroups.derkeiler.com/Archive/Rec/rec.games.roguelike.development/2010-09/msg00050.html
pretty ping is a awk/bash script, MIT-licensed, available here:
https://bitbucket.org/denilsonsa/small_scripts/src/tip/prettyping.sh
Solaris 10 compatibility patch
Solaris 10's version of netinet/ip.h doesn't include a definition for
IPTOS_MINCOST, which results in the following build error:
---
libtool: link: ( cd ".libs" && rm -f "liboping.la" && ln -s
"../liboping.la" "liboping.la" )
gcc -DHAVE_CONFIG_H -I. -D_XPG4_2 -D__EXTENSIONS__ -Wall -Werror -g
-O2 -c oping.c
oping.c: In function `usage_qos_exit':
oping.c:311: error: `IPTOS_MINCOST' undeclared (first use in this function)
oping.c:311: error: (Each undeclared identifier is reported only once
oping.c:311: error: for each function it appears in.)
oping.c: In function `set_opt_send_qos':
oping.c:389: error: `IPTOS_MINCOST' undeclared (first use in this function)
gmake[3]: *** [oping.o] Error 1
---
I've attached a patch to define this value, consistent with how the
Asterisk project resolved this issue:
https://issues.asterisk.org/view.php?id=12050
The patch was developed against liboping 1.6.2; it doesn't appear
there have been any changes in git since this release.
Thanks,
--Scott Severtson
Signed-off-by: Florian Forster <octo@verplant.org>
Solaris 10's version of netinet/ip.h doesn't include a definition for
IPTOS_MINCOST, which results in the following build error:
---
libtool: link: ( cd ".libs" && rm -f "liboping.la" && ln -s
"../liboping.la" "liboping.la" )
gcc -DHAVE_CONFIG_H -I. -D_XPG4_2 -D__EXTENSIONS__ -Wall -Werror -g
-O2 -c oping.c
oping.c: In function `usage_qos_exit':
oping.c:311: error: `IPTOS_MINCOST' undeclared (first use in this function)
oping.c:311: error: (Each undeclared identifier is reported only once
oping.c:311: error: for each function it appears in.)
oping.c: In function `set_opt_send_qos':
oping.c:389: error: `IPTOS_MINCOST' undeclared (first use in this function)
gmake[3]: *** [oping.o] Error 1
---
I've attached a patch to define this value, consistent with how the
Asterisk project resolved this issue:
https://issues.asterisk.org/view.php?id=12050
The patch was developed against liboping 1.6.2; it doesn't appear
there have been any changes in git since this release.
Thanks,
--Scott Severtson
Signed-off-by: Florian Forster <octo@verplant.org>
Bump ABI version; update ChangeLog.
Mac OX S 10.7 compile fixes.
I've attached a patch that's required to be able to compile liboping on
MacOS 10.7 (Lion). The issue is that the IPv6 API's are changing from
RFC 2292 to 3542, and Apple's headers require you to state which API you
want to use by defining a constant. I've changed it to use either based
on the presence of constants, but to prefer 3542 on MacOS.
One problem I see with this is that if you have both multicast and
unicast TTL's set, then this won't report both of them, but I'm not sure
if that's even valid and it would require more significant rework.
Also, I noticed you have fixed the IP_RECVTOS issue in head. That patch
is also required to be able to compile on Solaris and MacOS.
Signed-off-by: Florian Forster <octo@verplant.org>
I've attached a patch that's required to be able to compile liboping on
MacOS 10.7 (Lion). The issue is that the IPv6 API's are changing from
RFC 2292 to 3542, and Apple's headers require you to state which API you
want to use by defining a constant. I've changed it to use either based
on the presence of constants, but to prefer 3542 on MacOS.
One problem I see with this is that if you have both multicast and
unicast TTL's set, then this won't report both of them, but I'm not sure
if that's even valid and it would require more significant rework.
Also, I noticed you have fixed the IP_RECVTOS issue in head. That patch
is also required to be able to compile on Solaris and MacOS.
Signed-off-by: Florian Forster <octo@verplant.org>
oping: Make the exit status the number of hosts failed.
As far as I know, EXIT_FAILURE is only portable when used as-is, i.e. without
adding anything to it. Especially with "EXIT_FAILURE == -1" we might run into
trouble. I think it's more convenient to just use the number of failed hosts
rather than 1+<num> (on Linux).
As far as I know, EXIT_FAILURE is only portable when used as-is, i.e. without
adding anything to it. Especially with "EXIT_FAILURE == -1" we might run into
trouble. I think it's more convenient to just use the number of failed hosts
rather than 1+<num> (on Linux).
fiddle with failure threshold messages and comments
oping: Implement the "-Z" option.
This makes it possible to configure the threshold for exiting with a non-zero
exit status due to missing replies.
This makes it possible to configure the threshold for exiting with a non-zero
exit status due to missing replies.
non-zero process exit status when too many packets are unreturned
The number of unreturned packets in excess of 50% is summed over all
hosts. If this is nonzero, this count plus 1 is the process exit
status.
The number of unreturned packets in excess of 50% is summed over all
hosts. If this is nonzero, this count plus 1 is the process exit
status.
guard use of IP_RECVTOS which is unavailable on kfreebsd
configure.ac: autoconf 2.65 works just fine, too.
README: Add note about capabilities.
Manual pages: Update the copyright information.
Bump version to 1.6.2; Update ChangeLog.
configure.ac: autoconf 2.67 works just fine.
Merge pull request #1 from barak/master
upstream update + tweaks
upstream update + tweaks
git ignore more build debris
Update configure.ac and Makefile.am per autotools
Tweak configure.ac and Makefile.am per autoreconf instructions.
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
libtoolize: `AC_PROG_RANLIB' is rendered obsolete by `LT_INIT'
Accept autoupdate modifications.
Manually integrate portions of autoscan configure.scan.
Tweak configure.ac and Makefile.am per autoreconf instructions.
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
libtoolize: `AC_PROG_RANLIB' is rendered obsolete by `LT_INIT'
Accept autoupdate modifications.
Manually integrate portions of autoscan configure.scan.
src/Makefile.am: Make setcap and chmod fault-tolerant.
This is required because this weird Debian fakeroot utility gives the
impression as if the install was run by root, when in fact it isn't.
What good this should do is beyond me.
This is required because this weird Debian fakeroot utility gives the
impression as if the install was run by root, when in fact it isn't.
What good this should do is beyond me.
src/liboping.c: Fix a compiler warning
… regarding a non-static format string. Thanks to Brian Edwards for
reporting this problem.
… regarding a non-static format string. Thanks to Brian Edwards for
reporting this problem.
Bump version to 1.6.1; Update ChangeLog.
Update and unify copyright headers.
Build system: Automatically set capabilities flag / set-UID bit when installing as root.
noping: Fix compatibility with ncurses 5.8.
Hello,
My name is Gaetan and I maintain liboping in Arch Linux; our distro is
in the process of switching to ncurses-5.8, and I wanted to report that
I had to patch liboping to make noping work with the newer ncurses.
Specifically, if I update ncurses and run the old noping binary, then
nothing is displayed in the ncurses window (although the summary output
displayed on stdout at the end is correct). Same if I recompile noping
against the new ncurses library.
The reason seems to be that calling newwin() with ncols=0 does not
produce a full width window anymore. Anyway, the simple patch attached
fixed this issue for me.
Cheers.
Signed-off-by: Florian Forster <octo@verplant.org>
Hello,
My name is Gaetan and I maintain liboping in Arch Linux; our distro is
in the process of switching to ncurses-5.8, and I wanted to report that
I had to patch liboping to make noping work with the newer ncurses.
Specifically, if I update ncurses and run the old noping binary, then
nothing is displayed in the ncurses window (although the summary output
displayed on stdout at the end is correct). Same if I recompile noping
against the new ncurses library.
The reason seems to be that calling newwin() with ncols=0 does not
produce a full width window anymore. Anyway, the simple patch attached
fixed this issue for me.
Cheers.
Signed-off-by: Florian Forster <octo@verplant.org>
src/oping.c: Fix a compiler warning about uninitialized variables.
Some verions of GGC don't notice that usage_qos_exit() won't return and
complain about the variables "prec" and "class" being used uninitalized.
This commit adds the "noreturn" attribute to that function and
initializes the variables. Thanks to James Bromberger for reporting this
problem.
Some verions of GGC don't notice that usage_qos_exit() won't return and
complain about the variables "prec" and "class" being used uninitalized.
This commit adds the "noreturn" attribute to that function and
initializes the variables. Thanks to James Bromberger for reporting this
problem.
Bump version to 1.6.0; Update ChangeLog.
README: Remove whitespace.
src/liboping.c: Change coding style a bit.
liboping: use SO_TIMESTAMP when available
Current implementation of liboping relies on getting enough CPU shares
and getting those in a timely manner in order to determine correct ping
response times.
Avoid this limitation when kernel is able to provide packet reception
times using SO_TIMESTAMP. (as is done by iputils's ping utility)
Signed-off-by: Florian Forster <octo@verplant.org>
Current implementation of liboping relies on getting enough CPU shares
and getting those in a timely manner in order to determine correct ping
response times.
Avoid this limitation when kernel is able to provide packet reception
times using SO_TIMESTAMP. (as is done by iputils's ping utility)
Signed-off-by: Florian Forster <octo@verplant.org>
README: Document Linux capabilities and UNIX set-UID root solutions.
oping(8): Document the new SetUID behavior in connection with the "-f" option.
Bump version to 1.5.1; Update ChangeLog.
src/oping.c: Mark unused argument to avoid compiler warnings.
src/oping.c: Remove __attribute__ flags when using non-GNU compiler.
src/liboping.c: Always set the QoS member. Default to 0.
This should fix the following warning / error:
liboping.c:599: warning: comparison is always true due to limited
range of data type
Thanks to James Bromberger for reporting this!
This should fix the following warning / error:
liboping.c:599: warning: comparison is always true due to limited
range of data type
Thanks to James Bromberger for reporting this!
oping: Add alias for the "Voice Admit" DSCP.
Bump version to 1.5.0; Update ChangeLog.
ping_iterator_get_info(3): Document the "PING_INFO_RECV_QOS" flag.
src/oping.h: Change the default payload message.
Merge branch 'vm/qos'
oping(8): Document the displayed "qos=" field.
src/oping.c: Only print QoS information if it's not 0/0.
AUTHORS: Add Vladimir Melnikov.
src/oping.c: Add function for formatted printing of the QoS byte.
oping(8): Document the "be" and "cs<n>" DSCP abbreviations.