2018-08-28 21:54:29 +00:00
. \" Man page generated from reStructuredText.
.
2018-10-05 23:19:00 +00:00
.TH "GULIK" "1" "Oct 06, 2018" "0.0.0.1" "gulik"
2018-08-28 21:54:29 +00:00
.SH NAME
gulik \- gulik Documentation
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\ $1 \\ n[an-margin]
level \\ n[rst2man-indent-level]
level margin: \\ n[rst2man-indent\\ n[rst2man-indent-level]]
-
\\ n[rst2man-indent0]
\\ n[rst2man-indent1]
\\ n[rst2man-indent2]
. .
.de1 INDENT
. \" .rstReportMargin pre:
. RS \\ $1
. nr rst2man-indent\\n[rst2man-indent-level] \\ n[an-margin]
. nr rst2man-indent-level +1
. \" .rstReportMargin post:
. .
.de UNINDENT
. RE
. \" indent \\n[an-margin]
. \" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
. \" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\ n[rst2man-indent\\n[rst2man-indent-level]]u
. .
2018-09-05 05:48:13 +00:00
.sp
\fB NOTE:\fP
.INDENT 0 .0
.INDENT 3 .5
This documentation is still a work in progress and as such subject
to sudden changes, cataclysms and various other FNORDs. The software it
describes is still in alpha and may cause undue frustration if not taken
in moderation.
.UNINDENT
.UNINDENT
2018-08-31 04:24:58 +00:00
[image]
.nf
This is ST. GULIK. He is the Messenger of the Goddess.
A different age from ours called him Hermes.
Many people called him by many names.
He is a Roach.
.fi
.sp
2018-09-28 07:42:24 +00:00
.SH QUICKSTART
.SS Install!
.nf
\fB [pkg|apt|dnf|fnord] install gtk3\fP
\fB pip[\- 3.6] install \- \- user https://rnd.phryk.net/phryk\- evil\- mad\- sciences\- llc/gulik\fP
.fi
.sp
.SS Run!
.sp
\fB gulik\fP
.SS Done!
.sp
That\(aq s literally everything needed to get \fB gulik\fP to run.
If you want to go deeper, you can…
.SS Configure!
.sp
\fB $EDITOR ~/.config/gulik/config.py\fP
.sp
See also: \fI \% Configuration file\fP \& .
2018-08-31 04:24:58 +00:00
.SH DEFINITIONAL BULLSHIT
.sp
\fB gulik\fP is a highly configurable graphical system monitor.
.sp
\fB gulik\fP is a framework for custom graphical system monitors.
.sp
Both of these statements are true in some sense, false in some sense,
meaningless in some sense, true and false in some sense, true and meaningless
in some sense, false and meaningless in some sense and true and false and
meaningless in some sense.
2018-08-28 21:54:29 +00:00
.sp
2018-08-31 04:24:58 +00:00
This incarnation of our most holy saint \fB gulik\fP is software licensed
under the GPLv3 license, see \fB COPYING\fP for more details.
2018-09-11 18:10:50 +00:00
.nf
The official git repository for \fB gulik\fP can be found at:
\fI \% https://rnd.phryk.net/phryk\- evil\- mad\- sciences\- llc/gulik/\fP
.fi
.sp
2018-08-30 01:56:27 +00:00
.sp
2018-08-31 04:24:58 +00:00
The PNG \fB gulik\fP logo is based on a nice public domain trace of the sacred
roach crafted by toa267 who is definitely not a cabbage.
2018-09-02 22:01:14 +00:00
.SH COMPATIBILITY AND DEPENDENCIES
.sp
\fB gulik\fP should skitter just fine on FreeBSD and the Linuxoids.
It will probably™ crawl into problems on OSX and other BSDs, but
\fI \% give us a holler\fP
2018-09-05 05:48:13 +00:00
if it doesn\(aq t run on your *nix flavor of choice and you\(aq re willing
2018-09-02 22:01:14 +00:00
to do some testing.
.sp
All bets are off on Windows®™ʷᵗᶠ unless someone else is willing to do a PR,
which we expect will be a long march through the valley of pain that we do not
wish upon anyone.
.sp
\fB gulik\fP runs only on python 3.6 or newer.
All python dependencies are noted in \fB setup.py\fP , ready for use in pip.
.sp
The only other dependency is gtk3. It does run with X11 and \fI should\fP run
2018-09-12 22:23:38 +00:00
with wayland, but the latter hasn\(aq t been tested.
2018-09-02 22:01:14 +00:00
.sp
To get partial transparency working (on X11) you need to have a compositing
2018-09-03 03:07:10 +00:00
manager like \fB xcompmgr\fP running.
2018-09-01 05:57:53 +00:00
.SH INSTALLATION
2018-09-03 03:07:10 +00:00
.nf
2018-09-02 22:01:14 +00:00
You can use pip to install \fB gulik\fP and all python dependencies in one go:
\fB pip install \- \- user git+https://rnd.phryk.net/phryk\- evil\- mad\- sciences\- llc/gulik/\fP
2018-09-03 03:07:10 +00:00
.fi
.sp
2018-09-02 22:01:14 +00:00
.sp
If you insist on manual installation, just clone the repository and copy the
2018-09-05 05:48:13 +00:00
\fB gulik\fP subdirectory into your \fB site\- packages\fP directory and \fB bin/gulik\fP
to a directory in your \fB $PATH\fP \& .
2018-09-02 22:01:14 +00:00
.sp
The master branch of the repository always holds the most current release.
.SH RUNNING
.sp
You run \fB gulik\fP simply by running the \fB gulik\fP executable that comes with
the installation.
.SH CONFIGURATION AND CUSTOMIZATION
.SS Default behavior
.sp
By default, \fB gulik\fP will occupy a 200 pixel wide area over the full height
2018-09-12 22:23:38 +00:00
of the screen, placed at the left border of it and fill it with a few
\fI \% visualizer\fP s to grant you a good overview of what\(aq s happening on
your system.
2018-09-02 22:01:14 +00:00
.sp
It will use a black/white/green color scheme with a hue\- rotation palette
ranging from lime green to magenta\- ish pink and try to use the League of
Movable Type font \fI \% Orbitron\fP
which we very much recommend you install to get the right dystopian vibe.
.SS Configuration file
.sp
You can modify the settings for \fB gulik\fP by creating a configuration file
2018-09-05 05:48:13 +00:00
at \fB ~/.config/gulik/config.py\fP \& . This file, as it\(aq s name suggests, is a
2018-09-02 22:01:14 +00:00
python code file. \fB gulik\fP will import and \fB exec()\fP it, loading all
\fB UPPERCASE\fP variables into its configuration.
.SS Lock and reload
.sp
When \fB gulik\fP is running, you can send \fB SIGUSR1\fP to its main process
at any time to tell it to reload the configuration file and apply its
settings. If your configuration file is broken, \fB gulik\fP will keep
running with the previous settings.
.sp
2018-09-05 05:48:13 +00:00
Sending the signal is currently a bit clunky, as you\(aq ll have to do
2018-09-02 22:01:14 +00:00
something like: \fB kill \- s SIGUSR1 \(ga pgrep \- f \(aq python3.6.*gulik$\(aq \(ga \fP
since python applications always have the process name of the python
interpreter.
.SS Explaining ALL THE CONFIGURATION OPTIONS (not really, tho)
.INDENT 0 .0
.IP \(bu 2
2018-09-11 18:10:50 +00:00
\fB FPS\fP (\fB int\fP or \fB float\fP ): Frames Per Second; How often to redraw the window (and update system data). Default value: \fB 1\fP
2018-09-02 22:01:14 +00:00
.IP \(bu 2
\fB WIDTH\fP (\fB int\fP ): The width of the window in pixels. Default value: \fB 200\fP
.IP \(bu 2
\fB HEIGHT\fP (\fB int\fP ): The height of the window in pixels. Default value: \fB Gdk.Screen().get_default().get_height()\fP
.IP \(bu 2
\fB X\fP (\fB int\fP ): X coordinate of the windows top left corner. Default value: \fB 0\fP
.IP \(bu 2
\fB Y\fP (\fB int\fP ): Y coordinate of the windows top left corner. Default value: \fB 0\fP
.IP \(bu 2
2018-09-03 03:07:10 +00:00
\fB NETDATA_HOSTS\fP (\fB list\fP ): \fI \% netdata\fP hosts to connect to. Hosts as hostnames or \fB (host, port)\fP tuples. Default value: \fB []\fP
2018-09-02 22:01:14 +00:00
.IP \(bu 2
2018-10-05 23:19:00 +00:00
\fB NETDATA_RETRY\fP (\fB int\fP or \fB float\fP ): How long a defective \fI \% NetdataMonitor\fP will wait before retrying to contact the \fB netdata\fP server, in seconds. Default value: \fB 5\fP
2018-09-02 22:01:14 +00:00
.IP \(bu 2
\fB BSD_ACCURATE_MEMORY\fP (\fB bool\fP ): Use accurate but expensive memory data collection on BSD. Default value: \fB False\fP
.IP \(bu 2
\fB MARGIN\fP (\fB int\fP or \fB float\fP ): Margin around all \fI \% Visualizer\fP s. Default value: \fB 5\fP
.IP \(bu 2
\fB PADDING\fP (\fB int\fP or \fB float\fP ): Padding around all \fI \% Visualizer\fP s. Default value: \fB 5\fP
.IP \(bu 2
2018-09-03 03:07:10 +00:00
\fB FONT\fP (\fB str\fP ): Font family to use in captions, legends and the like. Default value: \fB "Orbitron"\fP
2018-09-02 22:01:14 +00:00
.IP \(bu 2
2018-09-03 03:07:10 +00:00
\fB FONT_WEIGHT\fP (\fB str\fP ): Font weight. Default value: \fB "Light"\fP
2018-09-02 22:01:14 +00:00
.IP \(bu 2
\fB FONT_SIZE\fP (\fB int\fP or \fB float\fP ): Font size in pixels. Default value: \fB 10\fP
.IP \(bu 2
\fB COLOR_WINDOW_BACKGROUND\fP (\fI \% Color\fP ): Background color of the window. Default value: \fB Color(0.05, 0.05, 0.05, 0.8)\fP
.IP \(bu 2
\fB COLOR_BACKGROUND\fP (\fI \% Color\fP ): Background color for \fI \% Visualizer\fP s. Default value: \fB Color(1,1,1, 0.1)\fP
.IP \(bu 2
\fB COLOR_FOREGROUND\fP (\fI \% Color\fP ): Foreground color. This is used as base color for most \fI \% palette\fP s. Default value: \fB Color(0.5, 1, 0, 0.6)\fP
.IP \(bu 2
\fB COLOR_CAPTION\fP (\fI \% Color\fP ): Text color for captions. Default value: \fB Color(1,1,1, 0.6)\fP
.IP \(bu 2
\fB PALETTE\fP (\fB function\fP ): The default \fI \% palette\fP generator. Default value: \fB functools.partial(\fP \fI \% palette_hue()\fP \fB , distance=\- 120)\fP
.IP \(bu 2
2018-09-03 03:07:10 +00:00
\fB PATTERN\fP (\fB function\fP ): The default \fI \% pattern\fP generator. Default value: \fB stripe45\fP
2018-09-02 22:01:14 +00:00
.IP \(bu 2
\fB CAPTION_PLACEMENT\fP (\fB str\fP ): \fB "padding"\fP to have captions placed in the paddings of \fI \% Visualizer\fP s, \fB "inner"\fP to place them within the drawing region of the \fI \% Visualizer\fP \& . Default value: \fB "inner"\fP
.IP \(bu 2
\fB LEGEND\fP (\fB bool\fP ): Whether \fI \% Visualizer\fP s should attempt automatically creating a legend for themselves in their bottom padding. Default value: \fB True\fP
.IP \(bu 2
\fB LEGEND_ORDER\fP (\fB str\fP ): Whether to reverse the legend order. Can be \fB "normal"\fP or \fB "reverse"\fP \& . Default value: \fB "normal"\fP
.IP \(bu 2
\fB LEGEND_SIZE\fP (\fB int\fP or \fB float\fP ): Pixel height of one legend cell, including its own margin and padding. Legend font size is inferred from this. Default value: \fB 20\fP
.IP \(bu 2
\fB LEGEND_PLACEMENT\fP (\fB str\fP ): Where to place legends within the \fI \% Visualizer\fP s drawing region. Can be \fB "inner"\fP or \fB "padding"\fP \& . Default value: \fB "padding"\fP
.IP \(bu 2
\fB LEGEND_MARGIN\fP (\fB int\fP or \fB float\fP ): Margin around legends. Default value: \fB 2.5\fP
.IP \(bu 2
\fB LEGEND_PADDING\fP : Padding around legends. Default value: \fB 0\fP
.IP \(bu 2
\fB OPERATOR\fP : The blending operator used by \fI \% Visualizer\fP s. Default value: \fB Operator.OVER\fP
.UNINDENT
.SS Explaining ALL THE ᴀʟʟ ᴛʜᴇ ᴄᴏɴꜰɪɢᴜʀᴀᴛɪᴏɴ ᴏᴘᴛɪᴏɴꜱ (ya rly)
.sp
2018-09-05 05:48:13 +00:00
The above list doesn\(aq t really cover all the possible configuration variables
2018-09-03 03:07:10 +00:00
you can set, as \fB gulik\fP features a perversion of cascading styles.
.sp
Every single option except for \fB FPS\fP , \fB X\fP , \fB Y\fP , \fB NETDATA_HOSTS\fP ,
\fB NETDATA_RETRY\fP and \fB BSD_ACCURATE_MEMORY\fP can be overriden on a per\- class
basis by appending an underscore and the class name in uppercase to the
2018-09-05 05:48:13 +00:00
variable name. To disable legends on all \fI \% Plot\fP s for example, you
2018-09-03 03:07:10 +00:00
would use \fB LEGEND_PLOT = False\fP \& .
.sp
Additionally, \fB MARGIN\fP and \fB PADDING\fP can be set for each side by
appending an underscore and one of \fB LEFT\fP , \fB RIGHT\fP , \fB TOP\fP or \fB BOTTOM\fP \& .
.sp
If you want to mix both of these things, the resulting string follows the
pattern \fI <name>_<class>_<subname>\fP , for example \fB PADDING_PLOT_RIGHT\fP or
\fB LEGEND_MARGIN_ARC_BOTTOM\fP \& .
2018-09-02 22:01:14 +00:00
.SS Custom setups
.sp
By default, gulik will run \fB Gulik.autosetup()\fP to set up a reasonable
collection of \fI \% Visualizer\fP s that gives you a good overview of your
system – but you can add your own \fB setup\fP function to the configuration
file that will be used in stead of the autosetup.
.INDENT 0 .0
.INDENT 3 .5
.sp
.nf
.ft C
import gulik
def setup(app):
2018-09-03 03:07:10 +00:00
2018-09-07 02:13:39 +00:00
box = app.box()
2018-09-03 03:07:10 +00:00
box.place(
\(aq cpu\(aq ,
gulik.Plot,
elements=[\(aq core_0\(aq , \(aq core_1\(aq ],
width=box.width,
2018-09-07 02:13:39 +00:00
height=box.width + 40
2018-09-03 03:07:10 +00:00
)
2018-09-02 22:01:14 +00:00
.ft P
.fi
.UNINDENT
.UNINDENT
2018-09-03 03:07:10 +00:00
.sp
2018-09-12 22:23:38 +00:00
Let\(aq s look at the code, line by line:
2018-09-07 02:13:39 +00:00
.INDENT 0 .0
.TP
2018-09-12 22:23:38 +00:00
.B \fB def setup(app)\fP
2018-09-07 02:13:39 +00:00
The name of the setup function \fI must\fP be \fB setup\fP , otherwise \fB gulik\fP won\(aq t recognize it.
The passed \fB app\fP parameter is a \fI \% Gulik\fP object.
.TP
.B \fB box = app.box()\fP
\fB Gulik.box()\fP creates a \fI \% Box\fP , a little helper to make layouting
easier. You can limit its size via \fB width\fP and \fB height\fP keyword parameters.
If these aren\(aq t supplied, the box will fill the whole window.
.TP
2018-09-12 22:23:38 +00:00
.B \fB box.place(\fP
2018-09-07 02:13:39 +00:00
\fI \% Box.place()\fP places a new \fI \% visualizer\fP \& . \fI \% Box\fP orders
visualizers from left to right and top to bottom.
.TP
2018-09-12 22:23:38 +00:00
.B \fB \(aq cpu\(aq\fP
2018-09-07 02:13:39 +00:00
This is the monitored \fI \% component\fP we want to visualize \fI \% element\fP s
2018-09-12 22:23:38 +00:00
of. It is needed to look up the right \fI \% Monitor\fP object for
2018-09-07 02:13:39 +00:00
\fI \% Visualizer\fP instantiation.
.TP
2018-09-12 22:23:38 +00:00
.B \fB gulik.Plot\fP
2018-09-07 02:13:39 +00:00
The \fI \% visualizer\fP class to be instantiated.
A subclass of \fI \% Visualizer\fP \& .
.UNINDENT
.sp
All keyword arguments below this are just passed on to the visualizer class,
so in this case, \fI \% Plot\fP \& . Here, these are:
.INDENT 0 .0
.TP
2018-09-12 22:23:38 +00:00
.B \fB elements=[\(aqcore_0\(aq, \(aq core_1\(aq],\fP
Defines the \fI \% element\fP s to be visualized. These two values refer
to the first and second CPU cores.
2018-09-07 02:13:39 +00:00
.TP
2018-09-12 22:23:38 +00:00
.B \fB width=box.width,\fP
2018-09-07 02:13:39 +00:00
Defines the width of the \fI \% visualizer\fP \& .
.TP
2018-09-12 22:23:38 +00:00
.B \fB height=box.width + 40 \fP
2018-09-07 02:13:39 +00:00
Defines the height of the \fI \% visualizer\fP \& . Has 40 pixel added to it,
because by default, \fB gulik\fP adds 40 pixel bottom padding to every
visualizer to allow 2 lines of legend.
.UNINDENT
.sp
\fI \% Box.place()\fP uses the \fB width\fP and \fB height\fP keyword parameters
(if passed) to make its layouting decisions. If they aren\(aq t passed, all
remaining space is used.
.sp
And with that, you hopefully know enough to get started with your custom
2018-09-12 22:23:38 +00:00
setup. You can consult \fI \% Monitor\fP and its subclasses to find out
2018-09-07 02:13:39 +00:00
\fI what\fP you can visualize and \fI \% Visualizer\fP and its subclasses to
find out \fI how\fP you can visualize that data.
.sp
If you want to extend the original setup instead of doing a completely
custom one, you can call \fB Gulik.autosetup()\fP from your custom \fB setup\fP
function and limit its area by using \fB width\fP and \fB height\fP as well as
\fB x\fP and \fB y\fP keyword parameters.
.SH MODULE REFERENCE
2018-08-31 04:24:58 +00:00
.SS Architecture
2018-08-30 01:56:27 +00:00
.INDENT 0 .0
.INDENT 3 .5
.sp
.nf
.ft C
+\- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- +
| |
| gulik process | collector processes
| |
| (main thread) (monitor threads) |
| Gulik\- \- \- \- \- \- \- \- \- \- \- CPUMonitor <\- \- \- \- \- ø\- \- \- \- \- > CPUCollector
| | | \(ga \- MemoryMonitor <\- \- \- \- \- ø\- \- \- \- \- > MemoryCollector
| | |\(ga \- \- NetworkMonitor <\- \- \- \- \- ø\- \- \- \- \- > NetworkCollector
| | \(ga \- \- \- … <\- \- \- \- \- ø\- \- \- \- \- > …
| | | |
| | | |
| \(ga \- \- visualizers | (visualizers |
| | \(ga \- Arc | access |
| |\(ga \- \- Plot <\' monitors) |
| \(ga \- \- \- … |
| |
+\- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- +
.ft P
.fi
.UNINDENT
.UNINDENT
2018-09-01 05:57:53 +00:00
.sp
2018-09-03 03:07:10 +00:00
In \fB gulik\fP , there is one central \fI \% Gulik\fP object.
2018-09-12 22:23:38 +00:00
It manages \fI \% Monitor\fP s and \fI \% Visualizer\fP s.
2018-09-01 05:57:53 +00:00
.sp
Visualizers use the \fB Monitor.normalize()\fP and \fB Monitor.caption()\fP
functions to utilize the collected data.
.sp
2018-09-12 22:23:38 +00:00
Communication between the \fI \% Monitor\fP s within the gulik process and
2018-09-01 05:57:53 +00:00
\fB Collector\fP processes is done via queues. Every monitor/collector
2018-09-05 05:48:13 +00:00
pair shares two queues. One "update queue" that monitors use to send update
requests to collectors and one "data queue" that collectors use to send the
2018-09-01 05:57:53 +00:00
next datapoint to their respective monitor.
2018-09-05 05:48:13 +00:00
.SS Box model
.INDENT 0 .0
.INDENT 3 .5
.sp
.nf
.ft C
+\- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- + ↑
| | |
| margin | |
| | |
| +\- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- + | |
| | | |
| | padding | | h
| | | | e
| | +\- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- + ↑ | | i
| | | | | inner | | g
| | | inner drawing region | | height | | h
| | | | | | | t
| | +\- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- + ↓ | |
| | | | |
| | ←\- \- \- \- \- \- \- \- \- \- \- \- inner width \- \- \- \- \- \- \- \- \- \- → | | |
| | | | |
| +\- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- + | |
| | |
+\- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- + ↓
←\- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- width \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- →
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
\fB gulik\fP s box model is pretty similar to the one CSS has, with
one important distinction: margins and paddings are included in
\fB width\fP and \fB height\fP in order to make layouting easier.
.SS Concepts
.SS visualizer
.sp
Visualizers are instances of any subclass of \fI \% Visualizer\fP \& .
.sp
2018-09-12 22:23:38 +00:00
A visualizer is assigned a \fI \% Monitor\fP and a list of \fI \% element\fP s.
2018-09-05 05:48:13 +00:00
.sp
2018-09-12 22:23:38 +00:00
\fI \% Gulik\fP will periodically call all visualizers \fB update\fP methods
2018-09-05 05:48:13 +00:00
(see source of \fI \% Visualizer.update()\fP ).
.sp
What exactly happens in the \fB update\fP function of a visualizer differs
between the different classes, but usually it queries the instance\- assigned
monitor for the most recent data about its \fI \% element\fP s by calling
\fB Monitor.normalize()\fP and then does some drawing on the passed
\fB cairo.Context\fP to visualize the data in some manner.
.INDENT 0 .0
.TP
.B Currently, there are 7 built\-in visualizers:
.INDENT 7 .0
.IP \(bu 2
2018-10-05 23:19:00 +00:00
\fI \% Text\fP
2018-09-05 05:48:13 +00:00
.IP \(bu 2
\fI \% Rect\fP
.IP \(bu 2
\fI \% Arc\fP
.IP \(bu 2
\fI \% Plot\fP
.IP \(bu 2
2018-10-05 23:19:00 +00:00
\fI \% MirrorRect\fP
2018-09-05 05:48:13 +00:00
.IP \(bu 2
2018-10-05 23:19:00 +00:00
\fI \% MirrorArc\fP
2018-09-05 05:48:13 +00:00
.IP \(bu 2
2018-10-05 23:19:00 +00:00
\fI \% MirrorPlot\fP
2018-09-05 05:48:13 +00:00
.UNINDENT
.UNINDENT
.sp
You are, however, welcome to implement your own visualizers by subclassing
\fI \% Visualizer\fP and overriding \fB Visualizer.draw()\fP \& .
2018-09-12 22:23:38 +00:00
.SS monitor
.sp
Monitors are instances of any subclass of \fI \% Monitor\fP ,
which itself is a subclass of \fB multithreading.Thread\fP \& .
.sp
Every monitor acts as one half of a monitor\- \fI \% collector\fP pair,
each of which collects and transforms data on a specific \fI \% component\fP \& .
.sp
The monitors responsibility in this pair is to take data from the collector
and offer it in a form that is usable by \fI \% visualizer\fP s. This is mainly
done through the functions \fB Monitor.normalize()\fP and \fB Monitor.caption()\fP \& .
.INDENT 0 .0
.TP
.B Currently, there are 6 built\-in monitors:
.INDENT 7 .0
.IP \(bu 2
2018-09-28 07:42:24 +00:00
\fI \% CPUMonitor\fP
2018-09-12 22:23:38 +00:00
.IP \(bu 2
2018-09-28 07:42:24 +00:00
\fI \% MemoryMonitor\fP
2018-09-12 22:23:38 +00:00
.IP \(bu 2
2018-09-28 07:42:24 +00:00
\fI \% NetworkMonitor\fP
2018-09-12 22:23:38 +00:00
.IP \(bu 2
2018-10-02 22:37:00 +00:00
\fI \% BatteryMonitor\fP
2018-09-12 22:23:38 +00:00
.IP \(bu 2
2018-10-04 21:12:22 +00:00
\fI \% DiskMonitor\fP
2018-09-12 22:23:38 +00:00
.IP \(bu 2
2018-10-05 23:19:00 +00:00
\fI \% NetdataMonitor\fP
2018-09-12 22:23:38 +00:00
.UNINDENT
.UNINDENT
.SS collector
.sp
Collectors are instances of any subclass of \fB Collector\fP ,
which itself is a subclass of \fB multiprocessing.Process\fP \& .
.sp
Every collector acts as one half of a \fI \% monitor\fP \- collector pair.
.sp
The collectors responsibility in this pair is to collect system usage
data and send them to its associated \fI \% monitor\fP \& .
2018-09-03 03:07:10 +00:00
.SS component
2018-08-30 01:56:27 +00:00
.sp
A string identifying a data source.
2018-09-03 03:07:10 +00:00
.INDENT 0 .0
.TP
.B Valid values are:
.INDENT 7 .0
.IP \(bu 2
\fB \(aq cpu\(aq \fP
.IP \(bu 2
\fB \(aq memory\(aq \fP
.IP \(bu 2
\fB \(aq network\(aq \fP
.IP \(bu 2
\fB \(aq battery\(aq \fP
.IP \(bu 2
\fB \(aq disk\(aq \fP
.UNINDENT
.UNINDENT
.sp
Besides that, \fB \(aq netdata\- <hostname>\(aq \fP is valid, but only if \fB <hostname>\fP
exists in the \fB NETDATA_HOSTS\fP configuration option.
.SS element
.sp
A string identifying a (sub) element of a data source.
2018-09-12 22:23:38 +00:00
Valid values are defined within the respective \fI \% Monitor\fP s.
2018-08-30 01:56:27 +00:00
.SS alignment
.INDENT 0 .0
.TP
2018-09-03 03:07:10 +00:00
.B A string in the shape of \fB <x\-align>_<y\-align>\fP, where:
2018-08-30 01:56:27 +00:00
.INDENT 7 .0
.IP \(bu 2
2018-09-03 03:07:10 +00:00
\fB <x\- align>\fP can be any of \fB left\fP , \fB center\fP , \fB right\fP
2018-08-30 01:56:27 +00:00
.IP \(bu 2
2018-09-03 03:07:10 +00:00
\fB <y\- align>\fP can be any of \fB top\fP , \fB center\fP , \fB bottom\fP
2018-08-30 01:56:27 +00:00
.UNINDENT
.UNINDENT
.sp
alignments are used both for text positioning relative to its respective
allowed borders as well as positioning captions within \fI \% Visualizer\fP s.
.SS caption description
.sp
A dictionary describing a caption to be rendered by a \fI \% Visualizer\fP \& .
.INDENT 0 .0
.TP
.B Required items:
.INDENT 7 .0
.IP \(bu 2
\fB text\fP : The text to be rendered
.UNINDENT
.TP
.B Optional items:
.INDENT 7 .0
.IP \(bu 2
\fB position\fP : Either an \fB (x,y)\fP coordinate tuple or an \fI \% alignment\fP
.IP \(bu 2
\fB align\fP : An \fI \% alignment\fP
.IP \(bu 2
\fB font_size\fP : A number (int or float) denoting vertical font size in pixels
.IP \(bu 2
\fB font_weight\fP : A string. \fB Normal\fP , \fB Bold\fP , \fB Light\fP , etc.
.IP \(bu 2
\fB operator\fP : One of cairos blending operators (See \fB cairo.Operator\fP )
.UNINDENT
.UNINDENT
.SS pattern
.sp
A function taking one \fI \% Color\fP as parameter returning a cairo surface for
use as fill. See \fB stripe45()\fP for an example.
.SS palette
.sp
A function taking one \fI \% Color\fP and one \fI int\fP parameter returning a
\fB list\fP of \fI \% Color\fP objects with its length being equal to the passed
\fI int\fP parameter.
2018-09-05 05:48:13 +00:00
.sp
\fB NOTE:\fP
.INDENT 0 .0
.INDENT 3 .5
\fI \% palette_hue()\fP and \fI \% palette_value()\fP have extra parameters
you won\(aq t be able to use without wrapping them in \fB functools.partial()\fP
first!
.UNINDENT
.UNINDENT
2018-08-30 01:56:27 +00:00
.SS combination
.sp
A string denoting how multiple \fI \% element\fP s are displayed within a \fI \% Visualizer\fP \& .
.INDENT 0 .0
.TP
.B Valid values are:
.INDENT 7 .0
.IP \(bu 2
\fB separate\fP : separate elements visually
.IP \(bu 2
\fB cumulative\fP : show values cumulatively, assume data is normalized for that (i.e. all values added max out at 1.0)
.IP \(bu 2
\fB cumulative_force\fP : like \fB cumulative\fP , but assumes every single value can go up to 1.0
.UNINDENT
.UNINDENT
2018-08-28 21:54:29 +00:00
.INDENT 0 .0
.TP
.B class gulik.Color(red=None, green=None, blue=None, alpha=None, hue=None, saturation=None, value=None)
Magic color class implementing and supplying on\- the\- fly manipulation of
RGB and HSV (and alpha) attributes.
.INDENT 7 .0
.TP
.B tuple_rgb()
return color (without alpha) as tuple, channels being float 0.0\- 1.0
.UNINDENT
.INDENT 7 .0
.TP
.B tuple_rgba()
return color (\fI with\fP alpha) as tuple, channels being float 0.0\- 1.0
.UNINDENT
.UNINDENT
.INDENT 0 .0
.TP
.B class gulik.DotDict
A dictionary with its data being readable through faked attributes.
Used to avoid [[[][][][][]] in caption formatting.
.UNINDENT
.INDENT 0 .0
.TP
2018-09-05 05:48:13 +00:00
.B gulik.palette_hue(base, count, distance=180)
Creates a hue\- rotation palette.
.INDENT 7 .0
.TP
.B Parameters
.INDENT 7 .0
.IP \(bu 2
\fB base\fP (\fI \% Color\fP ) \- \- Color on which the palette will be based (i.e. the starting point of the hue\- rotation).
.IP \(bu 2
\fB count\fP (\fI int\fP ) \- \- number of colors the palette should hold.
.IP \(bu 2
\fB distance\fP (\fI int\fP \fI or \fP \fI float\fP ) \- \- angular distance on a 360° hue circle thingamabob.
.UNINDENT
.TP
.B Returns
A list of length \fB count\fP of \fI \% Color\fP objects.
.TP
.B Return type
list
.UNINDENT
.UNINDENT
.INDENT 0 .0
.TP
.B gulik.palette_value(base, count, min=None, max=None)
Creates a value\- stepped palette
.INDENT 7 .0
.TP
.B Parameters
.INDENT 7 .0
.IP \(bu 2
\fB base\fP (\fI \% Color\fP ) \- \- Color on which the palette will be based (i.e. source of hue and saturation)
.IP \(bu 2
\fB count\fP (\fI int\fP ) \- \- number of colors the palette should hold
.IP \(bu 2
\fB min\fP (\fI float >= 0 and <= 1\fP ) \- \- minimum value (the v in hsv)
.IP \(bu 2
\fB max\fP (\fI float >= 0 and <= 1\fP ) \- \- maximum value
.UNINDENT
.TP
.B Returns
A list of length \fB count\fP of \fI \% Color\fP objects.
.TP
.B Return type
list
.UNINDENT
.UNINDENT
.INDENT 0 .0
.TP
.B gulik.pretty_si(number)
Return a SI\- postfixed string representation of a number (int or float).
.UNINDENT
.INDENT 0 .0
.TP
.B gulik.pretty_bytes(bytecount)
Return a human\- readable representation given a size in bytes.
.UNINDENT
.INDENT 0 .0
.TP
.B gulik.pretty_bits(bytecount)
Return a human\- readable representation in bits given a size in bytes.
.UNINDENT
.INDENT 0 .0
.TP
.B gulik.ignore_none(*args)
Return the first passed value that isn\(aq t \fB None\fP \& .
2018-08-28 21:54:29 +00:00
.UNINDENT
.INDENT 0 .0
.TP
2018-09-12 22:23:38 +00:00
.B class gulik.Monitor(app, component)
The base class for all \fI \% monitor\fP s.
.UNINDENT
.INDENT 0 .0
.TP
2018-09-28 07:42:24 +00:00
.B class gulik.CPUMonitor(app, component)
Memory for CPU usage.
.INDENT 7 .0
.TP
.B normalize(element)
.INDENT 7 .0
.TP
.B Elements exposed:
.INDENT 7 .0
.IP \(bu 2
\fB aggregate\fP : average cpu use, sum of all core loads divided by number of cores
.IP \(bu 2
\fB core_<n>\fP : load of core \fB <n>\fP , with possible values of \fB <n>\fP being 0 to number of cores \- 1
.UNINDENT
.UNINDENT
.UNINDENT
.INDENT 7 .0
.TP
.B caption(fmt)
.INDENT 7 .0
.TP
2018-10-04 21:12:22 +00:00
.B Exposed keys:
2018-09-28 07:42:24 +00:00
.INDENT 7 .0
.IP \(bu 2
\fB aggregate\fP : average cpu use, sum of all core loads divided by number of cores
.IP \(bu 2
\fB core_<n>\fP : load of core \fB <n>\fP , with possible values of \fB <n>\fP being 0 to number of cores \- 1
.IP \(bu 2
\fB count\fP : number of cores
.UNINDENT
.UNINDENT
.UNINDENT
.UNINDENT
.INDENT 0 .0
.TP
.B class gulik.MemoryMonitor(app, component)
Monitor for memory usage
.INDENT 7 .0
.TP
.B normalize(element)
.INDENT 7 .0
.TP
.B Elements exposed:
.INDENT 7 .0
.IP \(bu 2
\fB percent\fP : memory use of all processes.
.IP \(bu 2
\fB top_<n>\fP : memory use of the \fB <n>\fP h\- biggest process. Valid values of \fB <n>\fP are 1\- 3.
.IP \(bu 2
\fB other\fP : memory use of all processes except the top 3
.UNINDENT
.UNINDENT
.UNINDENT
.INDENT 7 .0
.TP
.B caption(fmt)
.INDENT 7 .0
.TP
2018-10-04 21:12:22 +00:00
.B Exposed keys:
2018-09-28 07:42:24 +00:00
.INDENT 7 .0
.IP \(bu 2
\fB total\fP : how much memory this machine has in total,
.IP \(bu 2
\fB percent\fP : total memory usage in percent.
.IP \(bu 2
\fB available\fP : how much memory can be malloc\(aq d without going into swap (roughly).
.IP \(bu 2
\fB top_<n>\fP : access information about the 3 "biggest" processes. possible subkeys are \fB name\fP , \fB size\fP and \fB percent\fP \& .
.IP \(bu 2
\fB other\fP : aggregate information for all processes \fI except\fP the top 3. Same subkeys as those, plus \fB \(aq count\fP \& .
.UNINDENT
.UNINDENT
.UNINDENT
.UNINDENT
.INDENT 0 .0
.TP
.B class gulik.NetworkMonitor(app, component)
Monitor for network interfaces.
.INDENT 7 .0
.TP
.B count_sec(interface, key)
get a specified count for a given interface
as calculated for the last second.
.sp
2018-10-02 22:37:00 +00:00
EXAMPLE: \fB self.count_sec(\(aq eth0\(aq , \(aq bytes_sent\(aq )\fP
2018-09-28 07:42:24 +00:00
(will return count of bytes sent in the last second)
.UNINDENT
.INDENT 7 .0
.TP
.B normalize(element)
.INDENT 7 .0
.TP
.B Exposed elements:
.INDENT 7 .0
.IP \(bu 2
\fB <if>.bytes_sent\fP : upload of network interface \fB <if>\fP \& .
.IP \(bu 2
\fB <if>.bytes_recv\fP : download of network interface \fB <if>\fP \& .
.UNINDENT
.UNINDENT
.sp
\fI <if>\fP can be any local network interface as well as \fI \(aq aggregate\(aq \fP \& .
.UNINDENT
2018-10-02 22:37:00 +00:00
.INDENT 7 .0
.TP
.B caption(fmt)
.INDENT 7 .0
.TP
.B Exposed keys:
.INDENT 7 .0
.IP \(bu 2
\fB <if>.bytes_sent\fP : upload of network interface \fB <if>\fP \& .
.IP \(bu 2
\fB <if>.bytes_recv\fP : download of network interface \fB <if>\fP \& .
.IP \(bu 2
\fB <if>.if_up\fP : Boolean, whether the interface is up.
.IP \(bu 2
\fB <if>.speed\fP : interface speed in Mbit/s
.IP \(bu 2
.INDENT 2 .0
.TP
.B \fB <if>.counters\fP: supplies access to interface counters. Possible sub\-elements are:
.INDENT 7 .0
.IP \(bu 2
\fB bytes_sent\fP
.IP \(bu 2
\fB bytes_recv\fP
.IP \(bu 2
\fB packets_sent\fP
.IP \(bu 2
\fB packets_recv\fP
.IP \(bu 2
\fB errin\fP
.IP \(bu 2
\fB errout\fP
.IP \(bu 2
\fB dropin\fP
.IP \(bu 2
\fB dropout\fP
.UNINDENT
.UNINDENT
.UNINDENT
.UNINDENT
.sp
\fI <if>\fP can be any local network interface as well as \fB \(aq aggregate\(aq \fP \& .
.sp
Additionally, the \fB \(aq aggregate\(aq \fP interface exposes the total
count of network interfaces as \fB if_count\fP \& .
.UNINDENT
.UNINDENT
.INDENT 0 .0
.TP
.B class gulik.BatteryMonitor(app, component)
Monitor laptop batteries.
.INDENT 7 .0
.TP
.B normalize(element)
This function exposes no explicit elements, but always just returns
the current fill of the battery.
.UNINDENT
.INDENT 7 .0
.TP
.B caption(fmt)
.INDENT 7 .0
.TP
.B Exposed keys:
.INDENT 7 .0
.IP \(bu 2
\fB power_plugged\fP : Boolean, whether the AC cable is connected.
.IP \(bu 2
\fB percent\fP : current fill of the battery in percent.
.IP \(bu 2
\fB secsleft\fP : seconds left till battery is completely drained.
.IP \(bu 2
\fB state\fP : Current state of the battery, one of \fB \(aq full\(aq \fP , \fB \(aq charging\(aq \fP or \fB \(aq draining\(aq \fP \& .
.UNINDENT
.UNINDENT
.UNINDENT
2018-09-28 07:42:24 +00:00
.UNINDENT
.INDENT 0 .0
.TP
2018-10-04 21:12:22 +00:00
.B class gulik.DiskMonitor(*args, **kwargs)
Monitors disk I/O and partitions.
.INDENT 7 .0
.TP
.B normalize(element)
.INDENT 7 .0
.TP
.B Elements exposed:
.INDENT 7 .0
.IP \(bu 2
.INDENT 2 .0
.TP
.B \fB io\fP
.INDENT 7 .0
.IP \(bu 2
Valid subelements are disk device file names as found in
\fB /dev\fP \& . Examples: \fB ada0\fP , \fB sda\fP \& .
.INDENT 2 .0
.TP
.B Valid subsubelements are as follows:
.INDENT 7 .0
.IP \(bu 2
\fB read_bytes\fP
.IP \(bu 2
\fB write_bytes\fP
.IP \(bu 2
\fB read_time\fP
.IP \(bu 2
\fB write_time\fP
.IP \(bu 2
\fB busy_time\fP
.UNINDENT
.UNINDENT
.UNINDENT
.UNINDENT
.IP \(bu 2
.INDENT 2 .0
.TP
.B \fB partitions\fP
.INDENT 7 .0
.IP \(bu 2
Valid subelements are partition device file names as
found in \fB /dev\fP , with dots (\fB \& .\fP ) being replaced
with dashes (\fB \- \fP ). Examples: \fB root\- eli\fP , \fB sda1\fP \& .
.UNINDENT
.UNINDENT
.UNINDENT
.UNINDENT
.UNINDENT
.INDENT 7 .0
.TP
.B caption(fmt)
Exposed keys are the same as for \fI \% DiskMonitor.normalize()\fP \& .
.UNINDENT
.UNINDENT
.INDENT 0 .0
.TP
2018-10-05 23:19:00 +00:00
.B class gulik.NetdataMonitor(app, component, host, port)
Monitor that interfaces with (remote) netdata instances.
.INDENT 7 .0
.TP
.B normalize(element)
Exposed elements correspond to \fI chart names\fP and their datapoint
.nf
*
.fi
dimension*s. For a list of valid chart and dimensions names, consult
\fB /api/v1/charts\fP of the netdata instance in question.
Examples.INDENT 7.0
.IP \(bu 2
\fB system.cpu.nice\fP
.IP \(bu 2
\fB disk.ada0.writes\fP
.UNINDENT
.UNINDENT
.INDENT 7 .0
.TP
.B caption(fmt)
Exposed keys are the same as for \fI \% NetdataMonitor.normalize()\fP \& .
.UNINDENT
.UNINDENT
.INDENT 0 .0
.TP
2018-08-30 01:56:27 +00:00
.B class gulik.Visualizer(app, monitor, x=0, y=0, width=None, height=None, margin=None, margin_left=None, margin_right=None, margin_top=None, margin_bottom=None, padding=None, padding_left=None, padding_right=None, padding_top=None, padding_bottom=None, elements=None, captions=None, caption_placement=None, legend=None, legend_order=None, legend_format=None, legend_size=None, legend_placement=None, legend_margin=None, legend_margin_left=None, legend_margin_right=None, legend_margin_top=None, legend_margin_bottom=None, legend_padding=None, legend_padding_left=None, legend_padding_right=None, legend_padding_top=None, legend_padding_bottom=None, foreground=None, background=None, pattern=None, palette=None, combination=None, operator=None)
The base class for all visualizers. Not called widget to avoid naming
2018-09-05 05:48:13 +00:00
confusion with gtk widgets (which aren\(aq t even used in gulik).
2018-08-30 01:56:27 +00:00
.sp
2018-09-05 05:48:13 +00:00
Usually you won\(aq t instantiate this by yourself but use \fI \% Box.place()\fP \& .
2018-08-30 01:56:27 +00:00
.INDENT 7 .0
.TP
.B Parameters
.INDENT 7 .0
.IP \(bu 2
2018-09-05 05:48:13 +00:00
\fB app\fP (\fI \% Gulik\fP ) \- \- The app managing visualizers and monitors
2018-08-30 01:56:27 +00:00
.IP \(bu 2
2018-09-12 22:23:38 +00:00
\fB monitor\fP (\fI \% Monitor\fP ) \- \- The monitor managing data collection for this visualizer
2018-08-30 01:56:27 +00:00
.IP \(bu 2
2018-09-05 05:48:13 +00:00
\fB x\fP (\fI int\fP ) \- \- leftmost coordinate on the x\- axis
2018-08-30 01:56:27 +00:00
.IP \(bu 2
2018-09-05 05:48:13 +00:00
\fB y\fP (\fI int\fP ) \- \- topmost coordinate on the y\- axis
2018-08-30 01:56:27 +00:00
.IP \(bu 2
2018-09-05 05:48:13 +00:00
\fB width\fP (\fI int\fP ) \- \- overall width (including \fB margin\fP and \fB padding\fP )
2018-08-30 01:56:27 +00:00
.IP \(bu 2
2018-09-05 05:48:13 +00:00
\fB height\fP (\fI int\fP ) \- \- overall height (including \fB margin\fP and \fB padding\fP )
2018-08-30 01:56:27 +00:00
.IP \(bu 2
2018-09-05 05:48:13 +00:00
\fB margin\fP (\fI int\fP \fI , \fP \fI optional\fP ) \- \- margin applied around all sides
2018-08-30 01:56:27 +00:00
.IP \(bu 2
2018-09-05 05:48:13 +00:00
\fB margin_left\fP (\fI int\fP \fI , \fP \fI optional\fP ) \- \- margin applied to the left side
2018-08-30 01:56:27 +00:00
.IP \(bu 2
2018-09-05 05:48:13 +00:00
\fB margin_right\fP (\fI int\fP \fI , \fP \fI optional\fP ) \- \- margin applied to the right side
2018-08-30 01:56:27 +00:00
.IP \(bu 2
2018-09-05 05:48:13 +00:00
\fB margin_top\fP (\fI int\fP \fI , \fP \fI optional\fP ) \- \- margin applied to the top side
2018-08-30 01:56:27 +00:00
.IP \(bu 2
2018-09-05 05:48:13 +00:00
\fB margin_bottom\fP (\fI int\fP \fI , \fP \fI optional\fP ) \- \- margin applied to the bottom side
2018-08-30 01:56:27 +00:00
.IP \(bu 2
2018-09-05 05:48:13 +00:00
\fB padding\fP (\fI int\fP \fI , \fP \fI optional\fP ) \- \- padding applied around all sides
2018-08-30 01:56:27 +00:00
.IP \(bu 2
2018-09-05 05:48:13 +00:00
\fB padding_left\fP (\fI int\fP \fI , \fP \fI optional\fP ) \- \- padding applied to the left side
2018-08-30 01:56:27 +00:00
.IP \(bu 2
2018-09-05 05:48:13 +00:00
\fB padding_right\fP (\fI int\fP \fI , \fP \fI optional\fP ) \- \- padding applied to the right side
2018-08-30 01:56:27 +00:00
.IP \(bu 2
2018-09-05 05:48:13 +00:00
\fB padding_top\fP (\fI int\fP \fI , \fP \fI optional\fP ) \- \- padding applied to the top side
2018-08-30 01:56:27 +00:00
.IP \(bu 2
2018-09-05 05:48:13 +00:00
\fB padding_bottom\fP (\fI int\fP \fI , \fP \fI optional\fP ) \- \- padding applied to the bottom side
2018-08-30 01:56:27 +00:00
.IP \(bu 2
2018-09-05 05:48:13 +00:00
\fB elements\fP (\fI list of str\fP ) \- \- A list of \fI \% element\fP s to visualize
2018-08-30 01:56:27 +00:00
.IP \(bu 2
2018-09-05 05:48:13 +00:00
\fB captions\fP (\fI list of dict\fP \fI , \fP \fI optional\fP ) \- \- A list of \fI \% caption descriptions\fP
2018-08-30 01:56:27 +00:00
.IP \(bu 2
2018-09-05 05:48:13 +00:00
\fB legend\fP (\fI bool\fP ) \- \- Whether to try to automatically create a legend of elements
2018-08-30 01:56:27 +00:00
.IP \(bu 2
2018-09-05 05:48:13 +00:00
\fB legend_order\fP (\fI \(aq normal\(aq \fP \fI or \fP \fI \(aq reverse\(aq \fP \fI , \fP \fI optional\fP ) \- \- Whether to reverse the legend order
2018-08-30 01:56:27 +00:00
.IP \(bu 2
2018-09-05 05:48:13 +00:00
\fB legend_format\fP (\fI str\fP ) \- \- A format string, can contain \fB {element}\fP to refer to the element legend items refer to.
2018-08-30 01:56:27 +00:00
.IP \(bu 2
2018-09-05 05:48:13 +00:00
\fB legend_size\fP (\fI int\fP \fI , \fP \fI optional\fP ) \- \- height of a single legend item
2018-08-30 01:56:27 +00:00
.IP \(bu 2
2018-09-05 05:48:13 +00:00
\fB legend_placement\fP (\fI \(aq padding\(aq \fP \fI or \fP \fI \(aq inner\(aq \fP ) \- \- Where to place the legend
2018-08-30 01:56:27 +00:00
.IP \(bu 2
2018-09-05 05:48:13 +00:00
\fB legend_margin\fP (\fI int\fP \fI , \fP \fI optional\fP ) \- \- margin applied around all sides of the legend
2018-08-30 01:56:27 +00:00
.IP \(bu 2
2018-09-05 05:48:13 +00:00
\fB legend_margin_left\fP (\fI int\fP \fI , \fP \fI optional\fP ) \- \- margin applied to the left side of the legend
2018-08-30 01:56:27 +00:00
.IP \(bu 2
2018-09-05 05:48:13 +00:00
\fB legend_margin_right\fP (\fI int\fP \fI , \fP \fI optional\fP ) \- \- margin applied to the right side of the legend
2018-08-30 01:56:27 +00:00
.IP \(bu 2
2018-09-05 05:48:13 +00:00
\fB legend_margin_top\fP (\fI int\fP \fI , \fP \fI optional\fP ) \- \- margin applied to the top side of the legend
2018-08-30 01:56:27 +00:00
.IP \(bu 2
2018-09-05 05:48:13 +00:00
\fB legend_margin_bottom\fP (\fI int\fP \fI , \fP \fI optional\fP ) \- \- margin applied to the bottom side of the legend
2018-08-30 01:56:27 +00:00
.IP \(bu 2
2018-09-05 05:48:13 +00:00
\fB legend_padding\fP (\fI int\fP \fI , \fP \fI optional\fP ) \- \- padding applied around all sides of the legend
2018-08-30 01:56:27 +00:00
.IP \(bu 2
2018-09-05 05:48:13 +00:00
\fB legend_padding_left\fP (\fI int\fP \fI , \fP \fI optional\fP ) \- \- padding applied to the left side of the legend
2018-08-30 01:56:27 +00:00
.IP \(bu 2
2018-09-05 05:48:13 +00:00
\fB legend_padding_right\fP (\fI int\fP \fI , \fP \fI optional\fP ) \- \- padding applied to the right side of the legend
2018-08-30 01:56:27 +00:00
.IP \(bu 2
2018-09-05 05:48:13 +00:00
\fB legend_padding_top\fP (\fI int\fP \fI , \fP \fI optional\fP ) \- \- padding applied to the top side of the legend
2018-08-30 01:56:27 +00:00
.IP \(bu 2
2018-09-05 05:48:13 +00:00
\fB legend_padding_bottom\fP (\fI int\fP \fI , \fP \fI optional\fP ) \- \- padding applied to the bottom side of the legend
2018-08-30 01:56:27 +00:00
.IP \(bu 2
2018-09-05 05:48:13 +00:00
\fB foreground\fP (\fI \% Color\fP , optional) \- \- The foreground color, base\- color for generated palettes
2018-08-30 01:56:27 +00:00
.IP \(bu 2
2018-09-05 05:48:13 +00:00
\fB background\fP (\fI \% Color\fP , optional) \- \- The background color
2018-08-30 01:56:27 +00:00
.IP \(bu 2
2018-09-05 05:48:13 +00:00
\fB pattern\fP (\fI function\fP \fI , \fP \fI optional\fP ) \- \- An executable \fI \% pattern\fP
2018-08-30 01:56:27 +00:00
.IP \(bu 2
2018-09-05 05:48:13 +00:00
\fB palette\fP (\fI function\fP \fI , \fP \fI optional\fP ) \- \- An executable \fI \% palette\fP
2018-08-30 01:56:27 +00:00
.IP \(bu 2
2018-09-05 05:48:13 +00:00
\fB combination\fP (\fI str\fP \fI , \fP \fI optional\fP ) \- \- The \fI \% combination\fP mode used when displaying multiple \fI \% element\fP s
2018-08-30 01:56:27 +00:00
.UNINDENT
.UNINDENT
.INDENT 7 .0
.TP
.B get_style(name, subname=None)
load the most specific style setting available given a name and optional subname.
2018-09-05 05:48:13 +00:00
usage examples: self.get_style(\(aq margin\(aq , \(aq left\(aq ),
2018-08-30 01:56:27 +00:00
.UNINDENT
.INDENT 7 .0
.TP
.B legend_info()
defines colors for legend elements
.UNINDENT
.INDENT 7 .0
.TP
.B update(context)
.INDENT 7 .0
.TP
.B Parameters
2018-09-05 05:48:13 +00:00
\fB context\fP (\fB cairo.Context\fP ) \- \- cairo context of the window
2018-08-30 01:56:27 +00:00
.UNINDENT
.UNINDENT
.UNINDENT
.INDENT 0 .0
.TP
2018-10-05 23:19:00 +00:00
.B class gulik.Text(app, monitor, text, speed=25, align=None, **kwargs)
Scrollable text using monitors\(aq \fB caption\fP function to give textual
representations of values, prettified where necessary.
.UNINDENT
.INDENT 0 .0
.TP
2018-09-05 05:48:13 +00:00
.B class gulik.Rect(app, monitor, x=0, y=0, width=None, height=None, margin=None, margin_left=None, margin_right=None, margin_top=None, margin_bottom=None, padding=None, padding_left=None, padding_right=None, padding_top=None, padding_bottom=None, elements=None, captions=None, caption_placement=None, legend=None, legend_order=None, legend_format=None, legend_size=None, legend_placement=None, legend_margin=None, legend_margin_left=None, legend_margin_right=None, legend_margin_top=None, legend_margin_bottom=None, legend_padding=None, legend_padding_left=None, legend_padding_right=None, legend_padding_top=None, legend_padding_bottom=None, foreground=None, background=None, pattern=None, palette=None, combination=None, operator=None)
[image]
2018-08-28 21:54:29 +00:00
.UNINDENT
.INDENT 0 .0
.TP
2018-10-05 23:19:00 +00:00
.B class gulik.MirrorRect(app, monitor, **kwargs)
Mirrored variant of \fI \% Rect\fP \& .
.INDENT 7 .0
.TP
.B legend_info()
defines colors for legend elements
.UNINDENT
.UNINDENT
.INDENT 0 .0
.TP
2018-09-05 05:48:13 +00:00
.B class gulik.Arc(app, monitor, stroke_width=5, **kwargs)
[image]
2018-08-28 21:54:29 +00:00
.INDENT 7 .0
.TP
.B Parameters
2018-09-05 05:48:13 +00:00
\fB stroke_width\fP (\fI int\fP ) \- \- width of the arc in pixels.
.UNINDENT
.UNINDENT
.INDENT 0 .0
.TP
2018-10-05 23:19:00 +00:00
.B class gulik.MirrorArc(app, monitor, **kwargs)
Mirrored variant of \fI \% Arc\fP \& .
.UNINDENT
.INDENT 0 .0
.TP
2018-09-05 05:48:13 +00:00
.B class gulik.Plot(app, monitor, num_points=None, autoscale=None, markers=None, line=None, grid=None, **kwargs)
[image]
2018-08-28 21:54:29 +00:00
.INDENT 7 .0
2018-09-05 05:48:13 +00:00
.TP
.B Parameters
.INDENT 7 .0
.IP \(bu 2
\fB num_points\fP (\fI int\fP \fI , \fP \fI optional\fP ) \- \- The number of datapoints to show.
.IP \(bu 2
\fB autoscale\fP (\fI bool\fP \fI , \fP \fI optional\fP ) \- \- Whether to automatically "zoom" into the data.
2018-08-28 21:54:29 +00:00
.IP \(bu 2
2018-09-05 05:48:13 +00:00
\fB markers\fP (\fI bool\fP \fI , \fP \fI optional\fP ) \- \- Whether tho render markers at data point coordinates.
2018-08-28 21:54:29 +00:00
.IP \(bu 2
2018-09-05 05:48:13 +00:00
\fB line\fP (\fI bool\fP \fI , \fP \fI optional\fP ) \- \- Whether to draw a line.
2018-08-28 21:54:29 +00:00
.IP \(bu 2
2018-09-05 05:48:13 +00:00
\fB grid\fP (\fI bool\fP \fI , \fP \fI optional\fP ) \- \- Whether to draw a grid. The grid automatically adapts if \fB autoscale\fP is \fB True\fP \& .
.IP \(bu 2
\fB **kwargs\fP \- \- passed on to \fI \% Visualizer\fP \& .
2018-08-28 21:54:29 +00:00
.UNINDENT
.UNINDENT
.UNINDENT
.INDENT 0 .0
.TP
2018-10-05 23:19:00 +00:00
.B class gulik.MirrorPlot(app, monitor, scale_lock=True, **kwargs)
Mirrored variant of \fI \% Plot\fP \& .
.UNINDENT
.INDENT 0 .0
.TP
2018-09-05 05:48:13 +00:00
.B class gulik.Box(app, x, y, width, height)
Can wrap multiple \fI \% Visualizer\fP s, used for layouting.
Orders added visualizers from left to right and top to bottom.
2018-09-07 02:13:39 +00:00
.sp
This is basically a smart helper for \fB Gulik.add_visualizer()\fP \& .
2018-09-05 05:48:13 +00:00
.INDENT 7 .0
.TP
.B place(component, cls, **kwargs)
place a new \fI \% Visualizer\fP \& .
2018-08-28 21:54:29 +00:00
.INDENT 7 .0
.TP
.B Parameters
.INDENT 7 .0
.IP \(bu 2
2018-09-05 05:48:13 +00:00
\fB component\fP (\fI str\fP ) \- \- The \fI \% component\fP string identifying the data source.
2018-08-28 21:54:29 +00:00
.IP \(bu 2
2018-09-05 05:48:13 +00:00
\fB cls\fP (\fB type\fP , child of \fI \% Visualizer\fP ) \- \- The visualizer class to instantiate.
2018-08-28 21:54:29 +00:00
.IP \(bu 2
2018-09-05 05:48:13 +00:00
\fB **kwargs\fP \- \- passed on to \fB cls\fP \(aq constructor. width and height defined in here are honored.
2018-08-28 21:54:29 +00:00
.UNINDENT
.UNINDENT
.UNINDENT
.UNINDENT
.INDENT 0 .0
.TP
2018-09-05 05:48:13 +00:00
.B class gulik.Gulik(configpath)
The main object thingamabob.
2018-08-28 21:54:29 +00:00
.UNINDENT
.INDENT 0 .0
.IP \(bu 2
genindex
.IP \(bu 2
search
.UNINDENT
.SH AUTHOR
phryk
.SH COPYRIGHT
2018-09-01 05:57:53 +00:00
YOLD 3184, phryk
2018-08-28 21:54:29 +00:00
. \" Generated by docutils manpage writer.
.