summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Graf <tgraf@suug.ch>2016-10-07 21:27:49 +0200
committerGitHub <noreply@github.com>2016-10-07 21:27:49 +0200
commit29fb4317d73e62229f343f1eb2369e0ddd2266ea (patch)
tree363d0a416c07e69ff644532231870866db367586
parent5cd24ffd6a952d6fa7bf2281c343b218dc95a071 (diff)
parent32d8c76b18cb829a8e8178f7508cede2a95c9c80 (diff)
Merge pull request #48 from DoctorSher/master
Added example to man page, switched format strings to single quotes.
-rw-r--r--man/bmon.88
-rw-r--r--src/out_format.c10
2 files changed, 13 insertions, 5 deletions
diff --git a/man/bmon.8 b/man/bmon.8
index ec4431c..e371ad8 100644
--- a/man/bmon.8
+++ b/man/bmon.8
@@ -220,6 +220,14 @@ and eth1:
.RS 4
\fBbmon \-p eth0,eth1 \-o curses\fP
.RE
+.PP
+To run bmon in format mode, monitoring any eth* interfaces, with a specified
+format string:
+.PP
+.RS 4
+\fBbmon \-p \(aqeth*\(aq \-o format:fmt=\(aq$(element:name) $(attr:rxrate:packets)\en\(aq\fP
+.RE
+.PP
.SH "FILES"
/etc/bmon.conf
diff --git a/src/out_format.c b/src/out_format.c
index aea38c5..4d017f3 100644
--- a/src/out_format.c
+++ b/src/out_format.c
@@ -320,15 +320,15 @@ static void print_help(void)
" Supported Escape Sequences: \\n, \\t, \\r, \\v, \\b, \\f, \\a\n" \
"\n" \
" Examples:\n" \
- " \"$(element:name)\\t$(attr:rx:bytes)\\t$(attr:tx:bytes)\\n\"\n" \
+ " '$(element:name)\\t$(attr:rx:bytes)\\t$(attr:tx:bytes)\\n'\n" \
" lo 12074 12074\n" \
"\n" \
- " \"$(element:name) $(attr:rxrate:packets) $(attr:txrate:packets)\\n\"\n" \
+ " '$(element:name) $(attr:rxrate:packets) $(attr:txrate:packets)\\n'\n" \
" eth0 33 5\n" \
"\n" \
- " \"Item: $(element:name)\\n\" \\\n" \
- " \"Bytes Rate: $(attr:rxrate:bytes)/$(attr:txrate:bytes)\\n\" \\\n" \
- " \"Packets Rate: $(attr:rxrate:packets)/$(attr:txrate:packets)\\n\"\n" \
+ " 'Item: $(element:name)\\nBytes Rate: $(attr:rxrate:bytes)/" \
+ "$(attr:txrate:bytes)\\nPackets Rate: $(attr:rxrate:packets)/" \
+ "$(attr:txrate:packets)\\n'\n" \
" Item: eth0\n" \
" Bytes Rate: 49130/2119\n" \
" Packets Rate: 40/11\n" \