123 Commits

Author SHA1 Message Date
Thomas Graf
df271c43a4 3.9 release
Signed-off-by: Thomas Graf <tgraf@suug.ch>
2016-07-19 23:16:10 +02:00
Thomas Graf
8f39217bd7 Merge branch 'blastmaster-master' 2016-07-19 22:58:00 +02:00
blastmaster
e47a376f70 fix make distcheck error
* add layout.h in include/Makefile.am
2016-07-19 22:57:53 +02:00
blastmaster
828b5b5368 enabling colors for bmon
This commit enables colors in bmon. It adds configuration options to
let the user decide, which colors should be used. Therefor the graph_rx and graph_tx
layouts are introduced and applied respectively.

* Add graph_rx, graph_tx and layout_cfg fields.
* Setting default colors if colorized output is enabled.
* draw_table accept additional layout parameter and apply the given layout for
  the table graph.
* Apply layouts for rx, tx graph and header and statusbar.
* Add include/layout.h, which provides functions to parse, color and attribute
  strings and set the layout.
* Adding a default layout-config example in examples/bmon.conf.

[Edit: Based on original work by eri!, #PR23]
2016-07-19 22:57:37 +02:00
Thomas Graf
1c25eacc95 Merge pull request #39 from tklauser/gcc-6
format: Add missing braces around 'if' clause
2016-04-28 23:10:39 +02:00
Tobias Klauser
f177718f24 format: Add missing braces around 'if' clause
When compiling bmon with gcc 6.1 it complains with the following
warning:

out_format.c: In function ‘get_token’:
out_format.c:134:10: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
   } else if (!strncasecmp(token+5, "txrate:", 7))
          ^~
out_format.c:136:4: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
    return buf;
    ^~~~~~

Indeed, the 'return buf' should only be executed if it was snprintf()'ed
to. Otherwise "unknown" should be returned. Fix this by adding braces.
Also use the 'type' variable in strncasecmp() as in the other checks.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2016-04-28 16:11:30 +02:00
Thomas Graf
cc22e4e35d Merge pull request #38 from yamadapc/master
Add OSX install instructions
2016-04-20 09:12:35 -07:00
yamadapc
19c35e4990 Add OSX install instructions
I'm not sure if this is universal, but this worked for installing on El
Capitan here.
2016-04-20 10:36:06 -03:00
Thomas Graf
70e6f97b65 Merge pull request #37 from Berzerker/patch-1
Update Readme to include additional dependencies
2016-03-30 11:31:13 +02:00
Berzerker
a6c635dc96 Update Readme to include additional dependencies
pkg-config and dh-autoreconf are required packages for proper configuration
2016-03-29 17:28:24 -04:00
Thomas Graf
f78c0e5b98 Add 'info' option to show additional info screen by default
Suggested-by: @Berzerker
Signed-off-by: Thomas Graf <tgraf@suug.ch>
2016-03-29 12:22:56 +02:00
Thomas Graf
0e08ec1b79 Merge pull request #36 from bsiegert/master
NetBSD fixes (from pkgsrc)
2016-03-28 23:47:33 +02:00
Benny Siegert
74770b8806 Use uintmax_t cast for some printfs.
Some of the BSDs have 32-bit, some 64-bit vars for this.
2016-03-26 21:42:05 +01:00
Benny Siegert
fa6abf3a80 NetBSD does not have send or receive quotas. 2016-03-26 21:40:07 +01:00
Thomas Graf
0103671f1f Check for presence of pkg-config in configure
Signed-off-by: Thomas Graf <tgraf@suug.ch>
2016-01-29 18:15:47 +01:00
Thomas Graf
4efaa8ce9e curses: Add ability to reset statistics
Press 'r' in curses mode to reset a statistic counter to
start counting from 0 again. This does NOT reset the
counter from the source itself but merely emulates a
counter reset. If you restart bmon, the counter will be
back to its total value.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
2016-01-29 12:11:44 +01:00
Thomas Graf
1f79ea4396 Merge pull request #32 from Chocobo1/travis
Fix TravisCI script
2016-01-25 23:40:55 +01:00
Chocobo1
67b6ee3bd6 TravisCI: merge config for coverity scan 2016-01-26 02:29:03 +08:00
Chocobo1
cbcdab6669 TravisCI: fix script, add OSX builds 2016-01-26 01:27:59 +08:00
Thomas Graf
8dcd666db6 travis: Switch to trusty ubuntu distro
Signed-off-by: Thomas Graf <tgraf@suug.ch>
2015-12-16 15:55:20 +01:00
Thomas Graf
a0eea59519 netlink: BUG() if we don't have parent information
This would indicate that we hang a TC object to the tree root.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
2015-12-16 15:40:58 +01:00
Thomas Graf
f9c714fa15 netlink: Use ifindex of parent TC object when searching leaf qdiscs
The qdisc cache is host wide, the parent classid is not unique
so the ifindex of the parent tc object must be set in the filter
otherwise a leaf qdisc with an identical parent id in another
device can be mistaken.

This also converts the class_cache to be passed up through the
stack to make clear it is not system wide but specific to the
ifindex we are currently handling.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
2015-12-16 15:36:03 +01:00
Thomas Graf
892bdac762 bmon: Mark attr_def_free() and __lookup_element() static
Fixes sparse warnings:
attr.c:114:6: warning: symbol 'attr_def_free' was not declared. Should it be static?
element.c:116:16: warning: symbol '__lookup_element' was not declared. Should it be static?

Signed-off-by: Thomas Graf <tgraf@suug.ch>
2015-12-16 14:10:43 +01:00
Thomas Graf
4488cd03f9 bmon: Properly pass NULL pointers instead of 0
Signed-off-by: Thomas Graf <tgraf@suug.ch>
2015-12-16 14:09:35 +01:00
Thomas Graf
753a9e09dd bmon: Remove dead code and make sig_exit() static
Fixes sparse warnings:
bmon.c:36:5: warning: symbol 'do_quit' was not declared. Should it be static?
bmon.c:37:5: warning: symbol 'is_daemon' was not declared. Should it be static?
bmon.c:91:12: warning: symbol 'sig_int' was not declared. Should it be static?
bmon.c:98:6: warning: symbol 'sig_exit' was not declared. Should it be static?

Signed-off-by: Thomas Graf <tgraf@suug.ch>
2015-12-16 14:04:14 +01:00
Thomas Graf
0641291ad5 curses: Pass in proper NULL pointer
Fix sparse warning:
out_curses.c:433:25: warning: Using plain integer as NULL pointer

Signed-off-by: Thomas Graf <tgraf@suug.ch>
2015-12-16 14:01:51 +01:00
Thomas Graf
f666ffd0b7 curses: Make float2str static
Fix sparse message:
out_curses.c:140:6: warning: symbol 'float2str' was not declared. Should it be static?

Signed-off-by: Thomas Graf <tgraf@suug.ch>
2015-12-16 14:00:39 +01:00
Thomas Graf
559e31e62f Merge pull request #30 from tklauser/ip6-link-stats
Add additional IPv6 link stats
2015-11-15 18:09:42 -08:00
Thomas Graf
9a69cb6d59 man: Fix --ouptut typo
Reported-by: xiaohuichan@gmail.com
Signed-off-by: Thomas Graf <tgraf@suug.ch>
2015-08-09 18:05:56 +02:00
Tobias Klauser
665c63d4e7 Add additional IPv6 link stats
Hook up additional IPv6 link statistics counters available since libnl
v3.2.25. Also add compatibility defines, so bmon can still be compiled
against older libnl versions.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-08-06 15:20:07 +02:00
Thomas Graf
964f48465a 3.8 release
Signed-off-by: Thomas Graf <tgraf@suug.ch>
2015-07-25 11:10:41 +02:00
Thomas Graf
e31a860af6 Update copyright
Signed-off-by: Thomas Graf <tgraf@suug.ch>
2015-07-25 11:05:01 +02:00
Thomas Graf
2027a634a7 netlink: Only disable TC stats if QoS is not available in kernel
Up to now, the entire Netlink module was disable if QoS statistics were
not available. Merely disable TC stats themselves but continue using
the input module.

Reported-by: Wen Chiu <Wen.Chiu@brocade.com>
Signed-off-by: Thomas Graf <tgraf@suug.ch>
2015-07-25 10:51:47 +02:00
Thomas Graf
30946f2d78 bmon 3.7 release
Signed-off-by: Thomas Graf <tgraf@suug.ch>
2015-06-30 12:09:54 +02:00
Thomas Graf
47547eb29f man: Also mention --use-bit option
Signed-off-by: Thomas Graf <tgraf@suug.ch>
2015-06-30 12:05:53 +02:00
Thomas Graf
21ec49ed67 format: Don't print error message for unavailable attributes
Signed-off-by: Thomas Graf <tgraf@suug.ch>
2015-06-30 11:59:48 +02:00
Thomas Graf
29172c819c Document -b option
Reported-by: Ross Patterson
Signed-off-by: Thomas Graf <tgraf@suug.ch>
2015-06-30 11:50:40 +02:00
Thomas Graf
2ccea2c56e Merge pull request #25 from Chocobo1/bits
Fix wrong unit displayed when using "--use-bit" option
2015-05-31 18:04:27 +02:00
Chocobo1
51a24c315b Fix wrong unit displayed when using "--use-bit" option 2015-05-31 21:27:52 +08:00
Chocobo1
5cecc86856 Fix inconsistency in format module example 2015-05-31 18:53:35 +08:00
Chocobo1
5e61c5c0e4 man page: add explaination of SI uints 2015-05-31 16:15:51 +08:00
Thomas Graf
4645116a57 Merge pull request #24 from tklauser/cross-compile-fix
[v2] Explicitly include linux/if.h to fix cross-compile error
2015-04-30 09:45:18 -07:00
Tobias Klauser
c80554be16 Explicitly include linux/if.h to fix cross-compile error
When compiling bmon with the Linaro 2014.01 ARM toolchain
(gcc-linaro-arm-linux-gnueabihf-4.8-2014.01_linux) the following compile error occurs:

  in_netlink.c: In function ‘do_link’:
  in_netlink.c:688:53: error: ‘IFF_UP’ undeclared (first use in this function)

Fix it by explicitly including linux/if.h, where IFF_UP is defined.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-04-30 12:00:35 +02:00
Thomas Graf
2a410be36f README: Mention that ./autogen.sh must be run after git clone
Reported-by: DavidRChristensen
Signed-off-by: Thomas Graf <tgraf@suug.ch>
2015-04-29 17:30:22 +02:00
Thomas Graf
c1ae292c95 README: Mention ncurses-devel dependency in installation notes
Reported-by: DavidRChristensen
Signed-off-by: Thomas Graf <tgraf@suug.ch>
2015-04-29 17:28:31 +02:00
Thomas Graf
234efb85f6 Merge pull request #20 from Chocobo1/dev
assertion failed in libConfuse
2015-04-29 08:25:47 -07:00
Chocobo1
229d58c975 using cfg_setint is triggering an assertion in confuse library, should use cfg_setbool instead 2015-01-19 20:02:14 +08:00
Thomas Graf
8fc5a55da4 Merge pull request #19 from halid/master
Debian / Ubuntu Installation Procedures
2015-01-08 16:18:53 +01:00
Halid Altuner
3ecdad6f56 Update README.md
make and build-essential package
2015-01-08 14:14:02 +02:00
Halid Altuner
511e0196e1 Update README.md
debian installation procedures
2015-01-08 14:11:38 +02:00