Introduction
Introduction Statistics Contact Development Disclaimer Help
add man pages for each tool and the input file format - ploot - simple plotting…
git clone git://bitreich.org/ploot git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65…
Log
Files
Refs
Tags
README
LICENSE
---
commit 3e8032ac525f2456d151c919514bad5e2cbd7a96
parent 621b388b3006dd5ffe35a6f4b629942f574972b4
Author: Josuah Demangeon <[email protected]>
Date: Wed, 8 Aug 2018 21:39:20 +0200
add man pages for each tool and the input file format
Diffstat:
A ploot-csv.7 | 90 +++++++++++++++++++++++++++++…
M ploot-feed.1 | 89 ++++++++++++++++++++++-------…
M ploot-feed.c | 2 +-
M ploot-ff.1 | 103 +++++++++++++++++++++++++++++…
4 files changed, 258 insertions(+), 26 deletions(-)
---
diff --git a/ploot-csv.7 b/ploot-csv.7
@@ -0,0 +1,90 @@
+.Dd $Mdocdate: August 08 2018$
+.Dt PLOOT-CSV 7
+.Os
+.
+.
+.Sh NAME
+.
+.Nm ploot-csv
+.Nd input format used by the ploot set of programs
+.
+.
+.Sh SYNOPSIS
+.
+.Bd -literal -offset indent
+epoch,column-name-1,column-name-2
+timestamp,value1,value2
+.Ed
+.
+.
+.Sh DESCRIPTION
+.
+This is the simple comma-separated format used by the ploot-* programs.
+.\" .Sh STANDARDS
+.\" .Sh HISTORY
+.
+.
+.Sh AUTHORS
+.
+.An Josuah Demangeon
+.Aq Mt [email protected]
+.
+.
+.\" .Sh CAVEATS
+.\" .Sh BUGS
+.Sh INPUT FORMAT
+.
+.Nm reads lines and column from standard input.
+Each line correspond to one entry with the same timestamp.
+Each input column correspond to one output column, one type of data.
+.
+.Pp
+.
+.
+.Ss Header line
+.
+The program must contain a first header line with the label of each column.
+The first column is always a timestamp, and the first label must be
+.Dq epoch .
+The following columns
+.
+.Bd -literal -offset indent
+epoch,free_memory,process_count
+.Ed
+.
+.
+.Ss Data lines
+.
+The following lines are the data.
+The first column is an unix timestamp: number of seconds since 00:00:00
+01/01/1970.
+The remaining columns are values, that might be decimal
+.Po
+they will be read as a
+.Vt double
+.Pc .
+.
+.Bd -literal -offset indent
+1533752053,16.3,45
+1533752054,18.7,42
+1533752055,40.1,39
+1533752056,40.1,39
+.Ed
+.
+.
+.Sh SEE ALSO
+.
+.Xr ploot-feed 1 ,
+.Xr ploot-ff 1
+.
+.Sh HISTORY
+.
+.Nm
+was defined at
+.Lk gopher://bitreich.org/1/scm/ploot/ "Bitreich"
+.
+.
+.Sh AUTHORS
+.
+.An Josuah Demangeon
+.Aq Mt [email protected]
diff --git a/ploot-feed.1 b/ploot-feed.1
@@ -12,35 +12,67 @@
.Sh SYNOPSIS
.
.Nm ploot-feed
-.Op Fl options
-.Ar
+.Op Fl w Ar width
+.Ar maxval...
.
.
.Sh DESCRIPTION
.
The
.Nm
-utility
-.
-.
-.\" .Sh CONTEXT
-.\" For section 9 functions only.
-.\" .Sh RETURN VALUES
-.\" For sections 2, 3, and 9 function return values only.
-.\" .Sh ENVIRONMENT
-.\" For sections 1, 6, 7, and 8 only.
-.\" .Sh FILES
-.\" .Sh EXIT STATUS
-.\" For sections 1, 6, and 8 only.
-.\" .Sh EXAMPLES
-.\" .Sh DIAGNOSTICS
-.\" For sections 1, 4, 6, 7, 8, and 9 printf/stderr messages only.
-.\" .Sh ERRORS
-.\" For sections 2, 3, 4, and 9 errno settings only.
-.\" .Sh SEE ALSO
-.\" .Xr foobar 1
-.\" .Sh STANDARDS
-.\" .Sh HISTORY
+utility plots a text chart of csv values coming from stdin in real time.
+.
+.Bl -tag -width 6n
+.
+.It Ar width
+is the width of the plot in characters.
+.
+.It Ar maxval
+is a list of argument that specify the maximum value for each column.
+If the input csv have 5 columns in addition of the timestamp, there must
+be 5 maxval arguments.
+.
+.El
+.
+.Pp
+The input format is documented in the
+.Xr ploot-csv 7
+manual page.
+.
+.
+.Sh EXIT STATUS
+.Ex -std
+.
+.
+.Sh EXAMPLES
+.
+.Bd -literal -offset indent
+$ cat <<EOF >sample.txt
+epoch,free_memory,process_count
+1533752053,16.3,45
+1533752054,18.7,42
+1533752055,40.1,39
+1533752056,40.1,39
+EOF
+$ ploot-feed -w 80 1 1 <sample.txt
+.Ed
+.
+.
+.Sh SEE ALSO
+.
+.Xr ploot-ff 1 ,
+.Xr ploot-format 7
+.
+.
+.Sh HISTORY
+.
+.Nm
+earned its author a bitreich.org medal of misspelled program name.
+.
+.Pp
+.Nm
+was written at
+.Lk gopher://bitreich.org/1/scm/ploot/ "Bitreich"
.
.
.Sh AUTHORS
@@ -49,5 +81,12 @@ utility
.Aq Mt [email protected]
.
.
-.\" .Sh CAVEATS
-.\" .Sh BUGS
+.Sh BUGS
+.
+.Nm
+does not make any math on the input: if the timestamps are not at regular
+interval, ploot will still print one output line every 4 lines read,
+regardless of the time interval.
+.
+.Pp
+However, the timestamp printed on the left is always exact.
diff --git a/ploot-feed.c b/ploot-feed.c
@@ -137,7 +137,7 @@ plot(char labels[LINE_MAX], double *max, int ncol)
last_epoch = epoch = 0;
- for (n = 0;; n = n == 25 ? 0 : n + 1) {
+ for (n = 0;; n = (n == 25 ? 0 : n + 1)) {
if (n == 0)
put_time(0, 0, 2), fputs(labels, stdout), puts("│");
diff --git a/ploot-ff.1 b/ploot-ff.1
@@ -0,0 +1,103 @@
+.Dd $Mdocdate: August 08 2018$
+.Dt PLOOT-FF 1
+.Os
+.
+.
+.Sh NAME
+.
+.Nm ploot-ff
+.Nd produce a farbfeld image of csv input
+.
+.
+.Sh SYNOPSIS
+.
+.Nm ploot-ff
+.Op Fl t Ar title
+.Op Fl u Ar unit
+.Ar colors...
+.
+.
+.Sh DESCRIPTION
+.
+The
+.Nm
+utility plots an image in the farbfeld format out of csv values coming from st…
+.
+.Bl -tag -width 6n
+.
+.It Fl t
+Set the title of the plot printed at the top left corner.
+.
+.It Fl u
+Set the unit description printed at the top right corner.
+.
+.It Ar colors
+List of argument that specify the color for each column.
+If the input csv have 5 columns in addition of the timestamp, there must
+be 5 maxval arguments.
+Colors available are red, orange, yellow, green, cyan and blue.
+.
+.El
+.
+.Pp
+The input format is documented in the
+.Xr ploot-csv 7
+manual page.
+.
+.
+.Sh EXIT STATUS
+.Ex -std
+.
+.
+.Sh EXAMPLES
+.
+.Bd -literal -offset indent
+$ cat <<EOF >sample.txt
+epoch,used_memory,free_memory
+1533752053,160,401
+1533752054,180,381
+1533752055,301,260
+1533752056,303,258
+EOF
+$ ploot-ff -t demo -u MB red yellow <sample.txt
+.Ed
+.
+.
+.Sh SEE ALSO
+.
+.Xr ploot-ff 1 ,
+.Xr ploot-csv 7
+.
+.Pp
+The
+.Xr farbfeld 7
+image format:
+.Lk https://tools.suckless.org/farbfeld/
+.
+.
+.Sh HISTORY
+.
+.Nm
+earned its author a bitreich.org medal of misspelled program name.
+.
+.Pp
+.Nm
+was written at
+.Lk gopher://bitreich.org/1/scm/ploot/ "Bitreich"
+.
+.
+.Sh AUTHORS
+.
+.An Josuah Demangeon
+.Aq Mt [email protected]
+.
+.
+.Sh BUGS
+.
+.Nm
+does not make any math on the input: if the timestamps are not at regular
+interval, ploot will still print one output line every 4 lines read,
+regardless of the time interval.
+.
+.Pp
+However, the timestamp printed on the left is always exact.
You are viewing proxied material from bitreich.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.