SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#5901 2013-08-07 23:16:55

pidsley
Window Mangler
Registered: 2012-05-23
Posts: 1,752

Re: Conky v1.9 Thread

Inodoro Pereyra wrote:

How can I learn all this stuff???

http://www.grymoire.com/Unix/Sed.html
https://ixquick.com/do/search?cmd=proce … &ff=&abp=1

smile (in case it's not obvious)

Offline

Be excellent to each other!

#5902 2013-08-07 23:57:16

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

Inodoro Pereyra wrote:

How can I learn all this stuff???

@Sector11: those are not little teepees. Dogs need a place to sleep too.
And the ones on the side... Somebody dropped the port-a-potty...  roll

lol   lol   lol   lol  dogs - port-a-potties ... YEA RIGHT!  I forgot those

Do what I did ... CHEAT!  Look at Teo's weather script conkys:

@ Teo  YES YES YES!!!  5 of 5 Stars!
2013_08_07_20_49_26_1920x1080_Sector11.jpg

my S11_Arg-blue.conky

# killall conky && conky -c /media/5/Conky/S11_Arg-blue.conky &
###  Begin Window Settings  ##################################################
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager
#own_window_colour gray
own_window_class Conky
own_window_title S11

# Use the Xdbe extension? (eliminates flicker)
# It is highly recommended to use own window with this one
# so double buffer won't be so big.
double_buffer yes

### ARGB can be used for real transparency
### NOTE that a composite manager is required for real transparency.
### This option will not work as desired (in most cases) in conjunction with
### own_window_type normal
# own_window_argb_visual yes

### When ARGB visuals are enabled, this use this to modify the alpha value
### Use: own_window_type normal
### Use: own_window_transparent no
### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
# own_window_argb_value 0

minimum_size 150 0     ## width, height
#maximum_width 210      ## width

gap_x 300 # left-right
gap_y 10 # up-down

alignment tl
###################################################  End Window Settings  ###
###  Font Settings  #########################################################
# Use Xft (anti-aliased font and stuff)
use_xft yes
xftfont Monofur:bold:size=11
#xftfont WW Digital:size=10
#xftfont Anonymous Pro:size=9

# Alpha of Xft font. Must be a value at or between 1 and 0 ###
xftalpha 1
# Force UTF8? requires XFT ###
override_utf8_locale yes

uppercase no
######################################################  End Font Settings  ###
###  Color Settings  #########################################################
draw_shades yes #no # amplifies text if yes
default_shade_color 000000

draw_outline no # amplifies text if yes
default_outline_color 000000

#default_color DCDCDC #220 220 220	Gainsboro
#default_color C0C0C0 #192 192 192 Silver
default_color B0E0E6 #176 224 230 PowderBlue
color0 8FBC8F #143 188 143	DarkSeaGreen
color1 778899 #119 136 153	LightSlateGray
color2 D8BFD8 #216 191 216	Thistle
color3 9ACD32 #154 205  50	YellowGreen
color4 FFA07A #255 160 122	LightSalmon
color5 FFDEAD #255 222 173	NavajoWhite
color6 00BFFF #  0 191 255	DeepSkyBlue
color7 5F9EA0 # 95 158 160	CadetBlue
color8 BDB76B #189 183 107	DarkKhaki
color9 CD5C5C #205  92  92	IndianRed  #FF0000 #255   0   0	Red
#####################################################  End Color Settings  ###
###  Borders Section  ########################################################
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_inner_margin 5
border_outer_margin 0
# border width
border_width 0
# graph borders
draw_graph_borders yes
#default_graph_size 15 40
#####################################################  End Borders Secton  ###
###  Miscellaneous Section  ##################################################
# Boolean value, if true, Conky will be forked to background when started.
background no

# Adds spaces around certain objects to stop them from moving other things
# around, this only helps if you are using a mono font
# Options: right, left or none
use_spacer none

# Default and Minimum size is 256 - needs more for single commands that
# "call" a lot of text IE: bash scripts
text_buffer_size 512

# Subtract (file system) buffers from used memory?
no_buffers yes

# change GiB to G and MiB to M
short_units yes

# Like it says, ot pads the decimals on % values
# doesn't seem to work since v1.7.1
pad_percents 2

#   Maximum size of user text buffer, i.e. layout below TEXT line in config file
#  (default is 16384 bytes)
# max_user_text 16384

# Width for $top name value (default 15 characters)
top_name_width 6

# Desired output unit of all objects displaying a temperature. Parameters are
# either "fahrenheit" or "celsius". The default unit is degree Celsius.
# temperature_unit Fahrenheit

##############################################  End Miscellaneous Section  ###
###  LUA Settings  ###########################################################
## Above and After TEXT - requires a composite manager or blinks.
##
# lua_load /media/5/Conky/LUA/draw-bg.lua
#TEXT
#${lua conky_draw_bg 10 0 0 0 0 0x000000 0.2}
#
## ${lua conky_draw_bg corner_radius x_position y_position width height color alpha}
##
## OR Both above TEXT (No composite manager required - no blinking!)
#
lua_load /media/5/Conky/LUA/draw-bg.lua
lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.3
#lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.2
# lua_draw_hook_post draw-bg 125 0 0 0 0 0x000000 0.01
#
# TEXT
#
#######################################################  End LUA Settings  ###

## │ ─ ┌ ┬ ┐ └ ┴ ┘ ├ ┼ ┤
## ║ ═ ╔ ╦ ╗ ╚ ╩ ╝ ╠ ╬ ╣

## ↑ ↓ → ← ↔ ► ◄ ▲ ▼ « »
## ░  ▒  ▓ ☺ ☻ ♥ ♦ ♣ ♠
## • ◘ ○ ◙ ♂ ♀ ♪ ♫ ☼
## ¼ ½ ¾ ® ©

update_interval 1
TEXT
${execpi 3600 /media/5/Conky/scripts/blue/blue.sh}\
${color5}Oficial\
${goto 70}${color0}Compra${goto 130}${color9}Venta${color}
${color7}${execpi 1800 sed -n '2p' /media/5/Conky/scripts/blue/raw_data}\
${goto 70}${color0}${execpi 1800 sed -n '3p' /media/5/Conky/scripts/blue/raw_data}\
${goto 130}${color9}${execpi 1800 sed -n '4p' /media/5/Conky/scripts/blue/raw_data}
${color1}Fecha ${execpi 1800 sed -n '5p' /media/5/Conky/scripts/blue/raw_data}${color}

${color5}Informal${alignr 10}${color6}(Blue)${color}
${execpi 1800 sed -n '7p' /media/5/Conky/scripts/blue/raw_data}\
${goto 70}${color0}${execpi 1800 sed -n '8p' /media/5/Conky/scripts/blue/raw_data}\
${goto 130}${color9}${execpi 1800 sed -n '9p' /media/5/Conky/scripts/blue/raw_data}
${color1}Fecha ${execpi 1800 sed -n '10p' /media/5/Conky/scripts/blue/raw_data}${color}

${color5}Mayorista Bancos
${color}??%\
${goto 70}${color0}${execpi 1800 sed -n '12p' /media/5/Conky/scripts/blue/raw_data}\
${goto 130}${color9}${execpi 1800 sed -n '13p' /media/5/Conky/scripts/blue/raw_data}
${color1}Fecha ${execpi 1800 sed -n '14p' /media/5/Conky/scripts/blue/raw_data}${color}

${color5}Contado con Liquidación${color}
${execpi 1800 sed -n '16p' /media/5/Conky/scripts/blue/raw_data}\
${alignr 10}Ref: ${execpi 1800 sed -n '17p' /media/5/Conky/scripts/blue/raw_data}${color}
${color1}Fecha ${execpi 1800 sed -n '18p' /media/5/Conky/scripts/blue/raw_data}${color}

${color5}Dólar Soja${color}
${execpi 1800 sed -n '20p' /media/5/Conky/scripts/blue/raw_data}\
${alignr 10}Ref: ${execpi 1800 sed -n '21p' /media/5/Conky/scripts/blue/raw_data}
${color1}Fecha ${execpi 1800 sed -n '22p' /media/5/Conky/scripts/blue/raw_data}${color}

${color5}Dólar Tarjeta
${color7}${execpi 1800 sed -n '24p' /media/5/Conky/scripts/blue/raw_data}${color}\
${alignr 10}Ref: ${execpi 1800 sed -n '25p' /media/5/Conky/scripts/blue/raw_data}
${color1}Fecha ${execpi 1800 sed -n '26p' /media/5/Conky/scripts/blue/raw_data}${color}

Last edited by Sector11 (2013-08-07 23:59:26)


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#5903 2013-08-08 00:38:27

Inodoro Pereyra
#! Die Hard
From: Back in Buenos Aires
Registered: 2013-07-01
Posts: 844

Re: Conky v1.9 Thread

@Pidsley: thank you for the links. I do have the grimoire link. Been reading on it, but my Chinese is a little rusty... lol  lol
Will look at the other one. big_smile

@S11. Great conky, as usual. But I don't have a 750" monitor, so I had to do it a little simpler... neutral

Screenshot_08072013_09_33_36_PM.jpg

Green for the "official" price, blue for the... uh... "blue", and red for the "tarjeta", because that's what you see when the statement comes... lol  lol

Now I gotta get a graph...

Thank you all for all your help. big_smile

Last edited by Inodoro Pereyra (2013-08-08 00:39:07)

Offline

#5904 2013-08-08 03:04:13

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

Inodoro Pereyra wrote:

Thank you all for all your help. big_smile

I don't think the graph will happen ... it's something "generated" on the fly.  Hey, my monitor isn't THAT big ... and only one not dual it triple like some here.  big_smile

I just did that as a test, I'll probably trim it back to Oficial y Blue - they don't affect me but just for interest.

I have a feeling that the rates there are updated only once a day.


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#5905 2013-08-08 17:41:15

PackRat
#! Die Hard
From: USA
Registered: 2011-03-03
Posts: 1,572

Re: Conky v1.9 Thread

Inodoro Pereyra wrote:

Now I gotta get a graph...

Can your data be exported to a text file? If so, you may be able to plot the data with a program like gnuplot or grace and display the graph. I believe both will export their graphs to jpg or tif format; conky could display the image.

I can see where that would be a complex and resource hungry process though - but if the rates are only updated once a day as Sector11 thinks, it might not be too bad.


"It does not require many words to speak the truth." - Chief Joseph, Nez Perce tribe

Offline

#5906 2013-08-08 18:34:10

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

PackRat wrote:
Inodoro Pereyra wrote:

Now I gotta get a graph...

Can your data be exported to a text file? If so, you may be able to plot the data with a program like gnuplot or grace and display the graph. I believe both will export their graphs to jpg or tif format; conky could display the image.

I can see where that would be a complex and resource hungry process though - but if the rates are only updated once a day as Sector11 thinks, it might not be too bad.

The "rates" look like they update a few times a day during banking hours!

Well done PackRat!!  While that "chart" is a script created thing ... the info used to created it is in the index.html page.

I did a:

 08 Aug 13 | 15:12:27 /media/5/Conky/scripts/blue
    $ wget http://www.ambito.com/economia/mercados/monedas/dolar/

and BINGO!!!!!!!!!!!!!!!!
2013_08_08_15_26_08_1920x1080_Sector11.jpg
there it is ... official and blue!!!!!

Now the hard part - - - because I don't know how to get it out and into a usable form.

But - that chart is a daily thing, it could be a script that runs once every 7200 (12 hours) and be accurate enough.

Last edited by Sector11 (2013-08-08 18:37:16)


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#5907 2013-08-08 18:53:43

PackRat
#! Die Hard
From: USA
Registered: 2011-03-03
Posts: 1,572

Re: Conky v1.9 Thread

@Sector11

Creating the graph may actually be fairly easy - based on your screenshot, it looks like the bank is using jqplot to create the graph (looks like a call to jqplot in the 1st line of the data block).

jqplot is free and open source .... . That data may be able to be extracted as is and sent directly to jqplot. May only need to know some java (which I don't).

Edit - looks like jqplot is for creating charts in web pages; didn't read far enough to see if the image can be exported as a jpg or some other format. Maybe revisit those java apps "k" came up with for weather way back when?

Last edited by PackRat (2013-08-08 19:00:52)


"It does not require many words to speak the truth." - Chief Joseph, Nez Perce tribe

Offline

#5908 2013-08-08 19:30:07

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

@ PackRat

Well, like you, I don't know how either, but maybe someone reading this does.

At least you got things going in the right direction - Thanks for that.

Hmmmmmm weblint-perl is usable in conky I think ....

Last edited by Sector11 (2013-08-08 19:34:33)


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#5909 2013-08-09 01:13:31

Inodoro Pereyra
#! Die Hard
From: Back in Buenos Aires
Registered: 2013-07-01
Posts: 844

Re: Conky v1.9 Thread

Thank you very much PackRat and Sector11 for your help. I just read your comments, don't have the first clue what you both are talking about, but I'm really liking where all this is going.

Did nothing on conky today (been busy buying and installing my new printer), but I will take a look at it tomorrow.  big_smile

Offline

#5910 2013-08-10 10:54:32

qrosh
New Member
Registered: 2013-06-23
Posts: 6

Re: Conky v1.9 Thread

thats my simple conky:
http://img15.imageshack.us/img15/4504/s83w.png

background yes
use_xft yes
xftfont Sans:size=8
xftalpha 1
update_interval 1.0
total_run_times 0
own_window yes
own_window_transparent yes
own_window_type desktop
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 200 250
maximum_width 200
draw_shades yes
draw_outline no
draw_borders no
draw_graph_borders yes
default_color white
default_shade_color black
default_outline_color white
alignment top_right
gap_x 12
gap_y 50
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale no

TEXT
${font sans-serif:bold:size=8}SYSTEM ${hr 2}
${font sans-serif:normal:size=8}$sysname $kernel $alignr $machine
Host:$alignr$nodename
Uptime:$alignr$uptime
${if_existing /sys/class/power_supply/BAT0}
${font sans-serif:bold:size=8}BATTERY ${hr 2}
${font sans-serif:size=8}${battery_time BAT0} $alignr${battery BAT0} 
${battery_bar BAT0}
${endif}
${font sans-serif:bold:size=8}PROCESSORS ${hr 2}
${font sans-serif:normal:size=8}CPU0: ${cpu cpu0}% ${cpubar cpu0}
CPU1: ${cpu cpu1}% ${cpubar cpu1}
CPU2: ${cpu cpu2}% ${cpubar cpu2}
CPU3: ${cpu cpu3}% ${cpubar cpu3}

${font sans-serif:bold:size=8}MEMORY ${hr 2}
${font sans-serif:normal:size=8}RAM $alignc $mem / $memmax $alignr $memperc%
$membar
SWAP $alignc ${swap} / ${swapmax} $alignr ${swapperc}%
${swapbar}

${font sans-serif:bold:size=8}DISKS ${hr 2}
${font sans-serif:normal:size=8}/ $alignc ${fs_used /} / ${fs_size /} $alignr ${fs_used_perc /}%
${fs_bar /}
${font sans-serif:normal:size=8}/home $alignc ${fs_used /home} / ${fs_size /home} $alignr ${fs_used_perc /home}%
${fs_bar /home}

${font sans-serif:bold:size=8}TOP PROCESSES ${hr 2}
${font sans-serif:normal:size=8}$processes processes ($running_processes running)
$font${top_mem name 1}${alignr}${top mem 1} %
$font${top_mem name 2}${alignr}${top mem 2} %
$font${top_mem name 3}${alignr}${top mem 3} %
$font${top_mem name 4}${alignr}${top mem 4} %
$font${top_mem name 5}${alignr}${top mem 5} %

${font sans-serif:bold:size=8}NETWORK ${hr 2}
${font sans-serif:normal:size=8}IP address: $alignr ${addr wlan0}
ESSID: $alignr ${wireless_essid wlan0}
Connection quality: $alignr ${wireless_link_qual_perc wlan0}%
${downspeedgraph wlan0 F57900 FCAF3E}
Incoming: ${downspeed wlan0}/s $alignr total: ${totaldown wlan0}
${upspeedgraph wlan0 F57900 FCAF3E}
Outgoing: ${upspeed wlan0}/s $alignr total: ${totalup wlan0}

Offline

#5911 2013-08-11 09:11:49

Nili
#! Die Hard
From: 127.0.0.1
Registered: 2013-03-20
Posts: 811
Website

Re: Conky v1.9 Thread

Hello, can someone help me with conky/vnstat (month)

I have used Linux Mint 14 (nadia) before upgrade to Linux Mint Olivia 15

I used this code

${color2}this month:${color1}${alignr}${execi 300 vnstat -m -i eth0 | grep `date | cut -d' ' -f2` | awk '{print $3 $4}'}/${color3}${execi 300 vnstat -m -i eth0 | grep `date | cut -d' ' -f2` | awk '{print $6 $7}'}${color}

to show monthly traffic, it worked pretty good on Mint 14, on Olivia 15 not appear any info except blank space.
091i.png

the terminal output show

Usage: grep [OPTION]... PATTERN [FILE]...
Try 'grep --help' for more information.
Usage: grep [OPTION]... PATTERN [FILE]...
Try 'grep --help' for more information.

Never had this problem before, i used the same code just switched from Mint 14 to Mint 15.

while vnstat -m

 eth0  /  monthly

       month        rx      |     tx      |    total    |   avg. rate
    ------------------------+-------------+-------------+---------------
      Aug '13      2.39 GiB |  231.09 MiB |    2.61 GiB |   24.23 kbit/s
    ------------------------+-------------+-------------+---------------
    estimated      7.07 GiB |     684 MiB |    7.73 GiB |

seems OK.

While the daily, yesterday and weekly traffic apperar without a problem. I do not know where is the problem, can someone help me with above code? It's ok or need to be changed somewhere?

Thanks in advance.


# Debian GNU/Linux 8:8.2 (netinst/stable)
# Packages Installed: 541
# Linux debian 3.16.0-4-686-pae #1 SMP Debian 3.16.7-ckt11-1+deb8u4 (2015-09-19) i686 GNU/Linux
# Startup finished in 2.850s (kernel) + 6.473s (userspace) = 9.324s

Offline

#5912 2013-08-11 13:36:21

dk75
#! Junkie
Registered: 2012-06-14
Posts: 250

Re: Conky v1.9 Thread

${color2}this month:${color1}${alignr}${execi 300 vnstat -m -i eth0 | mawk '$0 ~ "'$(date +%b)'" {print $3 $4}'}/${color3}${execi 300 vnstat -m -i eth0 | mawk '$0 ~ "'$(date +%b)'" {print $6 $7}'}${color}

Last edited by dk75 (2013-08-11 13:36:54)


Debian Sid (Minted) x86_64/3.12-10, Conky 2.0_pre, Xorg 7.7/1.15.0, KDE 4.11.5, Intel X3100
Lenovo T61, HITACHI HTS722010K9SA00 100GB, WDC_WD5000BEVT 500GB
Linux user No.: 483055 | Conky Pitstop

Offline

#5913 2013-08-11 14:07:13

Nili
#! Die Hard
From: 127.0.0.1
Registered: 2013-03-20
Posts: 811
Website

Re: Conky v1.9 Thread

Thanks dk75 but the results are still the same just blank space on the month, the error on terminal output is gone anyway.

Perhaps the results not showing because i just installed Mint Olivia 5 day ago?

Should i wait to pass a month eg. september to be appear again?

I not know but have tried some different codes but none works.  I 'am afraid I have to wait a month that the information of vnstat to stored for a month.


# Debian GNU/Linux 8:8.2 (netinst/stable)
# Packages Installed: 541
# Linux debian 3.16.0-4-686-pae #1 SMP Debian 3.16.7-ckt11-1+deb8u4 (2015-09-19) i686 GNU/Linux
# Startup finished in 2.850s (kernel) + 6.473s (userspace) = 9.324s

Offline

#5914 2013-08-11 14:36:40

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

Nili wrote:

Thanks in advance.

Try these in a terminal:

vnstat -m | grep "`date +"%b %y"`" | awk '{print $3" "$4}'
vnstat -m | grep "`date +"%b %y"`" | awk '{print $6" "$7}'
vnstat -m | grep "`date +"%b %y"`" | awk '{print $9" "$10}'

vnstat -m | grep "`date +"%b %y"`" | awk '{print $1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9" "$10" "$11" "$12" "$13}'
 11 Aug 13 | 11:40:22 ~
    $ vnstat -m | grep "`date +"%b %y"`" | awk '{print $3" "$4}'
674 KB
 
 11 Aug 13 | 11:40:25 ~
    $ vnstat -m | grep "`date +"%b %y"`" | awk '{print $6" "$7}'
11 KB
 
 11 Aug 13 | 11:40:33 ~
    $ vnstat -m | grep "`date +"%b %y"`" | awk '{print $9" "$10}'
685 KB
 
 11 Aug 13 | 11:40:46 ~
    $ vnstat -m | grep "`date +"%b %y"`" | awk '{print $1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9" "$10" "$11" "$12" "$13}'
Aug 13 674 KB | 11 KB | 685 KB | 0.01 kbit/s
 
 11 Aug 13 | 11:40:59 ~
    $ 

Then in a conky:

${ececpi 10 vnstat -m | grep "`date +"%b %y"`" | awk '{print $3" "$4}'}
${ececpi 10 vnstat -m | grep "`date +"%b %y"`" | awk '{print $6" "$7}'}
${ececpi 10 vnstat -m | grep "`date +"%b %y"`" | awk '{print $9" "$10}'}

${ececpi 10 vnstat -m | grep "`date +"%b %y"`" | awk '{print $1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9" "$10" "$11" "$12" "$13}'}

I think it was dk75 that gave me those a long time ago!

I got rid of that '13  --> 13 by creating ~/.vnstatrc:

# vnStat 1.11 config file
##
# default interface
Interface "eth0"

# location of the database directory
DatabaseDir "/var/lib/vnstat"

# locale (LC_ALL) ("-" = use system locale)
Locale "-"

# on which day should months change
MonthRotate 1  ### change if ISP limits start on a different day

# date output formats for -d, -m, -t and -w
# see 'man date' for control codes
#DayFormat    "%x"
DayFormat    "%d/%m/%y"
MonthFormat  "%b %y"
#TopFormat    "%x"
TopFormat    "%d/%m/%y"

# characters used for visuals
RXCharacter       "%"
TXCharacter       ":"
RXHourCharacter   "r"
TXHourCharacter   "t"

# how units are prefixed when traffic is shown
# 0 = IEC standard prefixes (KiB/MiB/GiB/TiB)
# 1 = old style binary prefixes (KB/MB/GB/TB)
UnitMode 1

# output style
# 0 = minimal & narrow, 1 = bar column visible
# 2 = same as 1 except rate in summary and weekly
# 3 = rate column visible
OutputStyle 3

# used rate unit (0 = bytes, 1 = bits)
RateUnit 1

# maximum bandwidth (Mbit) for all interfaces, 0 = disable feature
# (unless interface specific limit is given)
MaxBandwidth 100

# interface specific limits
#  example 8Mbit limit for eth0 (remove # to activate):
#MaxBWeth0 8

# how many seconds should sampling for -tr take by default
Sampletime 5

# default query mode
# 0 = normal, 1 = days, 2 = months, 3 = top10
# 4 = dumpdb, 5 = short, 6 = weeks, 7 = hours
QueryMode 0

# filesystem disk space check (1 = enabled, 0 = disabled)
CheckDiskSpace 1

# database file locking (1 = enabled, 0 = disabled)
UseFileLocking 1

# how much the boot time can variate between updates (seconds)
BootVariation 15

# log days without traffic to daily list (1 = enabled, 0 = disabled)
TrafficlessDays 1

# vnstatd
##

# how often (in seconds) interface data is updated
UpdateInterval 30

# how often (in seconds) interface status changes are checked
PollInterval 5

# how often (in minutes) data is saved to file
SaveInterval 5

# how often (in minutes) data is saved when all interface are offline
OfflineSaveInterval 30

# force data save when interface status changes (1 = enabled, 0 = disabled)
SaveOnStatusChange 1

# enable / disable logging (0 = disabled, 1 = logfile, 2 = syslog)
UseLogging 2

# file used for logging if UseLogging is set to 1
LogFile "/var/log/vnstat.log"

# file used as daemon pid / lock file
PidFile "/var/run/vnstat.pid"

# vnstati
##

# title timestamp format
HeaderFormat "%x %H:%M"

# show hours with rate (1 = enabled, 0 = disabled)
HourlyRate 1

# show rate in summary (1 = enabled, 0 = disabled)
SummaryRate 1

# layout of summary (1 = with monthly, 0 = without monthly)
SummaryLayout 1

# transparent background (1 = enabled, 0 = disabled)
TransparentBg 0

# image colors
CBackground     "FFFFFF"
CEdge           "AEAEAE"
CHeader         "606060"
CHeaderTitle    "FFFFFF"
CHeaderDate     "FFFFFF"
CText           "000000"
CLine           "B0B0B0"
CLineL          "-"
CRx             "92CF00"
CTx             "606060"
CRxD            "-"
CTxD            "-"

Gotta run ... voting day!

Last edited by Sector11 (2013-08-11 14:43:49)


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#5915 2013-08-11 17:22:33

dk75
#! Junkie
Registered: 2012-06-14
Posts: 250

Re: Conky v1.9 Thread

Show

date

instead


Debian Sid (Minted) x86_64/3.12-10, Conky 2.0_pre, Xorg 7.7/1.15.0, KDE 4.11.5, Intel X3100
Lenovo T61, HITACHI HTS722010K9SA00 100GB, WDC_WD5000BEVT 500GB
Linux user No.: 483055 | Conky Pitstop

Offline

#5916 2013-08-11 19:35:18

Apathetic
Member
From: Philippines
Registered: 2013-05-25
Posts: 34
Website

Re: Conky v1.9 Thread

Greetings! How do get my upload and download graphs working? I just copied the config somewhere here.

3hBlG

background yes
use_xft yes
xftfont Sans:size=8
xftalpha 1
update_interval 1.0
total_run_times 0
own_window yes
own_window_transparent yes
own_window_type desktop
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 200 250
maximum_width 200
draw_shades yes
draw_outline no
draw_borders no
draw_graph_borders yes
default_color white
default_shade_color black
default_outline_color white
alignment top_right
gap_x 12
gap_y 50
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale no

TEXT
${font sans-serif:bold:size=8}SYSTEM ${hr 2}
${font sans-serif:normal:size=8}$sysname $kernel $alignr $machine
Host:$alignr$nodename
Uptime:$alignr$uptime
${if_existing /sys/class/power_supply/BAT0}
${font sans-serif:bold:size=8}BATTERY ${hr 2}
${font sans-serif:size=8}${battery_time BAT0} $alignr${battery BAT0} 
${battery_bar BAT0}
${endif}
${font sans-serif:bold:size=8}PROCESSORS ${hr 2}
${font sans-serif:normal:size=8}CPU0: ${cpu cpu0}% ${cpubar cpu0}
CPU1: ${cpu cpu1}% ${cpubar cpu1}
CPU2: ${cpu cpu2}% ${cpubar cpu2}
CPU3: ${cpu cpu3}% ${cpubar cpu3}

${font sans-serif:bold:size=8}MEMORY ${hr 2}
${font sans-serif:normal:size=8}RAM $alignc $mem / $memmax $alignr $memperc%
$membar
SWAP $alignc ${swap} / ${swapmax} $alignr ${swapperc}%
${swapbar}

${font sans-serif:bold:size=8}DISKS ${hr 2}
${font sans-serif:normal:size=8}/ $alignc ${fs_used /} / ${fs_size /} $alignr ${fs_used_perc /}%
${fs_bar /}
${font sans-serif:normal:size=8}/home $alignc ${fs_used /home} / ${fs_size /home} $alignr ${fs_used_perc /home}%
${fs_bar /home}

${font sans-serif:bold:size=8}TOP PROCESSES ${hr 2}
${font sans-serif:normal:size=8}$processes processes ($running_processes running)
$font${top_mem name 1}${alignr}${top mem 1} %
$font${top_mem name 2}${alignr}${top mem 2} %
$font${top_mem name 3}${alignr}${top mem 3} %
$font${top_mem name 4}${alignr}${top mem 4} %
$font${top_mem name 5}${alignr}${top mem 5} %

${font sans-serif:bold:size=8}NETWORK ${hr 2}
${font sans-serif:normal:size=8}IP address: $alignr ${addr eth0}
${downspeedgraph eth0 F57900 FCAF3E}
Incoming: ${downspeed eth0}/s $alignr total: ${totaldown eth0}
${upspeedgraph eth0 F57900 FCAF3E}
Outgoing: ${upspeed eth0}/s $alignr total: ${totalup eth0}

EDIT It actually appears to be already working!!

hwtIG

Last edited by Apathetic (2013-08-11 19:39:20)

Offline

#5917 2013-08-11 20:36:38

Inodoro Pereyra
#! Die Hard
From: Back in Buenos Aires
Registered: 2013-07-01
Posts: 844

Re: Conky v1.9 Thread

Sector11 wrote:
PackRat wrote:
Inodoro Pereyra wrote:

Now I gotta get a graph...

Can your data be exported to a text file? If so, you may be able to plot the data with a program like gnuplot or grace and display the graph. I believe both will export their graphs to jpg or tif format; conky could display the image.

I can see where that would be a complex and resource hungry process though - but if the rates are only updated once a day as Sector11 thinks, it might not be too bad.

The "rates" look like they update a few times a day during banking hours!

Well done PackRat!!  While that "chart" is a script created thing ... the info used to created it is in the index.html page.

I did a:

 08 Aug 13 | 15:12:27 /media/5/Conky/scripts/blue
    $ wget http://www.ambito.com/economia/mercados/monedas/dolar/

and BINGO!!!!!!!!!!!!!!!!
http://s20.postimg.org/tigo51fd5/2013_08_08_15_26_08_1920x1080_Sector11.jpg
there it is ... official and blue!!!!!

Now the hard part - - - because I don't know how to get it out and into a usable form.

But - that chart is a daily thing, it could be a script that runs once every 7200 (12 hours) and be accurate enough.

Ok, been reading a lot, and trying to make it work. Got the "index.html" file to show, and got the plot information. But that's about as far as I could get. Gnuplot is so far over my head, I wouldn't be able to get it with a telescope.

So far, (after installing gnuplot) I tried to follow the instructions I found in here http://gnuplot.sourceforge.net/demo/simple.8.gnu.
So I made this script, just with the purpose of drawing a plot, so I could later figure how to get the actual data displayed:

#!/bin/bash

# set terminal pngcairo  transparent enhanced font "arial,10" fontscale 1.0 size 500, 350 
# set output 'simple.8.png'
set key bmargin left horizontal Right noreverse enhanced autotitles box linetype -1 linewidth 1.000
set samples 800, 800
plot [-19:19] '2.dat' '('chartdolar', [[['2013/07/15',5.44],['2013/07/16',5.445],['2013/07/17',5.445],['2013/07/18',5.455],['2013/07/19',5.47],['2013/07/22',5.47],['2013/07/23',5.47],['2013/07/24',5.47],['2013/07/25',5.485],['2013/07/26',5.49],['2013/07/29',5.50],['2013/07/30',5.505],['2013/07/31',5.515],['2013/08/01',5.52],['2013/08/02',5.525],['2013/08/05',5.53],['2013/08/06',5.535],['2013/08/07',5.535],['2013/08/08',5.55],['2013/08/09',5.55]], [['2013/07/15',8.58],['2013/07/16',8.75],['2013/07/17',8.75],['2013/07/18',8.57],['2013/07/19',8.52],['2013/07/22',8.50],['2013/07/23',8.50],['2013/07/24',8.58],['2013/07/25',8.51],['2013/07/26',8.51],['2013/07/29',8.53],['2013/07/30',8.53],['2013/07/31',8.53],['2013/08/01',8.54],['2013/08/02',8.56],['2013/08/05',8.56],['2013/08/06',8.58],['2013/08/07',8.60],['2013/08/08',8.62],['2013/08/09',8.62]]],'

However, the best I could get is this:

bernardo@Bernardo:~$ bash plot
plot: line 7: plot: command not found
bernardo@Bernardo:~$ 

I don't get how can it "not find" the command "plot", when gnuplot is installed, and I'm basically copy/pasting the script on the gnuplot site... sad


What am I doing wrong, this time?

Offline

#5918 2013-08-11 21:50:28

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

Nili wrote:

Thanks dk75 but the results are still the same just blank space on the month, the error on terminal output is gone anyway.

Perhaps the results not showing because i just installed Mint Olivia 5 day ago?

Should i wait to pass a month eg. september to be appear again?

I not know but have tried some different codes but none works.  I 'am afraid I have to wait a month that the information of vnstat to stored for a month.

You should have data for the last 5 days at least

if that work

vnstat -d

should show the 5 days.

Did you initialize the database?

 11 Aug 13 | 18:32:19 ~
    $ sudo vnstat -u -i eth0

... if you did that you should have data for at least 5 days ... what do you get for:

vnstat -d
vnstat -w
vnstat -m

mine is NEW as of today ... so not a lot:

 11 Aug 13 | 18:41:05 ~
    $ vnstat -d

 eth0  /  daily

         day         rx      |     tx      |    total    |   avg. rate
     ------------------------+-------------+-------------+---------------
      11/08/13        674 KB |       11 KB |      685 KB |    0.08 kbit/s
     ------------------------+-------------+-------------+---------------
     estimated        --     |      --     |      --     |
 
 11 Aug 13 | 18:41:16 ~
    $ vnstat -w

 eth0  /  weekly

                      rx      |     tx      |    total    |   avg. rate
   ---------------------------+-------------+-------------+---------------
    last 7 days        674 KB |       11 KB |      685 KB |    0.01 kbit/s
   current week        674 KB |       11 KB |      685 KB |    0.01 kbit/s
   ---------------------------+-------------+-------------+---------------
      estimated        --     |      --     |      --     |
 
 11 Aug 13 | 18:41:19 ~
    $ vnstat -m

 eth0  /  monthly

       month        rx      |     tx      |    total    |   avg. rate
    ------------------------+-------------+-------------+---------------
       Aug 13        674 KB |       11 KB |      685 KB |    0.01 kbit/s
    ------------------------+-------------+-------------+---------------
    estimated        --     |      --     |      --     |
 
 11 Aug 13 | 18:41:22 ~
    $ 

.


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#5919 2013-08-11 21:54:56

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

Inodoro Pereyra wrote:

I don't get how can it "not find" the command "plot", when gnuplot is installed, and I'm basically copy/pasting the script on the gnuplot site... sad

What am I doing wrong, this time?

Just installed it ... to play/learn with you.

I am here: Gnuplot 4.2 Tutorial - looking at gnuplot.py as well  big_smile


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#5920 2013-08-11 22:14:55

Nili
#! Die Hard
From: 127.0.0.1
Registered: 2013-03-20
Posts: 811
Website

Re: Conky v1.9 Thread

Sector11 wrote:

You should have data for the last 5 days at least

if that work

vnstat -d

should show the 5 days.

Did you initialize the database?

Yes i did, but to be sure just did it again once or twice

Sector11 wrote:
 11 Aug 13 | 18:32:19 ~
    $ sudo vnstat -u -i eth0

... if you did that you should have data for at least 5 days ... what do you get for:

vnstat -d
vnstat -w
vnstat -m

mine is NEW as of today ... so not a lot:

 11 Aug 13 | 18:41:05 ~
    $ vnstat -d

 eth0  /  daily

         day         rx      |     tx      |    total    |   avg. rate
     ------------------------+-------------+-------------+---------------
      11/08/13        674 KB |       11 KB |      685 KB |    0.08 kbit/s
     ------------------------+-------------+-------------+---------------
     estimated        --     |      --     |      --     |
 
 11 Aug 13 | 18:41:16 ~
    $ vnstat -w

 eth0  /  weekly

                      rx      |     tx      |    total    |   avg. rate
   ---------------------------+-------------+-------------+---------------
    last 7 days        674 KB |       11 KB |      685 KB |    0.01 kbit/s
   current week        674 KB |       11 KB |      685 KB |    0.01 kbit/s
   ---------------------------+-------------+-------------+---------------
      estimated        --     |      --     |      --     |
 
 11 Aug 13 | 18:41:19 ~
    $ vnstat -m

 eth0  /  monthly

       month        rx      |     tx      |    total    |   avg. rate
    ------------------------+-------------+-------------+---------------
       Aug 13        674 KB |       11 KB |      685 KB |    0.01 kbit/s
    ------------------------+-------------+-------------+---------------
    estimated        --     |      --     |      --     |
 
 11 Aug 13 | 18:41:22 ~
    $ 

.

Here's mine

Daily

 eth0  /  daily

         day         rx      |     tx      |    total    |   avg. rate
     ------------------------+-------------+-------------+---------------
      08/07/13    463.43 MiB |  103.52 MiB |  566.95 MiB |   53.76 kbit/s
      08/08/13    991.41 MiB |   48.14 MiB |    1.02 GiB |   98.56 kbit/s
      08/09/13    371.74 MiB |   35.77 MiB |  407.51 MiB |   38.64 kbit/s
      08/10/13    264.39 MiB |   22.11 MiB |  286.50 MiB |   27.16 kbit/s
      08/11/13    659.72 MiB |   36.01 MiB |  695.73 MiB |   65.97 kbit/s
      08/12/13      1.06 MiB |     179 KiB |    1.23 MiB |   14.81 kbit/s
     ------------------------+-------------+-------------+---------------
     estimated        --     |      --     |      --     |

Weekly

eth0  /  weekly

                      rx      |     tx      |    total    |   avg. rate
   ---------------------------+-------------+-------------+---------------
    last 7 days      2.69 GiB |  245.72 MiB |    2.93 GiB |   47.31 kbit/s
      last week      2.69 GiB |  245.55 MiB |    2.93 GiB |   40.58 kbit/s
   current week      1.06 MiB |     179 KiB |    1.23 MiB |   14.81 kbit/s
   ---------------------------+-------------+-------------+---------------
      estimated        --     |      --     |      --     |

Monthly

 eth0  /  monthly

       month        rx      |     tx      |    total    |   avg. rate
    ------------------------+-------------+-------------+---------------
      Aug '13      2.69 GiB |  245.72 MiB |    2.93 GiB |   25.82 kbit/s
    ------------------------+-------------+-------------+---------------
    estimated      7.57 GiB |     689 MiB |    8.24 GiB |

Thanks for your input.

I'll check and let you know regarding the post "#5914"
Thank you once again

Last edited by Nili (2013-08-11 22:16:22)


# Debian GNU/Linux 8:8.2 (netinst/stable)
# Packages Installed: 541
# Linux debian 3.16.0-4-686-pae #1 SMP Debian 3.16.7-ckt11-1+deb8u4 (2015-09-19) i686 GNU/Linux
# Startup finished in 2.850s (kernel) + 6.473s (userspace) = 9.324s

Offline

#5921 2013-08-11 22:28:50

Nili
#! Die Hard
From: 127.0.0.1
Registered: 2013-03-20
Posts: 811
Website

Re: Conky v1.9 Thread

Ok guys, manage to fix it here is the code

${color2}this month:${color1}${alignr}${execi 300 vnstat -m | tail -3 | head -1 | awk '{print $3 $4}'}/${color3}${execi 300 vnstat -m | tail -3 | head -1 | awk '{print $6 $7}'}${color}

as you can see i have added tail-9 and head-1 and the monthly reports appear on conky like it was before.

thanks for your time to reply on my request.


# Debian GNU/Linux 8:8.2 (netinst/stable)
# Packages Installed: 541
# Linux debian 3.16.0-4-686-pae #1 SMP Debian 3.16.7-ckt11-1+deb8u4 (2015-09-19) i686 GNU/Linux
# Startup finished in 2.850s (kernel) + 6.473s (userspace) = 9.324s

Offline

#5922 2013-08-11 22:40:30

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

Nili wrote:

Thanks for your input.

I'll check and let you know regarding the post "#5914"
Thank you once again

Looks good ... with that ~/.vnstatrc file I used this:

${alignc}${color6}Net Stats
${color7}rx ${color2}↓${goto 85}${color6}tx ${color2}↑${goto 170}${color}Total
${goto 5}${color}${execpi 7200 date --date="0 day" | awk '{print $3" "$2" "$6}'}
${color7}${execpi 300 vnstat | grep "today" | awk '{print $2" "$3"\
${color6}${goto 85}"$5" "$6"\
${color}${goto 170}"$8" "$9}'}
${goto 5}${color}${execpi 7200 date --date="-1 day" | awk '{print $3" "$2" "$6}'}
${color7}${execpi 300 vnstat | grep "yesterday" | awk '{print $2" "$3"\
${color6}${goto 85}"$5" "$6 "\
${color}${goto 170}" $8" "$9}'}
${goto 5}${color}Current Week
${color7}${execpi 300 vnstat -w | grep "current week" | awk '{print $3" "$4 "\
${color6}${goto 85}" $6" "$7 "\
${color}${goto 170}" $9" "$10}'}
${goto 5}${color}Last Week
${color7}${execpi 300 vnstat -w | grep "last week" | awk '{print $3" "$4"\
${color6}${goto 85}" $6" "$7 "\
${color}${goto 170}" $9" "$10}'}
${goto 5}${color}Last 7 Days
${color7}${execpi 300 vnstat -w | grep "last 7 days" | awk '{print $4" "$5 "\
${color6}${goto 85}" $7" "$8 "\
${color}${goto 170}" $10" "$11}'}
${goto 5}${color}${time %b %Y}
${color7}${execi 300 vnstat -m | grep "`date +"%b %y"`" | awk '{print $3" "$4}'}\
${color6}${goto 85}${execi 300 vnstat -m | grep "`date +"%b %y"`" | awk '{print $6" "$7}'}\
${color}${goto 170}${execi 300 vnstat -m | grep "`date +"%b %y"`" | awk '{print $9" "$10}'}

2013_08_11_19_32_37_240x229_Sector11.jpg

Like I said: initialize today because I forgot to do it a week ago when I installed fresh.
Your post actually reminded me ... it was reading an old list and not moving anywhere  :8

EDIT:  OK Scrap that

Last edited by Sector11 (2013-08-11 22:43:48)


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#5923 2013-08-12 01:16:30

Inodoro Pereyra
#! Die Hard
From: Back in Buenos Aires
Registered: 2013-07-01
Posts: 844

Re: Conky v1.9 Thread

Sector11 wrote:

Just installed it ... to play/learn with you.

I am here: Gnuplot 4.2 Tutorial - looking at gnuplot.py as well  big_smile

Ok. Let's see if you have better luck than me. Meanwhile, I'll study those pages, see if I can understand some of it... tongue

Offline

#5924 2013-08-12 02:37:31

PackRat
#! Die Hard
From: USA
Registered: 2011-03-03
Posts: 1,572

Re: Conky v1.9 Thread

@inodoro pereyra

gnuplot probably isn't the way you want to proceed; I thought about it some more, there are some simpler java plotting programs - like this one - that might work better for you. The trick will be extracting that data and getting into a readable format.

Last edited by PackRat (2013-08-12 12:39:28)


"It does not require many words to speak the truth." - Chief Joseph, Nez Perce tribe

Offline

Be excellent to each other!

#5925 2013-08-12 03:49:48

Inodoro Pereyra
#! Die Hard
From: Back in Buenos Aires
Registered: 2013-07-01
Posts: 844

Re: Conky v1.9 Thread

Thank you PackRat. Will look it up.  big_smile

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: acrobat

Debian Logo