From dcc08fc56dc3cd27f098292d7ff48d25a0b15ea0 Mon Sep 17 00:00:00 2001 From: Teemu Toivola Date: Thu, 22 Mar 2018 02:07:27 +0200 Subject: [PATCH] improve syntax of man pages --- man/vnstat.1 | 170 +++++++++++++++++++--------------------------- man/vnstat.conf.5 | 1 - man/vnstatd.1 | 59 ++++++---------- man/vnstati.1 | 145 ++++++++++++++++----------------------- 4 files changed, 148 insertions(+), 227 deletions(-) diff --git a/man/vnstat.1 b/man/vnstat.1 index a4a68b5..aba78ab 100644 --- a/man/vnstat.1 +++ b/man/vnstat.1 @@ -1,97 +1,66 @@ .TH VNSTAT 1 "MARCH 2018" "version 2.0" "User Manuals" .SH NAME - vnstat \- a console-based network traffic monitor .SH SYNOPSIS .B vnstat -[ -.B \-5Ddhlmqrstvw? -] [ -.B \-\-add -] [ -.B \-\-config -.I file -] [ -.B \-\-create -] [ -.B \-\-days -.I count -] [ -.B \-\-delete -] [ -.B \-\-dbdir -.I directory -] [ -.B \-\-debug -] [ -.B \-\-fiveminutes -.I count -.B \-\-help -] [ -.B \-\-hours -] [ -.B \-\-hourslist -.I count -] [ -.B \-i -.I interface -] [ -.B \-\-iface -.I interface -] [ -.B \-\-iflist -] [ -.B \-\-json -.I "mode limit" -] [ -.B \-\-live -.I mode -] [ -.B \-\-locale -.I locale -] [ -.B \-\-longhelp -] [ -.B \-\-months -.I count -] [ -.B \-\-oneline -.I mode -] [ -.B \-\-query -] [ -.B \-\-rateunit -] [ -.B \-\-remove -] [ -.B \-ru -] [ -.B \-\-setalias -.I alias -] [ -.B \-\-short -] [ -.B \-\-showconfig -] [ -.B \-\-style -.I number -] [ -.B \-\-top -.I count -] [ -.B \-tr -.I time -] [ -.B \-\-traffic -.I time -] [ -.B \-\-version -] [ -.B \-\-xml -.I "mode limit" -] +.RB [ \-5Ddhlmqrstvw? ] +.RB [ \-\-add ] +.RB [ \-\-config +.IR file ] +.RB [ \-\-create ] +.RB [ \-\-days +.RI [ count ]] +.RB [ \-\-delete ] +.RB [ \-\-dbdir +.RI [ directory ]] +.RB [ \-\-debug ] +.RB [ \-\-fiveminutes +.RI [ count ]] +.RB [ \-\-help ] +.RB [ \-\-hours ] +.RB [ \-\-hourslist +.RI [ count ]] +.RB [ \-i +.IR interface ] +.RB [ \-\-iface +.IR interface ] +.RB [ \-\-iflist ] +.RB [ \-\-json +.RI [ mode ] +.RI [ limit ]] +.RB [ \-\-live +.RI [ mode ]] +.RB [ \-\-locale +.IR locale ] +.RB [ \-\-longhelp ] +.RB [ \-\-months +.RI [ count ]] +.RB [ \-\-oneline +.RI [ mode ]] +.RB [ \-\-query ] +.RB [ \-\-rateunit +.RI [ mode ]] +.RB [ \-\-remove ] +.RB [ \-ru +.RI [ mode ]] +.RB [ \-\-setalias +.IR alias ] +.RB [ \-\-short ] +.RB [ \-\-showconfig ] +.RB [ \-\-style +.IR number ] +.RB [ \-\-top +.RI [ count ]] +.RB [ \-tr +.RI [ time ]] +.RB [ \-\-traffic +.RI [ time ]] +.RB [ \-\-version ] +.RB [ \-\-xml +.RI [ mode ] +.RI [ limit ]] .SH DESCRIPTION @@ -132,7 +101,7 @@ as configuration file instead of using normal configuration file search functionality. .TP -.BI "-d, --days " count +.BI "-d, --days " [count] Show traffic statistics on a daily basis for the last days. The length of the list will default to 30 entries unless configured otherwise or unless the optional .I count @@ -152,7 +121,7 @@ file or the hardcoded default if no configuration file is available. Show additional debug output. .TP -.BI "-5, --fiveminutes " count +.BI "-5, --fiveminutes " [count] Show traffic statistics on a 5 minutes resolution for the last hours. The length of the list will default to 24 entries unless configured otherwise or unless the optional .I count @@ -178,7 +147,7 @@ syntax. Show list of currently available interfaces. .TP -.BI "--json " "mode limit" +.BI "--json " "[mode] [limit]" Show database content for selected interface or all interfaces in json format. All traffic values in the output are in bytes. An optional .I mode @@ -200,7 +169,7 @@ options without having any effect to the output. .TP -.BI "-l, --live " mode +.BI "-l, --live " [mode] Display current transfer rate for the selected interface in real time until interrupted. Statistics will be shown after interruption if the runtime was more than 10 seconds. An optional @@ -225,7 +194,7 @@ default if no configuration file is available. Show complete options list. .TP -.BI "-m, --months " count +.BI "-m, --months " [count] Show traffic statistics on a monthly basis for the last months. The length of the list will default to 12 entries unless configured otherwise or unless the optional .I count @@ -234,7 +203,7 @@ parameter is used. All entries stored in the database will be shown if is set to 0. .TP -.BI "--oneline " mode +.BI "--oneline " [mode] Show traffic summary for selected interface using one line with a parseable format. The output contains 15 fields with ; used as field delimiter. The 1st field contains the version information of the output that will be changed @@ -262,13 +231,14 @@ or and stop monitoring it. .TP -.B "-ru, --rateunit" +.BI "-ru, --rateunit " [mode] Swap the configured rate unit. If rate has been configured to be shown in bytes then rate will be shown in bits if this option is present. In the same way, if rate has been configured to be shown in bits then rate will be shown -in bytes when this option is present. Alternatively 0 or 1 can be given as -parameter for this option in order to select between bytes (0) and bits -(1) regardless of the configuration file setting. +in bytes when this option is present. Alternatively, +.I mode +with either 0 or 1 can be used as parameter for this option in order to +select between bytes (0) and bits (1) regardless of the configuration file setting. .TP .BI "--setalias " alias @@ -293,7 +263,7 @@ supported. 4 disables the use of terminal control characters in mode. .TP -.BI "-t, --top " count +.BI "-t, --top " [count] Show all time top traffic days. The length of the list will default to 10 entries unless configured otherwise or unless the optional .I count @@ -302,7 +272,7 @@ parameter is used. All entries stored in the database will be shown if is set to 0. .TP -.BI "-tr " time +.BI "-tr " [time] Calculate how much traffic goes through the selected interface during the given .I time @@ -318,7 +288,7 @@ option. However, in that case, the countdown before results isn't shown. Show current version. .TP -.BI "--xml " "mode limit" +.BI "--xml " "[mode] [limit]" Show database content for selected interface or all interfaces in xml format. All traffic values in the output are in bytes. An optional .I mode diff --git a/man/vnstat.conf.5 b/man/vnstat.conf.5 index 966416b..90d4459 100644 --- a/man/vnstat.conf.5 +++ b/man/vnstat.conf.5 @@ -1,6 +1,5 @@ .TH VNSTAT.CONF 5 "MARCH 2018" "version 2.0" "User Manuals" .SH NAME - vnstat.conf \- vnStat configuration file .SH SYNOPSIS diff --git a/man/vnstatd.1 b/man/vnstatd.1 index 979a172..93affc4 100644 --- a/man/vnstatd.1 +++ b/man/vnstatd.1 @@ -1,48 +1,31 @@ .TH VNSTATD 1 "MARCH 2018" "version 2.0" "User Manuals" .SH NAME - vnstatd \- daemon based database updating for vnStat .SH SYNOPSIS .B vnstatd -[ -.B \-Ddnpsv? -] [ -.B \-\-alwaysadd -] [ -.B \-\-config -.I file -] [ -.B \-\-daemon -] [ -.B \-\-debug -] [ -.B \-g -.I group -] [ -.B \-\-group -.I group -] [ -.B \-\-help -] [ -.B \-\-noadd -] [ -.B \-\-nodaemon -] [ -.B \-\-pidfile -.I file -] [ -.B \-\-sync -] [ -.B \-\-u -.I user -] [ -.B \-\-user -.I user -] [ -.B \-\-version -] +.RB [ \-Ddnpsv? ] +.RB [ \-\-alwaysadd ] +.RB [ \-\-config +.IR file ] +.RB [ \-\-daemon ] +.RB [ \-\-debug ] +.RB [ \-g +.IR group ] +.RB [ \-\-group +.IR group ] +.RB [ \-\-help ] +.RB [ \-\-noadd ] +.RB [ \-\-nodaemon ] +.RB [ \-\-pidfile +.IR file ] +.RB [ \-\-sync ] +.RB [ \-\-u +.IR user ] +.RB [ \-\-user +.IR user ] +.RB [ \-\-version ] .SH DESCRIPTION diff --git a/man/vnstati.1 b/man/vnstati.1 index 0cbecf2..16f8497 100644 --- a/man/vnstati.1 +++ b/man/vnstati.1 @@ -1,89 +1,57 @@ .TH VNSTATI 1 "MARCH 2018" "version 2.0" "User Manuals" .SH NAME - vnstati \- png image output support for vnStat .SH SYNOPSIS .B vnstati -[ -.B \-5cdhimostv? -] [ -.B \-\-altdate -] [ -.B \-\-cache -.I time -] [ -.B \-\-config -.I file -] [ -.B \-\-days -.I count -] [ -.B \-\-dbdir -.I directory -] [ -.B \-\-fiveminutes -.I count -] [ -.B \-\-headertext -.I text -] [ -.B \-\-help -] [ -.B \-\-hours -] [ -.B \-hs -] [ -.B \-\-hsummary -] [ -.B \-i -.I interface -] [ -.B \-\-iface -.I interface -] [ -.B \-\-locale -.I locale -] [ -.B \-\-months -.I count -] [ -.B \-ne -] [ -.B \-nh -] [ -.B \-nl -] [ -.B \-\-noedge -] [ -.B \-\-noheader -] [ -.B \-\-nolegend -] [ -.B \-\-output -.I file -] [ -.B \-ru -] [ -.B \-\-rateunit -] [ -.B \-\-style -.I number -] [ -.B \-\-summary -] [ -.B \-\-top -.I count -] [ -.B \-\-transparent -] [ -.B \-\-version -] [ -.B \-vs -] [ -.B \-\-vsummary -] +.RB [ \-5cdhimostv? ] +.RB [ \-\-altdate ] +.RB [ \-\-cache +.IR time ] +.RB [ \-\-config +.IR file ] +.RB [ \-\-days +.RI [ count ]] +.RB [ \-\-dbdir +.IR directory ] +.RB [ \-\-fiveminutes +.RI [ count ]] +.RB [ \-\-headertext +.IR text ] +.RB [ \-\-help ] +.RB [ \-\-hours ] +.RB [ \-hs ] +.RB [ \-\-hsummary ] +.RB [ \-i +.IR interface ] +.RB [ \-\-iface +.IR interface ] +.RB [ \-\-locale +.IR locale ] +.RB [ \-\-months +.RI [ count ]] +.RB [ \-ne ] +.RB [ \-nh ] +.RB [ \-nl ] +.RB [ \-\-noedge ] +.RB [ \-\-noheader ] +.RB [ \-\-nolegend ] +.RB [ \-\-output +.IR file ] +.RB [ \-ru +.RI [ mode ]] +.RB [ \-\-rateunit +.RI [ mode ]] +.RB [ \-\-style +.IR number ] +.RB [ \-\-summary ] +.RB [ \-\-top +.RI [ count ]] +.RB [ \-\-transparent ] +.RB [ \-\-version ] +.RB [ \-vs ] +.RB [ \-\-vsummary ] .SH DESCRIPTION @@ -120,7 +88,7 @@ as configuration file instead of using normal configuration file search functionality. .TP -.BI "-d, --days " count +.BI "-d, --days " [count] Output traffic statistics on a daily basis for the last days. The length of the list will default to 30 entries unless configured otherwise or unless the optional .I count @@ -136,7 +104,7 @@ as database directory instead of using the directory specified in the configurat file or the hardcoded default if no configuration file is available. .TP -.BI "-5, --fiveminutes " count +.BI "-5, --fiveminutes " [count] Output traffic statistics on a 5 minutes resolution for the last hours. The length of the list will default to 24 entries unless configured otherwise or unless the optional .I count @@ -179,7 +147,7 @@ instead of using the locale setting specified in the configuration file or the s default if no configuration file is available. .TP -.BI "-m, --months " count +.BI "-m, --months " [count] Output traffic statistics on a monthly basis for the last months. The length of the list will default to 12 entries unless configured otherwise or unless the optional .I count @@ -207,13 +175,14 @@ Write png image to and exit. Output can be directed to stdout by giving "-" as filename. .TP -.B "-ru, --rateunit" -Change the configured rate unit. If rate has been configured to be shown in +.BI "-ru, --rateunit " [mode] +Swap the configured rate unit. If rate has been configured to be shown in bytes then rate will be shown in bits if this option is present. In the same way, if rate has been configured to be shown in bits then rate will be shown -in bytes when this option is present. Alternatively 0 or 1 can be given as -parameter for this option in order to select between bytes (0) and bits -(1) regardless of the configuration file setting. +in bytes when this option is present. Alternatively, +.I mode +with either 0 or 1 can be used as parameter for this option in order to +select between bytes (0) and bits (1) regardless of the configuration file setting. .TP .BI "--style " number @@ -227,7 +196,7 @@ Other values will show bar graphics instead. Output traffic statistics summary. .TP -.BI "-t, --top " count +.BI "-t, --top " [count] Output all time top traffic days. The length of the list will default to 10 entries unless configured otherwise or unless the optional .I count -- 2.40.0