mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-12-26 04:17:33 +00:00
cleaned up portmon docs
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky@369 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
parent
226d258790
commit
ba536a86a7
168
README
168
README
@ -4,16 +4,16 @@ conky(1) conky(1)
|
||||
|
||||
NAME
|
||||
conky - A system monitor for X originally based on the torsmo code, but
|
||||
more kickass. It just keeps on given'er. Yeah.
|
||||
more kickass. It just keeps on given’er. Yeah.
|
||||
|
||||
SYNOPSIS
|
||||
conky [options]
|
||||
|
||||
DESCRIPTION
|
||||
Conky is a system monitor for X originally based on the torsmo code.
|
||||
Since it's original conception, Conky has changed a fair bit from it's
|
||||
Since it’s original conception, Conky has changed a fair bit from it’s
|
||||
predecessor. Conky can display just about anything, either on your
|
||||
root desktop or in it's own window. Conky has many built-in objects,
|
||||
root desktop or in it’s own window. Conky has many built-in objects,
|
||||
as well as the ability to execute programs and scripts, then display
|
||||
the output from stdout.
|
||||
|
||||
@ -28,11 +28,11 @@ COMPILING
|
||||
libraries installed. This should be a package along the lines of
|
||||
"libx11-dev or xorg-x11-dev".
|
||||
|
||||
Gentoo users -- Conky is in Gentoo's Portage... simply use "emerge app-
|
||||
Gentoo users -- Conky is in Gentoo’s Portage... simply use "emerge app-
|
||||
admin/conky" for installation. There is also usually an up-to-date
|
||||
ebuild within Conky's package or in CVS.
|
||||
ebuild within Conky’s package or in CVS.
|
||||
|
||||
Debian,etc. users -- Conky will be in Debian's repositories soon (by
|
||||
Debian,etc. users -- Conky will be in Debian’s repositories soon (by
|
||||
mid-September, hopefully), and then Ubuntu shortly thereafter. Until
|
||||
then, "dpkg -i" the .deb package to install.
|
||||
|
||||
@ -51,14 +51,14 @@ COMPILING
|
||||
|
||||
src/conky
|
||||
|
||||
Conky probably doesn't compile with compilers other than gcc and icc.
|
||||
It doesn't compile with C89 compiler and not even with pure C99. It
|
||||
uses a few things that might not exist: strdup(), strcasecmp(), strn-
|
||||
Conky probably doesn’t compile with compilers other than gcc and icc.
|
||||
It doesn’t compile with C89 compiler and not even with pure C99. It
|
||||
uses a few things that might not exist: strdup(), strcasecmp(), strn‐
|
||||
casecmp(), optarg variable with getopt() and long long (not in C89).
|
||||
Crashes in file system statistics stuff when compiled with icc, I don't
|
||||
Crashes in file system statistics stuff when compiled with icc, I don’t
|
||||
know exactly why.
|
||||
|
||||
You can disable 'drawing to own window' feature in case you don't need
|
||||
You can disable ’drawing to own window’ feature in case you don’t need
|
||||
it by passing --disable-own-window to configure -script.
|
||||
|
||||
|
||||
@ -69,14 +69,14 @@ YOU SHOULD KNOW
|
||||
rest of Conky.
|
||||
|
||||
If you do use them, please do not complain about memory or CPU usage,
|
||||
unless you think something's seriously wrong (mem leak, etc.).
|
||||
unless you think something’s seriously wrong (mem leak, etc.).
|
||||
|
||||
An easy way to force Conky to reload your ~/.conkyrc: "killall -SIGUSR1
|
||||
conky". Saves you the trouble of having to kill and then restart.
|
||||
|
||||
IMPORTANT: For previous Conky users, Conky 1.3 no longer supports the
|
||||
metar stuff. mdsplib was causing way too many problems. Hopefully
|
||||
there'll be a better solution in Conky 2.x...
|
||||
there’ll be a better solution in Conky 2.x...
|
||||
|
||||
OPTIONS
|
||||
Command line options override configurations defined in configuration
|
||||
@ -111,7 +111,7 @@ OPTIONS
|
||||
|
||||
|
||||
-t TEXT
|
||||
Text to render, remember single quotes, like -t ' $uptime '
|
||||
Text to render, remember single quotes, like -t ’ $uptime ’
|
||||
|
||||
|
||||
-u SECONDS
|
||||
@ -133,14 +133,14 @@ OPTIONS
|
||||
CONFIGURATION SETTINGS
|
||||
Default configuration file is $HOME/.conkyrc (can be changed from
|
||||
conky.c among other things). See conkyrc.sample. If installing from
|
||||
Debian package, this should be in /usr/share/doc/conky/examples ("gun-
|
||||
Debian package, this should be in /usr/share/doc/conky/examples ("gun‐
|
||||
zip conkyrc.sample.gz" to get conkyrc.sample).
|
||||
|
||||
You might want to copy it to $HOME/.conkyrc and then start modifying
|
||||
it. Other configs can be found at http://conky.sf.net
|
||||
|
||||
alignment
|
||||
Aligned position on screen, may be top_left, top_right, bot-
|
||||
Aligned position on screen, may be top_left, top_right, bot‐
|
||||
tom_left, bottom_right, or none
|
||||
|
||||
|
||||
@ -170,7 +170,7 @@ CONFIGURATION SETTINGS
|
||||
|
||||
|
||||
default_shade_color
|
||||
Default shading color and border's shading color
|
||||
Default shading color and border’s shading color
|
||||
|
||||
|
||||
default_outline_color
|
||||
@ -178,8 +178,8 @@ CONFIGURATION SETTINGS
|
||||
|
||||
|
||||
double_buffer
|
||||
Use the Xdbe extension? (eliminates flicker) It is highly recom-
|
||||
mended to use own window with this one so double buffer won't be
|
||||
Use the Xdbe extension? (eliminates flicker) It is highly recom‐
|
||||
mended to use own window with this one so double buffer won’t be
|
||||
so big.
|
||||
|
||||
|
||||
@ -309,7 +309,7 @@ CONFIGURATION SETTINGS
|
||||
VARIABLES
|
||||
Colors are parsed using XParsecolor(), there might be a list of them:
|
||||
/usr/X11R6/lib/X11/rgb.txt. Also, http://sedition.com/perl/rgb.html
|
||||
[http://sedition.com/perl/rgb.html]. Color can be also in #rrggbb for-
|
||||
[http://sedition.com/perl/rgb.html]. Color can be also in #rrggbb for‐
|
||||
mat (hex). Note that when displaying bytes, power is 1024 and not 1000
|
||||
so 1M really means 1024*1024 bytes and not 1000*1000.
|
||||
|
||||
@ -385,7 +385,7 @@ VARIABLES
|
||||
|
||||
|
||||
cpubar (cpu number) (height),(width)
|
||||
Bar that shows CPU usage, height is bar's height in pixels. See
|
||||
Bar that shows CPU usage, height is bar’s height in pixels. See
|
||||
$cpu for more info on SMP.
|
||||
|
||||
|
||||
@ -422,8 +422,8 @@ VARIABLES
|
||||
|
||||
|
||||
exec command
|
||||
Executes a shell command and displays the output in conky. warn-
|
||||
ing: this takes a lot more resources than other variables. I'd
|
||||
Executes a shell command and displays the output in conky. warn‐
|
||||
ing: this takes a lot more resources than other variables. I’d
|
||||
recommend coding wanted behaviour in C and posting a patch.
|
||||
|
||||
|
||||
@ -438,7 +438,7 @@ VARIABLES
|
||||
|
||||
|
||||
execi interval command
|
||||
Same as exec but with specific interval. Interval can't be less
|
||||
Same as exec but with specific interval. Interval can’t be less
|
||||
than update_interval in configuration. See also $texeci
|
||||
|
||||
|
||||
@ -495,7 +495,7 @@ VARIABLES
|
||||
|
||||
head logfile lines (interval)
|
||||
Displays first N lines of supplied text text file. If interval
|
||||
is not supplied, Conky assumes 2x Conky's interval. Max of 30
|
||||
is not supplied, Conky assumes 2x Conky’s interval. Max of 30
|
||||
lines can be displayed, or until the text buffer is filled.
|
||||
|
||||
|
||||
@ -540,7 +540,7 @@ VARIABLES
|
||||
|
||||
i8k_left_fan_rpm
|
||||
If running the i8k kernel driver for Inspiron laptops, displays
|
||||
the left fan's rate of rotation, in revolutions per minute as
|
||||
the left fan’s rate of rotation, in revolutions per minute as
|
||||
listed in /proc/i8k. Beware, some laptops i8k reports these fans
|
||||
in reverse order.
|
||||
|
||||
@ -554,7 +554,7 @@ VARIABLES
|
||||
|
||||
i8k_right_fan_rpm
|
||||
If running the i8k kernel driver for Inspiron laptops, displays
|
||||
the right fan's rate of rotation, in revolutions per minute as
|
||||
the right fan’s rate of rotation, in revolutions per minute as
|
||||
listed in /proc/i8k. Beware, some laptops i8k reports these fans
|
||||
in reverse order.
|
||||
|
||||
@ -675,7 +675,7 @@ VARIABLES
|
||||
|
||||
|
||||
mpd_bar (height),(width)
|
||||
Bar of mpd's progress
|
||||
Bar of mpd’s progress
|
||||
|
||||
|
||||
mpd_bitrate
|
||||
@ -691,19 +691,19 @@ VARIABLES
|
||||
|
||||
|
||||
mpd_vol
|
||||
MPD's volume
|
||||
MPD’s volume
|
||||
|
||||
|
||||
mpd_elapsed
|
||||
Song's elapsed time
|
||||
Song’s elapsed time
|
||||
|
||||
|
||||
mpd_length
|
||||
Song's length
|
||||
Song’s length
|
||||
|
||||
|
||||
mpd_percent
|
||||
Percent of song's progress
|
||||
Percent of song’s progress
|
||||
|
||||
|
||||
mpd_random
|
||||
@ -770,13 +770,63 @@ VARIABLES
|
||||
System name, Linux for example
|
||||
|
||||
|
||||
tcp_portmon port_begin port_end item (index) (ip4 only at present)
|
||||
TCP port monitor for specified local ports. Port numbers must be
|
||||
in the range 1 to 65535. Valid items are:
|
||||
|
||||
count - total number of connections in the range
|
||||
|
||||
rip - remote ip address
|
||||
|
||||
rhost - remote host name
|
||||
|
||||
rport - remote port number
|
||||
|
||||
lip - local ip address
|
||||
|
||||
lhost - local host name
|
||||
|
||||
lservice - local service name from /etc/services
|
||||
|
||||
The connection index provides you with access to each connection
|
||||
in the port monitor. The monitor will return information for
|
||||
index values from 0 to n-1 connections. Values higher than n-1
|
||||
are simply ignored. For the "count" item, the connection index
|
||||
must be omitted. It is required for all other items.
|
||||
|
||||
Examples:
|
||||
|
||||
${tcp_portmon 6881 6889 count} - displays the number of connec‐
|
||||
tions in the bittorrent port range
|
||||
|
||||
${tcp_portmon 22 22 rip 0} - displays the remote host ip of the
|
||||
first sshd connection
|
||||
|
||||
${tcp_portmon 22 22 rip 9} - displays the remote host ip of the
|
||||
tenth sshd connection
|
||||
|
||||
${tcp_portmon 1 1024 rhost 0} - displays the remote host name of
|
||||
the first connection on a privileged port
|
||||
|
||||
${tcp_portmon 1 1024 rport 4} - displays the remote host port of
|
||||
the fifth connection on a privileged port
|
||||
|
||||
${tcp_portmon 1 65535 lservice 14} - displays the local service
|
||||
name of the fifteenth connection in the range of all ports
|
||||
|
||||
Note that port monitor variables which share the same port range
|
||||
actually refer to the same monitor, so many references to a sin‐
|
||||
gle port range for different items and different indexes all use
|
||||
the same monitor internally. In other words, the program avoids
|
||||
creating redundant monitors.
|
||||
|
||||
texeci interval command
|
||||
Runs a command at an interval inside a thread and displays the
|
||||
output. Same as $execi, except the command is run inside a
|
||||
thread. Use this if you have a slow script to keep Conky updat-
|
||||
ing. You should make the interval slightly longer then the time
|
||||
it takes your script to execute. For example, if you have a
|
||||
script that take 5 seconds to execute, you should make the
|
||||
Runs a command at an interval inside a thread and displays the
|
||||
output. Same as $execi, except the command is run inside a
|
||||
thread. Use this if you have a slow script to keep Conky updat‐
|
||||
ing. You should make the interval slightly longer then the time
|
||||
it takes your script to execute. For example, if you have a
|
||||
script that take 5 seconds to execute, you should make the
|
||||
interval at least 6 seconds. See also $execi.
|
||||
|
||||
|
||||
@ -786,26 +836,26 @@ VARIABLES
|
||||
|
||||
tail logfile lines (interval)
|
||||
Displays last N lines of supplied text text file. If interval is
|
||||
not supplied, Conky assumes 2x Conky's interval. Max of 30 lines
|
||||
not supplied, Conky assumes 2x Conky’s interval. Max of 30 lines
|
||||
can be displayed, or until the text buffer is filled.
|
||||
|
||||
|
||||
time (format)
|
||||
Local time, see man strftime to get more information about for-
|
||||
Local time, see man strftime to get more information about for‐
|
||||
mat
|
||||
|
||||
|
||||
totaldown net
|
||||
Total download, overflows at 4 GB on Linux with 32-bit arch and
|
||||
there doesn't seem to be a way to know how many times it has
|
||||
Total download, overflows at 4 GB on Linux with 32-bit arch and
|
||||
there doesn’t seem to be a way to know how many times it has
|
||||
already done that before conky has started.
|
||||
|
||||
|
||||
top type, num
|
||||
This takes arguments in the form:top (name) (number) Basically,
|
||||
processes are ranked from highest to lowest in terms of cpu
|
||||
usage, which is what (num) represents. The types are: "name",
|
||||
"pid", "cpu", and mem". There can be a max of 10 processes
|
||||
This takes arguments in the form:top (name) (number) Basically,
|
||||
processes are ranked from highest to lowest in terms of cpu
|
||||
usage, which is what (num) represents. The types are: "name",
|
||||
"pid", "cpu", and mem". There can be a max of 10 processes
|
||||
listed.
|
||||
|
||||
|
||||
@ -829,9 +879,9 @@ VARIABLES
|
||||
Upload speed in kilobytes with one decimal
|
||||
|
||||
|
||||
upspeedgraph net (height),(width) (gradient colour 1) (gradient colour
|
||||
upspeedgraph net (height),(width) (gradient colour 1) (gradient colour
|
||||
2) (scale)
|
||||
Upload speed graph, colours defined in hex, minus the #. If
|
||||
Upload speed graph, colours defined in hex, minus the #. If
|
||||
scale is non-zero, it becomes the scale for the graph.
|
||||
|
||||
|
||||
@ -855,12 +905,12 @@ VARIABLES
|
||||
|
||||
|
||||
voffset (pixels)
|
||||
Change verticle offset by N pixels. Negative values will cause
|
||||
Change verticle offset by N pixels. Negative values will cause
|
||||
text to overlap. See also $offset.
|
||||
|
||||
|
||||
EXAMPLES
|
||||
conky -t '${time %D %H:%m}' -o -u 30
|
||||
conky -t ’${time %D %H:%m}’ -o -u 30
|
||||
Start Conky in its own window with date and clock as text and 30
|
||||
sec update interval.
|
||||
|
||||
@ -871,25 +921,25 @@ FILES
|
||||
~/.conkyrc default configuration file
|
||||
|
||||
BUGS
|
||||
Drawing to root or some other desktop window directly doesn't work with
|
||||
all window managers. Especially doesn't work well with Gnome and it has
|
||||
been reported that it doesn't work with KDE either. Nautilus can be
|
||||
disabled from drawing to desktop with program gconf-editor. Uncheck
|
||||
show_desktop in /apps/nautilus/preferences/. There is -w switch in
|
||||
Conky to set some specific window id. You might find xwininfo -tree
|
||||
useful to find the window to draw to. You can also use -o argument
|
||||
Drawing to root or some other desktop window directly doesn’t work with
|
||||
all window managers. Especially doesn’t work well with Gnome and it has
|
||||
been reported that it doesn’t work with KDE either. Nautilus can be
|
||||
disabled from drawing to desktop with program gconf-editor. Uncheck
|
||||
show_desktop in /apps/nautilus/preferences/. There is -w switch in
|
||||
Conky to set some specific window id. You might find xwininfo -tree
|
||||
useful to find the window to draw to. You can also use -o argument
|
||||
which makes Conky to create its own window.
|
||||
|
||||
SEE ALSO
|
||||
http://conky.sourceforge.net [http://conky.sourceforge.net]
|
||||
|
||||
http://www.sourceforge.net/projects/conky [http://www.source-
|
||||
http://www.sourceforge.net/projects/conky [http://www.source‐
|
||||
forge.net/projects/conky]
|
||||
|
||||
#conky on irc.freenode.net
|
||||
|
||||
AUTHORS
|
||||
The Conky dev team. What's up now!
|
||||
The Conky dev team. What’s up now!
|
||||
|
||||
|
||||
|
||||
|
@ -983,38 +983,38 @@
|
||||
<emphasis>(ip4 only at present)</emphasis>
|
||||
</term>
|
||||
<listitem>
|
||||
TCP port monitor for specified ports. Port numbers must be in the range 1 to 65535. Valid items are:
|
||||
TCP port monitor for specified local ports. Port numbers must be in the range 1 to 65535. Valid items are:
|
||||
<simplelist>
|
||||
<member><command>count</command> total number of connections in the range
|
||||
<emphasis>(index must be omitted)</emphasis></member>
|
||||
<member><command>rip</command> remote ip address
|
||||
<emphasis>(index >=0 required)</emphasis></member>
|
||||
<member><command>rhost</command> remote host name
|
||||
<emphasis>(index >=0 required)</emphasis></member>
|
||||
<member><command>rport</command> remote port number
|
||||
<emphasis>(index >=0 required)</emphasis></member>
|
||||
<member><command>lip</command> local ip address
|
||||
<emphasis>(index >=0 required)</emphasis></member>
|
||||
<member><command>lhost</command> local host name
|
||||
<emphasis>(connection index >=0 required)</emphasis></member>
|
||||
<member><command>lservice</command> local service name from /etc/services
|
||||
<emphasis>(index >=0 required)</emphasis></member>
|
||||
</simplelist>The connection index gives you access to each connection in the monitor, i.e. values can be 0 through n-1 connections. Values higher than n-1 are simply ignored.
|
||||
<member><command>count</command> - total number of connections in the range
|
||||
</member>
|
||||
<member><command>rip</command> - remote ip address
|
||||
</member>
|
||||
<member><command>rhost</command> - remote host name
|
||||
</member>
|
||||
<member><command>rport</command> - remote port number
|
||||
</member>
|
||||
<member><command>lip</command> - local ip address
|
||||
</member>
|
||||
<member><command>lhost</command> - local host name
|
||||
</member>
|
||||
<member><command>lservice</command> - local service name from /etc/services
|
||||
</member>
|
||||
</simplelist>The connection index provides you with access to each connection in the port monitor. The monitor will return information for index values from 0 to n-1 connections. Values higher than n-1 are simply ignored. For the "count" item, the connection index must be omitted. It is required for all other items.
|
||||
<simplelist>
|
||||
<member>Examples:</member>
|
||||
<member><code>${tcp_portmon 6881 6889 count}</code>
|
||||
displays the number of connections in the torrent port range</member>
|
||||
<member><code>${tcp_portmon 22 22 rip 0}</code>
|
||||
<member><command>${tcp_portmon 6881 6889 count}</command> -
|
||||
displays the number of connections in the bittorrent port range</member>
|
||||
<member><command>${tcp_portmon 22 22 rip 0}</command> -
|
||||
displays the remote host ip of the first sshd connection</member>
|
||||
<member><code>${tcp_portmon 22 22 rip 9}</code>
|
||||
<member><command>${tcp_portmon 22 22 rip 9}</command> -
|
||||
displays the remote host ip of the tenth sshd connection</member>
|
||||
<member><code>${tcp_portmon 1 1024 rhost 0}</code>
|
||||
<member><command>${tcp_portmon 1 1024 rhost 0}</command> -
|
||||
displays the remote host name of the first connection on a privileged port</member>
|
||||
<member><code>${tcp_portmon 1 1024 rport 4}</code>
|
||||
<member><command>${tcp_portmon 1 1024 rport 4}</command> -
|
||||
displays the remote host port of the fifth connection on a privileged port</member>
|
||||
<member><code>${tcp_portmon 1 65535 lservice 14}</code>
|
||||
<member><command>${tcp_portmon 1 65535 lservice 14}</command> -
|
||||
displays the local service name of the fifteenth connection in the range of all ports</member>
|
||||
</simplelist>
|
||||
</simplelist>Note that port monitor variables which share the same port range actually refer to the same monitor, so many references to a single port range for different items and different indexes all use the same monitor internally. In other words, the program avoids creating redundant monitors.
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user