1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2025-02-12 17:08:29 +00:00

Added diskio_avg_samples patch (thanks Yeon-Hyeong)

This commit is contained in:
Yeon-Hyeong Yang 2009-05-01 17:03:59 -06:00 committed by Brenden Matthews
parent 814469b0c9
commit 68ea7a7859
8 changed files with 233 additions and 194 deletions

View File

@ -1,3 +1,6 @@
2009-05-01
* Added diskio_avg_samples patch (thanks Yeon-Hyeong)
2009-05-01 2009-05-01
* Conky 1.7.0 "Hungry Hobo" released! * Conky 1.7.0 "Hungry Hobo" released!

317
README
View File

@ -173,15 +173,15 @@ conky(1) conky(1)
background background
Boolean value, if true, Conky will be forked to background when Boolean value, if true, Conky will be forked to background when
started started.
border_margin border_margin
Border margin in pixels Border margin in pixels.
border_width border_width
Border width in pixels Border width in pixels.
colorN Predefine a color for use inside TEXT segments. Substitute N by colorN Predefine a color for use inside TEXT segments. Substitute N by
@ -190,7 +190,11 @@ conky(1) conky(1)
cpu_avg_samples cpu_avg_samples
The number of samples to average for CPU monitoring The number of samples to average for CPU monitoring.
diskio_avg_samples
The number of samples to average for disk I/O monitoring.
top_cpu_separate top_cpu_separate
@ -202,7 +206,7 @@ conky(1) conky(1)
default_bar_size default_bar_size
Specify a default width and height for bars. Example: 'de Specify a default width and height for bars. Example: 'de
fault_bar_size 0 6'. This is particularly useful for execbar and fault_bar_size 0 6'. This is particularly useful for execbar and
execibar as they do not take size arguments execibar as they do not take size arguments.
default_graph_size default_graph_size
@ -672,14 +676,19 @@ conky(1) conky(1)
a digit between 0 and 9, inclusively. a digit between 0 and 9, inclusively.
combine var1 var2
Places the lines of var2 to the right of the lines of var1
seperated by the chars that are put between var1 and var2. For
example: ${combine ${head /proc/cpuinfo 2} - ${head /proc/memin
fo 1}} gives as output "cpuinfo_line1 - meminfo_line1" on line 1
and "cpuinfo_line2 -" on line 2. $combine vars can also be nest
ed to place more vars next to each other.
conky_version conky_version
Conky version Conky version
combine var1 var2
Places the lines of var2 to the right of the lines of var1 seperated by the chars that are put between var1 and var2. For example: ${combine ${head /proc/cpuinfo 2} - ${head /proc/meminfo 1}} gives as output "cpuinfo_line1 - meminfo_line1" on line 1 and "cpuinfo_line2 -" on line 2. $combine vars can also be nested to place more vars next to each other.
conky_build_date conky_build_date
Date Conky was built Date Conky was built
@ -689,26 +698,26 @@ conky(1) conky(1)
cpu (cpuN) cpu (cpuN)
CPU usage in percents. For SMP machines, the CPU number can be CPU usage in percents. For SMP machines, the CPU number can be
provided as an argument. ${cpu cpu0} is the total usage, and provided as an argument. ${cpu cpu0} is the total usage, and
${cpu cpuX} (X >= 1) are individual CPUs. ${cpu cpuX} (X >= 1) are individual CPUs.
cpubar (cpuN) (height),(width) cpubar (cpuN) (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. $cpu for more info on SMP.
cpugauge (cpuN) (height),(width) cpugauge (cpuN) (height),(width)
Elliptical gauge that shows CPU usage, height and width are Elliptical gauge that shows CPU usage, height and width are
gauge's vertical and horizontal axis respectively. See $cpu for gauge's vertical and horizontal axis respectively. See $cpu for
more info on SMP. more info on SMP.
cpugraph (cpuN) ("normal"|"log") (height),(width) (gradient colour 1) cpugraph (cpuN) ("normal"|"log") (height),(width) (gradient colour 1)
(gradient colour 2) (scale) (gradient colour 2) (scale)
CPU usage graph, with optional colours in hex, minus the #. See CPU usage graph, with optional colours in hex, minus the #. See
$cpu for more info on SMP. Uses a logarithmic scale (to see $cpu for more info on SMP. Uses a logarithmic scale (to see
small numbers) when you use "log" instead of "normal". small numbers) when you use "log" instead of "normal".
@ -719,7 +728,7 @@ conky(1) conky(1)
diskiograph ("normal"|"log") (height),(width) (gradient colour 1) (gra diskiograph ("normal"|"log") (height),(width) (gradient colour 1) (gra
dient colour 2) (scale) (device) dient colour 2) (scale) (device)
Disk IO graph, colours defined in hex, minus the #. If scale is Disk IO graph, colours defined in hex, minus the #. If scale is
non-zero, it becomes the scale for the graph. Uses a logarithmic non-zero, it becomes the scale for the graph. Uses a logarithmic
scale (to see small numbers) when you use "log" instead of "nor scale (to see small numbers) when you use "log" instead of "nor
mal". mal".
@ -729,11 +738,11 @@ conky(1) conky(1)
Displays current disk IO for reads. Device as in diskio. Displays current disk IO for reads. Device as in diskio.
diskiograph_read ("normal"|"log") (height),(width) (gradient colour 1) diskiograph_read ("normal"|"log") (height),(width) (gradient colour 1)
(gradient colour 2) (scale) (device) (gradient colour 2) (scale) (device)
Disk IO graph for reads, colours defined in hex, minus the #. If Disk IO graph for reads, colours defined in hex, minus the #. If
scale is non-zero, it becomes the scale for the graph. Device as scale is non-zero, it becomes the scale for the graph. Device as
in diskio. Uses a logarithmic scale (to see small numbers) when in diskio. Uses a logarithmic scale (to see small numbers) when
you use "log" instead of "normal". you use "log" instead of "normal".
@ -743,9 +752,9 @@ conky(1) conky(1)
diskiograph_write ("normal"|"log") (height),(width) (gradient colour 1) diskiograph_write ("normal"|"log") (height),(width) (gradient colour 1)
(gradient colour 2) (scale) (device) (gradient colour 2) (scale) (device)
Disk IO graph for writes, colours defined in hex, minus the #. Disk IO graph for writes, colours defined in hex, minus the #.
If scale is non-zero, it becomes the scale for the graph. Device If scale is non-zero, it becomes the scale for the graph. Device
as in diskio. Uses a logarithmic scale (to see small numbers) as in diskio. Uses a logarithmic scale (to see small numbers)
when you use "log" instead of "normal". when you use "log" instead of "normal".
@ -762,11 +771,11 @@ conky(1) conky(1)
Download speed in KiB with one decimal Download speed in KiB with one decimal
downspeedgraph ("normal"|"log") (height),(width) (gradient colour 1) downspeedgraph ("normal"|"log") (height),(width) (gradient colour 1)
(gradient colour 2) (scale) (net) (gradient colour 2) (scale) (net)
Download speed graph, colours defined in hex, minus the #. If Download speed graph, colours defined in hex, minus the #. If
scale is non-zero, it becomes the scale for the graph. Uses a scale is non-zero, it becomes the scale for the graph. Uses a
logarithmic scale (to see small numbers) when you use "log" in logarithmic scale (to see small numbers) when you use "log" in
stead of "normal". stead of "normal".
@ -787,40 +796,40 @@ conky(1) conky(1)
eval string eval string
Evalutates given string according to the rules of TEXT interpre Evalutates given string according to the rules of TEXT interpre
tation, i.e. parsing any contained text object specifications tation, i.e. parsing any contained text object specifications
into their output, any occuring '$$' into a single '$' and so into their output, any occuring '$$' into a single '$' and so
on. The output is then being parsed again. on. The output is then being parsed again.
exec command exec command
Executes a shell command and displays the output in conky. warn Executes a shell command and displays the output in conky. warn
ing: this takes a lot more resources than other variables. I'd ing: this takes a lot more resources than other variables. I'd
recommend coding wanted behaviour in C and posting a patch. recommend coding wanted behaviour in C and posting a patch.
execbar command execbar command
Same as exec, except if the first value return is a value be Same as exec, except if the first value return is a value be
tween 0-100, it will use that number for a bar. The size for tween 0-100, it will use that number for a bar. The size for
bars can be controlled via the default_bar_size config setting. bars can be controlled via the default_bar_size config setting.
execgauge command execgauge command
Same as exec, except if the first value returned is a value be Same as exec, except if the first value returned is a value be
tween 0-100, it will use that number for a gauge. The size for tween 0-100, it will use that number for a gauge. The size for
gauges can be controlled via the default_gauge_size config set gauges can be controlled via the default_gauge_size config set
ting. ting.
execgraph ("normal"|"log") (height),(width) (gradient colour 1) (gradi execgraph ("normal"|"log") (height),(width) (gradient colour 1) (gradi
ent colour 2) (scale) command ent colour 2) (scale) command
Same as execbar, but graphs values. Uses a logaritmic scale when Same as execbar, but graphs values. Uses a logaritmic scale when
the log option is given (to see small numbers). Values still the log option is given (to see small numbers). Values still
have to be between 0 and 100. The size for graphs can be con have to be between 0 and 100. The size for graphs can be con
trolled via the default_graph_size config setting. trolled via the default_graph_size config setting.
execi interval command 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 than update_interval in configuration. See also $texeci
@ -838,14 +847,14 @@ conky(1) conky(1)
execp command execp command
Executes a shell command and displays the output in conky. warn Executes a shell command and displays the output in conky. warn
ing: this takes a lot more resources than other variables. I'd ing: this takes a lot more resources than other variables. I'd
recommend coding wanted behaviour in C and posting a patch. This recommend coding wanted behaviour in C and posting a patch. This
differs from $exec in that it parses the output of the command, differs from $exec in that it parses the output of the command,
so you can insert things like ${color red}hi!${color} in your so you can insert things like ${color red}hi!${color} in your
script and have it correctly parsed by Conky. Caveats: Conky script and have it correctly parsed by Conky. Caveats: Conky
parses and evaluates the output of $execp every time Conky parses and evaluates the output of $execp every time Conky
loops, and then destroys all the objects. If you try to use any loops, and then destroys all the objects. If you try to use any
thing like $execi within an $execp statement, it will function thing like $execi within an $execp statement, it will function
ally run at the same interval that the $execp statement runs, as ally run at the same interval that the $execp statement runs, as
it is created and destroyed at every interval. it is created and destroyed at every interval.
@ -853,44 +862,29 @@ conky(1) conky(1)
execpi interval command execpi interval command
Same as execp but with specific interval. Interval can't be less Same as execp but with specific interval. Interval can't be less
than update_interval in configuration. Note that the output from than update_interval in configuration. Note that the output from
the $execpi command is still parsed and evaluated at every in the $execpi command is still parsed and evaluated at every in
terval. terval.
font (font) font (font)
Specify a different font. This new font will apply to the cur Specify a different font. This new font will apply to the cur
rent line and everything following. You can use a $font with no rent line and everything following. You can use a $font with no
arguments to change back to the default font (much like with arguments to change back to the default font (much like with
$color) $color)
freq (n) freq (n)
Returns CPU #n's frequency in MHz. CPUs are counted from 1. If Returns CPU #n's frequency in MHz. CPUs are counted from 1. If
omitted, the parameter defaults to 1. omitted, the parameter defaults to 1.
freq_g (n) freq_g (n)
Returns CPU #n's frequency in GHz. CPUs are counted from 1. If Returns CPU #n's frequency in GHz. CPUs are counted from 1. If
omitted, the parameter defaults to 1. omitted, the parameter defaults to 1.
<<<<<<< HEAD:README
freq_dyn (n)
Returns CPU #n's frequency in MHz (defaults to 1), but is calcu
lated by counting to clock cycles to complete an instruction.
Only available for x86/amd64.
freq_dyn_g (n)
Returns CPU #n's frequency in GHz (defaults to 1), but is calcu
lated by counting to clock cycles to complete an instruction.
Only available for x86/amd64.
=======
>>>>>>> cb4b914... Few misc doc related things.:README
fs_bar (height),(width) fs fs_bar (height),(width) fs
Bar that shows how much space is used on a file system. height Bar that shows how much space is used on a file system. height
is the height in pixels. fs is any file on that file system. is the height in pixels. fs is any file on that file system.
@ -1094,8 +1088,8 @@ conky(1) conky(1)
if_running (process) if_running (process)
if PROCESS is running, display everything $if_running and the if PROCESS is running, display everything $if_running and the
matching $endif. This uses the ``pidof'' command, so the -x matching $endif. This uses the ``pidof'' command, so the -x
switch is also supported. switch is also supported.
@ -1105,8 +1099,8 @@ conky(1) conky(1)
if_smapi_bat_installed (INDEX) if_smapi_bat_installed (INDEX)
when using smapi, if the battery with index INDEX is installed, when using smapi, if the battery with index INDEX is installed,
display everything between $if_smapi_bat_installed and the display everything between $if_smapi_bat_installed and the
matching $endif matching $endif
@ -1116,17 +1110,17 @@ conky(1) conky(1)
if_updatenr (updatenr) if_updatenr (updatenr)
If it's the UPDATENR-th time that conky updates, display every If it's the UPDATENR-th time that conky updates, display every
thing between $if_updatenr and the matching $endif. The counter thing between $if_updatenr and the matching $endif. The counter
resets when the highest UPDATENR is reached. Example : resets when the highest UPDATENR is reached. Example :
"{$if_updatenr 1}foo$endif{$if_updatenr 2}bar$endif{$if_updatenr "{$if_updatenr 1}foo$endif{$if_updatenr 2}bar$endif{$if_updatenr
4}$endif" shows foo 25% of the time followed by bar 25% of the 4}$endif" shows foo 25% of the time followed by bar 25% of the
time followed by nothing the other half of the time. time followed by nothing the other half of the time.
imap_messages (args) imap_messages (args)
Displays the number of messages in your global IMAP inbox by de Displays the number of messages in your global IMAP inbox by de
fault. You can define individual IMAP inboxes seperately by fault. You can define individual IMAP inboxes seperately by
passing arguments to this object. Arguments are: "host user pass passing arguments to this object. Arguments are: "host user pass
[-i interval] [-p port] [-e command] [-r retries]". Default port [-i interval] [-p port] [-e command] [-r retries]". Default port
is 143, default interval is 5 minutes, and default number of re is 143, default interval is 5 minutes, and default number of re
@ -1145,7 +1139,7 @@ conky(1) conky(1)
ioscheduler disk ioscheduler disk
Prints the current ioscheduler used for the given disk name Prints the current ioscheduler used for the given disk name
(i.e. e.g. "hda" or "sdb") (i.e. e.g. "hda" or "sdb")
@ -1163,8 +1157,8 @@ conky(1) conky(1)
loadgraph ("normal"|"log") (height),(width) (gradient colour 1) (gradi loadgraph ("normal"|"log") (height),(width) (gradient colour 1) (gradi
ent colour 2) (scale) ent colour 2) (scale)
Load1 average graph, similar to xload, with optional colours in Load1 average graph, similar to xload, with optional colours in
hex, minus the #. Uses a logarithmic scale (to see small num hex, minus the #. Uses a logarithmic scale (to see small num
bers) when you use "log" instead of "normal". bers) when you use "log" instead of "normal".
@ -1177,9 +1171,9 @@ conky(1) conky(1)
mails (mailbox) (interval) mails (mailbox) (interval)
Mail count in the specified mailbox or your mail spool if not. Mail count in the specified mailbox or your mail spool if not.
Both mbox and maildir type mailboxes are supported. You can use Both mbox and maildir type mailboxes are supported. You can use
a program like fetchmail to get mails from some server using a program like fetchmail to get mails from some server using
your favourite protocol. See also new_mails. your favourite protocol. See also new_mails.
@ -1189,32 +1183,32 @@ conky(1) conky(1)
seen_mails (maildir) (interval) seen_mails (maildir) (interval)
Number of mails marked as seen in the specified mailbox or mail Number of mails marked as seen in the specified mailbox or mail
spool if not. Only maildir type mailboxes are supported, mbox spool if not. Only maildir type mailboxes are supported, mbox
type will return -1. type will return -1.
unseen_mails (maildir) (interval) unseen_mails (maildir) (interval)
Number of new or unseen mails in the specified mailbox or mail Number of new or unseen mails in the specified mailbox or mail
spool if not. Only maildir type mailboxes are supported, mbox spool if not. Only maildir type mailboxes are supported, mbox
type will return -1. type will return -1.
flagged_mails (maildir) (interval) flagged_mails (maildir) (interval)
Number of mails marked as flagged in the specified mailbox or Number of mails marked as flagged in the specified mailbox or
mail spool if not. Only maildir type mailboxes are supported, mail spool if not. Only maildir type mailboxes are supported,
mbox type will return -1. mbox type will return -1.
unflagged_mails (maildir) (interval) unflagged_mails (maildir) (interval)
Number of mails not marked as flagged in the specified mailbox Number of mails not marked as flagged in the specified mailbox
or mail spool if not. Only maildir type mailboxes are supported, or mail spool if not. Only maildir type mailboxes are supported,
mbox type will return -1. mbox type will return -1.
forwarded_mails (maildir) (interval) forwarded_mails (maildir) (interval)
Number of mails marked as forwarded in the specified mailbox or Number of mails marked as forwarded in the specified mailbox or
mail spool if not. Only maildir type mailboxes are supported, mail spool if not. Only maildir type mailboxes are supported,
mbox type will return -1. mbox type will return -1.
@ -1225,33 +1219,33 @@ conky(1) conky(1)
replied_mails (maildir) (interval) replied_mails (maildir) (interval)
Number of mails marked as replied in the specified mailbox or Number of mails marked as replied in the specified mailbox or
mail spool if not. Only maildir type mailboxes are supported, mail spool if not. Only maildir type mailboxes are supported,
mbox type will return -1. mbox type will return -1.
unreplied_mails (maildir) (interval) unreplied_mails (maildir) (interval)
Number of mails not marked as replied in the specified mailbox Number of mails not marked as replied in the specified mailbox
or mail spool if not. Only maildir type mailboxes are supported, or mail spool if not. Only maildir type mailboxes are supported,
mbox type will return -1. mbox type will return -1.
draft_mails (maildir) (interval) draft_mails (maildir) (interval)
Number of mails marked as draft in the specified mailbox or mail Number of mails marked as draft in the specified mailbox or mail
spool if not. Only maildir type mailboxes are supported, mbox spool if not. Only maildir type mailboxes are supported, mbox
type will return -1. type will return -1.
trashed_mails (maildir) (interval) trashed_mails (maildir) (interval)
Number of mails marked as trashed in the specified mailbox or Number of mails marked as trashed in the specified mailbox or
mail spool if not. Only maildir type mailboxes are supported, mail spool if not. Only maildir type mailboxes are supported,
mbox type will return -1. mbox type will return -1.
mboxscan (-n number of messages to print) (-fw from width) (-sw subject mboxscan (-n number of messages to print) (-fw from width) (-sw subject
width) mbox width) mbox
Print a summary of recent messages in an mbox format mailbox. Print a summary of recent messages in an mbox format mailbox.
mbox parameter is the filename of the mailbox (can be encapsu mbox parameter is the filename of the mailbox (can be encapsu
lated using '"', ie. ${mboxscan -n 10 "/home/brenden/some box"} lated using '"', ie. ${mboxscan -n 10 "/home/brenden/some box"}
@ -1262,22 +1256,18 @@ conky(1) conky(1)
Bar that shows amount of memory in use Bar that shows amount of memory in use
<<<<<<< HEAD:README
memgauge (height),(width) memgauge (height),(width)
Gauge that shows amount of memory in use (see cpugauge) Gauge that shows amount of memory in use (see cpugauge)
memgraph ("normal"|"log") (height),(width) (gradient colour 1) (gradi memgraph ("normal"|"log") (height),(width) (gradient colour 1) (gradi
=======
memgraph ("normal"|"log") (height),(width) (gradient colour 1) (gradi
>>>>>>> cb4b914... Few misc doc related things.:README
ent colour 2) (scale) ent colour 2) (scale)
Memory usage graph. Uses a logarithmic scale (to see small num Memory usage graph. Uses a logarithmic scale (to see small num
bers) when you use "log" instead of "normal". bers) when you use "log" instead of "normal".
memeasyfree memeasyfree
Amount of free memory including the memory that is very easily Amount of free memory including the memory that is very easily
freed (buffers/cache) freed (buffers/cache)
@ -1293,39 +1283,39 @@ conky(1) conky(1)
mixer (device) mixer (device)
Prints the mixer value as reported by the OS. Default mixer is Prints the mixer value as reported by the OS. Default mixer is
"vol", but you can specify one of the following optional argu "vol", but you can specify one of the following optional argu
ments: "vol", "bass", "treble", "synth", "pcm", "speaker", ments: "vol", "bass", "treble", "synth", "pcm", "speaker",
"line", "mic", "cd", "mix", "pcm2", "rec", "igain", "ogain", "line", "mic", "cd", "mix", "pcm2", "rec", "igain", "ogain",
"line1", "line2", "line3", "dig1", "dig2", "dig3", "phin", "line1", "line2", "line3", "dig1", "dig2", "dig3", "phin",
"phout", "video", "radio", "monitor". Refer to the definition of "phout", "video", "radio", "monitor". Refer to the definition of
SOUND_DEVICE_NAMES in <linux/soundcard.h> (on Linux), <sound SOUND_DEVICE_NAMES in <linux/soundcard.h> (on Linux), <sound
card.h> (on OpenBSD), or <sys/soundcard.h> to find the exact op card.h> (on OpenBSD), or <sys/soundcard.h> to find the exact op
tions available on your system. tions available on your system.
mixerbar (device) mixerbar (device)
Displays mixer value in a bar as reported by the OS. See docs Displays mixer value in a bar as reported by the OS. See docs
for $mixer for details on arguments. for $mixer for details on arguments.
mixerr (device) mixerr (device)
Prints the right channel mixer value as reported by the OS. See Prints the right channel mixer value as reported by the OS. See
docs for $mixer for details on arguments. docs for $mixer for details on arguments.
mixerrbar (device) mixerrbar (device)
Displays the right channel mixer value in a bar as reported by Displays the right channel mixer value in a bar as reported by
the OS. See docs for $mixer for details on arguments. the OS. See docs for $mixer for details on arguments.
mixerl (device) mixerl (device)
Prints the left channel mixer value as reported by the OS. See Prints the left channel mixer value as reported by the OS. See
docs for $mixer for details on arguments. docs for $mixer for details on arguments.
mixerlbar (device) mixerlbar (device)
Displays the left channel mixer value in a bar as reported by Displays the left channel mixer value in a bar as reported by
the OS. See docs for $mixer for details on arguments. the OS. See docs for $mixer for details on arguments.
@ -1447,12 +1437,12 @@ conky(1) conky(1)
if_mpd_playing if_mpd_playing
if mpd is playing or paused, display everything between if mpd is playing or paused, display everything between
$if_mpd_playing and the matching $endif $if_mpd_playing and the matching $endif
nameserver (index) nameserver (index)
Print a nameserver from /etc/resolv.conf. Index starts at and Print a nameserver from /etc/resolv.conf. Index starts at and
defaults to 0. defaults to 0.
@ -1461,8 +1451,8 @@ conky(1) conky(1)
nvidia threshold temp ambient gpufreq memfreq imagequality nvidia threshold temp ambient gpufreq memfreq imagequality
Nvidia graficcard support for the XNVCtrl library. Each option Nvidia graficcard support for the XNVCtrl library. Each option
can be shortened to the least significant part. Temperatures can be shortened to the least significant part. Temperatures
are printed as float, all other values as integer. are printed as float, all other values as integer.
threshold: the thresholdtemperature at which the gpu slows down threshold: the thresholdtemperature at which the gpu slows down
@ -1480,25 +1470,25 @@ conky(1) conky(1)
pb_battery item pb_battery item
If running on Apple powerbook/ibook, display information on bat If running on Apple powerbook/ibook, display information on bat
tery status. The item parameter specifies, what information to tery status. The item parameter specifies, what information to
display. Exactly one item must be specified. Valid items are: display. Exactly one item must be specified. Valid items are:
status: Display if battery is fully charged, charging, discharg status: Display if battery is fully charged, charging, discharg
ing or absent (running on AC) ing or absent (running on AC)
percent: Display charge of battery in percent, if charging or percent: Display charge of battery in percent, if charging or
discharging. Nothing will be displayed, if battery is fully discharging. Nothing will be displayed, if battery is fully
charged or absent. charged or absent.
time: Display the time remaining until the battery will be fully time: Display the time remaining until the battery will be fully
charged or discharged at current rate. Nothing is displayed, if charged or discharged at current rate. Nothing is displayed, if
battery is absent or if it's present but fully charged and not battery is absent or if it's present but fully charged and not
discharging. discharging.
platform (dev) type n platform (dev) type n
Platform sensor from sysfs (Linux 2.6). Parameter dev may be Platform sensor from sysfs (Linux 2.6). Parameter dev may be
omitted if you have only one platform device. Platform type is omitted if you have only one platform device. Platform type is
either 'in' or 'vol' meaning voltage; 'fan' meaning fan; 'temp' either 'in' or 'vol' meaning voltage; 'fan' meaning fan; 'temp'
meaning temperature. Parameter n is number of the sensor. See meaning temperature. Parameter n is number of the sensor. See
/sys/bus/platform/devices/ on your local computer. /sys/bus/platform/devices/ on your local computer.
@ -1513,13 +1503,13 @@ conky(1) conky(1)
pop3_used (args) pop3_used (args)
Displays the amount of space (in MiB, 2^20) used in your global Displays the amount of space (in MiB, 2^20) used in your global
POP3 inbox by default. You can define individual POP3 inboxes POP3 inbox by default. You can define individual POP3 inboxes
seperately by passing arguments to this object. Arguments are: seperately by passing arguments to this object. Arguments are:
"host user pass [-i interval] [-p port] [-e command] [-r re "host user pass [-i interval] [-p port] [-e command] [-r re
tries]". Default port is 110, default interval is 5 minutes, and tries]". Default port is 110, default interval is 5 minutes, and
default number of retries before giving up is 5. If the password default number of retries before giving up is 5. If the password
is supplied as '*', you will be prompted to enter the password is supplied as '*', you will be prompted to enter the password
when Conky starts. when Conky starts.
@ -1537,14 +1527,14 @@ conky(1) conky(1)
scroll length (step) text scroll length (step) text
Scroll 'text' by 'step' characters showing 'length' number of Scroll 'text' by 'step' characters showing 'length' number of
characters at the same time. The text may also contain vari characters at the same time. The text may also contain vari
ables. 'step' is optional and defaults to 1 if not set. If a var ables. 'step' is optional and defaults to 1 if not set. If a var
creates output on multiple lines then the lines are placed be creates output on multiple lines then the lines are placed be
hind each other separated with a '|'-sign. Do NOT use vars that hind each other separated with a '|'-sign. Do NOT use vars that
change colors or otherwise affect the design inside a scrolling change colors or otherwise affect the design inside a scrolling
text. If you want spaces between the start and the end of text. If you want spaces between the start and the end of
'text', place them at the end of 'text' not at the front ("foo 'text', place them at the end of 'text' not at the front ("foo
bar" and " foobar" can both generate "barfoo" but "foobar " will bar" and " foobar" can both generate "barfoo" but "foobar " will
keep the spaces like this "bar foo"). keep the spaces like this "bar foo").
@ -1554,35 +1544,35 @@ conky(1) conky(1)
smapi (ARGS) smapi (ARGS)
when using smapi, display contents of the /sys/devices/plat when using smapi, display contents of the /sys/devices/plat
form/smapi directory. ARGS are either '(FILENAME)' or 'bat (IN form/smapi directory. ARGS are either '(FILENAME)' or 'bat (IN
DEX) (FILENAME)' to display the corresponding files' content. DEX) (FILENAME)' to display the corresponding files' content.
This is a very raw method of accessing the smapi values. When This is a very raw method of accessing the smapi values. When
available, better use one of the smapi_* variables instead. available, better use one of the smapi_* variables instead.
smapi_bat_bar (INDEX),(height),(width) smapi_bat_bar (INDEX),(height),(width)
when using smapi, display the remaining capacity of the battery when using smapi, display the remaining capacity of the battery
with index INDEX as a bar. with index INDEX as a bar.
smapi_bat_perc (INDEX) smapi_bat_perc (INDEX)
when using smapi, display the remaining capacity in percent of when using smapi, display the remaining capacity in percent of
the battery with index INDEX. This is a separate variable be the battery with index INDEX. This is a separate variable be
cause it supports the 'use_spacer' configuration option. cause it supports the 'use_spacer' configuration option.
smapi_bat_power INDEX smapi_bat_power INDEX
when using smapi, display the current power of the battery with when using smapi, display the current power of the battery with
index INDEX in watt. This is a separate variable because the index INDEX in watt. This is a separate variable because the
original read out value is being converted from mW. The sign of original read out value is being converted from mW. The sign of
the output reflects charging (positive) or discharging (nega the output reflects charging (positive) or discharging (nega
tive) state. tive) state.
smapi_bat_temp INDEX smapi_bat_temp INDEX
when using smapi, display the current temperature of the battery when using smapi, display the current temperature of the battery
with index INDEX in degree Celsius. This is a separate variable with index INDEX in degree Celsius. This is a separate variable
because the original read out value is being converted from mil because the original read out value is being converted from mil
li degree Celsius. li degree Celsius.
@ -1627,36 +1617,36 @@ conky(1) conky(1)
The connection index provides you with access to each connection The connection index provides you with access to each connection
in the port monitor. The monitor will return information for in in the port monitor. The monitor will return information for in
dex values from 0 to n-1 connections. Values higher than n-1 are dex values from 0 to n-1 connections. Values higher than n-1 are
simply ignored. For the "count" item, the connection index must simply ignored. For the "count" item, the connection index must
be omitted. It is required for all other items. be omitted. It is required for all other items.
Examples: Examples:
${tcp_portmon 6881 6999 count} - displays the number of connec ${tcp_portmon 6881 6999 count} - displays the number of connec
tions in the bittorrent port range tions in the bittorrent port range
${tcp_portmon 22 22 rip 0} - displays the remote host ip of the ${tcp_portmon 22 22 rip 0} - displays the remote host ip of the
first sshd connection first sshd connection
${tcp_portmon 22 22 rip 9} - displays the remote host ip of the ${tcp_portmon 22 22 rip 9} - displays the remote host ip of the
tenth sshd connection tenth sshd connection
${tcp_portmon 1 1024 rhost 0} - displays the remote host name of ${tcp_portmon 1 1024 rhost 0} - displays the remote host name of
the first connection on a privileged port the first connection on a privileged port
${tcp_portmon 1 1024 rport 4} - displays the remote host port of ${tcp_portmon 1 1024 rport 4} - displays the remote host port of
the fifth connection on a privileged port the fifth connection on a privileged port
${tcp_portmon 1 65535 lservice 14} - displays the local service ${tcp_portmon 1 65535 lservice 14} - displays the local service
name of the fifteenth connection in the range of all ports name of the fifteenth connection in the range of all ports
Note that port monitor variables which share the same port range Note that port monitor variables which share the same port range
actually refer to the same monitor, so many references to a sin actually refer to the same monitor, so many references to a sin
gle port range for different items and different indexes all use gle port range for different items and different indexes all use
the same monitor internally. In other words, the program avoids the same monitor internally. In other words, the program avoids
creating redundant monitors. creating redundant monitors.
texeci interval command texeci interval command
Runs a command at an interval inside a thread and displays the Runs a command at an interval inside a thread and displays the
output. Same as $execi, except the command is run inside a output. Same as $execi, except the command is run inside a
thread. Use this if you have a slow script to keep Conky updat thread. Use this if you have a slow script to keep Conky updat
ing. You should make the interval slightly longer then the time ing. You should make the interval slightly longer then the time
it takes your script to execute. For example, if you have a it takes your script to execute. For example, if you have a
script that take 5 seconds to execute, you should make the in script that take 5 seconds to execute, you should make the in
terval at least 6 seconds. See also $execi. terval at least 6 seconds. See also $execi.
@ -1664,18 +1654,11 @@ conky(1) conky(1)
Move text over by N pixels. See also $voffset. Move text over by N pixels. See also $voffset.
<<<<<<< HEAD:README
rss url delay_in_minutes action (num_par (spaces_in_front)) rss url delay_in_minutes action (num_par (spaces_in_front))
Download and parse RSS feeds. Action may be one of the follow Download and parse RSS feeds. Action may be one of the follow
ing: feed_title, item_title (with num par), item_desc (with num ing: feed_title, item_title (with num par), item_desc (with num
par) and item_titles (when using this action and spaces_in_front par) and item_titles (when using this action and spaces_in_front
is given conky places that many spaces in front of each item). is given conky places that many spaces in front of each item).
=======
rss url delay_in_minutes action item_num
Download and parse RSS feeds. Action may be one of the follow
ing: feed_title, item_title (with num par), item_desc (with num
par) and item_titles.
>>>>>>> cb4b914... Few misc doc related things.:README
tab (width, (start)) tab (width, (start))

View File

@ -16,21 +16,21 @@
<varlistentry> <varlistentry>
<term><command><option>background</option></command></term> <term><command><option>background</option></command></term>
<listitem> <listitem>
Boolean value, if true, Conky will be forked to background when started Boolean value, if true, Conky will be forked to background when started.
<para></para></listitem> <para></para></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><command><option>border_margin</option></command></term> <term><command><option>border_margin</option></command></term>
<listitem> <listitem>
Border margin in pixels Border margin in pixels.
<para></para></listitem> <para></para></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><command><option>border_width</option></command></term> <term><command><option>border_width</option></command></term>
<listitem> <listitem>
Border width in pixels Border width in pixels.
<para></para></listitem> <para></para></listitem>
</varlistentry> </varlistentry>
@ -44,7 +44,14 @@
<varlistentry> <varlistentry>
<term><command><option>cpu_avg_samples</option></command></term> <term><command><option>cpu_avg_samples</option></command></term>
<listitem> <listitem>
The number of samples to average for CPU monitoring The number of samples to average for CPU monitoring.
<para></para></listitem>
</varlistentry>
<varlistentry>
<term><command><option>diskio_avg_samples</option></command></term>
<listitem>
The number of samples to average for disk I/O monitoring.
<para></para></listitem> <para></para></listitem>
</varlistentry> </varlistentry>
@ -58,7 +65,7 @@
<varlistentry> <varlistentry>
<term><command><option>default_bar_size</option></command></term> <term><command><option>default_bar_size</option></command></term>
<listitem> <listitem>
Specify a default width and height for bars. Example: 'default_bar_size 0 6'. This is particularly useful for execbar and execibar as they do not take size arguments Specify a default width and height for bars. Example: 'default_bar_size 0 6'. This is particularly useful for execbar and execibar as they do not take size arguments.
<para></para></listitem> <para></para></listitem>
</varlistentry> </varlistentry>

View File

@ -155,15 +155,15 @@ Aligned position on screen, may be top_left, top_right, top_middle, bottom_left,
.TP .TP
\fB\*(T<\fBbackground\fR\*(T>\fR \fB\*(T<\fBbackground\fR\*(T>\fR
Boolean value, if true, Conky will be forked to background when started Boolean value, if true, Conky will be forked to background when started.
.TP .TP
\fB\*(T<\fBborder_margin\fR\*(T>\fR \fB\*(T<\fBborder_margin\fR\*(T>\fR
Border margin in pixels Border margin in pixels.
.TP .TP
\fB\*(T<\fBborder_width\fR\*(T>\fR \fB\*(T<\fBborder_width\fR\*(T>\fR
Border width in pixels Border width in pixels.
.TP .TP
\fB\*(T<\fBcolorN\fR\*(T>\fR \fB\*(T<\fBcolorN\fR\*(T>\fR
@ -171,7 +171,11 @@ Predefine a color for use inside TEXT segments. Substitute N by a digit between
.TP .TP
\fB\*(T<\fBcpu_avg_samples\fR\*(T>\fR \fB\*(T<\fBcpu_avg_samples\fR\*(T>\fR
The number of samples to average for CPU monitoring The number of samples to average for CPU monitoring.
.TP
\fB\*(T<\fBdiskio_avg_samples\fR\*(T>\fR
The number of samples to average for disk I/O monitoring.
.TP .TP
\fB\*(T<\fBtop_cpu_separate\fR\*(T>\fR \fB\*(T<\fBtop_cpu_separate\fR\*(T>\fR
@ -179,7 +183,7 @@ If true, cpu in top will show usage of one processor's power. If false, cpu in t
.TP .TP
\fB\*(T<\fBdefault_bar_size\fR\*(T>\fR \fB\*(T<\fBdefault_bar_size\fR\*(T>\fR
Specify a default width and height for bars. Example: 'default_bar_size 0 6'. This is particularly useful for execbar and execibar as they do not take size arguments Specify a default width and height for bars. Example: 'default_bar_size 0 6'. This is particularly useful for execbar and execibar as they do not take size arguments.
.TP .TP
\fB\*(T<\fBdefault_graph_size\fR\*(T>\fR \fB\*(T<\fBdefault_graph_size\fR\*(T>\fR

View File

@ -262,7 +262,7 @@ static unsigned long total_run_times;
/* fork? */ /* fork? */
static int fork_to_background; static int fork_to_background;
static int cpu_avg_samples, net_avg_samples; static int cpu_avg_samples, net_avg_samples, diskio_avg_samples;
/* filenames for output */ /* filenames for output */
char *overwrite_file = NULL; FILE *overwrite_fpointer = NULL; char *overwrite_file = NULL; FILE *overwrite_fpointer = NULL;
@ -6534,6 +6534,7 @@ static void set_default_configurations(void)
total_run_times = 0; total_run_times = 0;
info.cpu_avg_samples = 2; info.cpu_avg_samples = 2;
info.net_avg_samples = 2; info.net_avg_samples = 2;
info.diskio_avg_samples = 2;
info.memmax = 0; info.memmax = 0;
top_cpu = 0; top_cpu = 0;
cpu_separate = 0; cpu_separate = 0;
@ -6934,6 +6935,18 @@ static void load_config_file(const char *f)
CONF_ERR; CONF_ERR;
} }
} }
CONF("diskio_avg_samples") {
if (value) {
diskio_avg_samples = strtol(value, 0, 0);
if (diskio_avg_samples < 1 || diskio_avg_samples > 14) {
CONF_ERR;
} else {
info.diskio_avg_samples = diskio_avg_samples;
}
} else {
CONF_ERR;
}
}
#ifdef HAVE_XDBE #ifdef HAVE_XDBE
CONF("double_buffer") { CONF("double_buffer") {

View File

@ -229,6 +229,8 @@ struct information {
unsigned int net_avg_samples; unsigned int net_avg_samples;
unsigned int diskio_avg_samples;
float loadavg[3]; float loadavg[3];
struct mail_s *mail; struct mail_s *mail;

View File

@ -52,6 +52,9 @@
* also containing the totals. */ * also containing the totals. */
static struct diskio_stat stats = { static struct diskio_stat stats = {
.next = NULL, .next = NULL,
.sample = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
.sample_read = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
.sample_write = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
.current = 0, .current = 0,
.current_read = 0, .current_read = 0,
.current_write = 0, .current_write = 0,
@ -98,19 +101,40 @@ struct diskio_stat *prepare_diskio_stat(const char *s)
static void update_diskio_values(struct diskio_stat *ds, static void update_diskio_values(struct diskio_stat *ds,
unsigned int reads, unsigned int writes) unsigned int reads, unsigned int writes)
{ {
int i;
double sum=0, sum_r=0, sum_w=0;
if (reads < ds->last_read || writes < ds->last_write) { if (reads < ds->last_read || writes < ds->last_write) {
/* counter overflow or reset - rebase to sane values */ /* counter overflow or reset - rebase to sane values */
ds->last = 0; ds->last = reads+writes;
ds->last_read = 0; ds->last_read = reads;
ds->last_write = 0; ds->last_write = writes;
} }
/* since the values in /proc/diskstats are absolute, we have to substract /* since the values in /proc/diskstats are absolute, we have to substract
* our last reading. The numbers stand for "sectors read", and we therefore * our last reading. The numbers stand for "sectors read", and we therefore
* have to divide by two to get KB */ * have to divide by two to get KB */
ds->current_read = (reads - ds->last_read) / 2; ds->sample_read[0] = (reads - ds->last_read) / 2;
ds->current_write = (writes - ds->last_write) / 2; ds->sample_write[0] = (writes - ds->last_write) / 2;
ds->current = ds->current_read + ds->current_write; ds->sample[0] = ds->sample_read[0] + ds->sample_write[0];
/* compute averages */
for (i = 0; i < (signed) info.diskio_avg_samples; i++) {
sum += ds->sample[i];
sum_r += ds->sample_read[i];
sum_w += ds->sample_write[i];
}
ds->current = sum / (double) info.diskio_avg_samples;
ds->current_read = sum_r / (double) info.diskio_avg_samples;
ds->current_write = sum_w / (double) info.diskio_avg_samples;
/* shift sample history */
for (i = info.diskio_avg_samples-1; i > 0; i--) {
ds->sample[i] = ds->sample[i-1];
ds->sample_read[i] = ds->sample_read[i-1];
ds->sample_write[i] = ds->sample_write[i-1];
}
/* save last */
ds->last_read = reads; ds->last_read = reads;
ds->last_write = writes; ds->last_write = writes;
ds->last = ds->last_read + ds->last_write; ds->last = ds->last_read + ds->last_write;
@ -125,7 +149,7 @@ void update_diskio(void)
char buf[512], devbuf[64]; char buf[512], devbuf[64];
unsigned int major, minor; unsigned int major, minor;
unsigned int reads, writes; unsigned int reads, writes;
unsigned int total_reads, total_writes; unsigned int total_reads=0, total_writes=0;
int col_count = 0; int col_count = 0;
stats.current = 0; stats.current = 0;
@ -146,7 +170,7 @@ void update_diskio(void)
* *
* XXX: ignore devices which are part of a SW RAID (MD_MAJOR) */ * XXX: ignore devices which are part of a SW RAID (MD_MAJOR) */
if (col_count == 5 && major != LVM_BLK_MAJOR && major != NBD_MAJOR if (col_count == 5 && major != LVM_BLK_MAJOR && major != NBD_MAJOR
&& major != RAMDISK_MAJOR && major != LOOP_MAJOR) { && major != RAMDISK_MAJOR && major != LOOP_MAJOR && minor==0) {
total_reads += reads; total_reads += reads;
total_writes += writes; total_writes += writes;
} else { } else {

View File

@ -32,12 +32,15 @@
struct diskio_stat { struct diskio_stat {
struct diskio_stat *next; struct diskio_stat *next;
char *dev; char *dev;
unsigned int current; double sample[15];
unsigned int current_read; double sample_read[15];
unsigned int current_write; double sample_write[15];
unsigned int last; double current;
unsigned int last_read; double current_read;
unsigned int last_write; double current_write;
double last;
double last_read;
double last_write;
}; };
struct diskio_stat *prepare_diskio_stat(const char *s); struct diskio_stat *prepare_diskio_stat(const char *s);