Overblog Suivre ce blog
Editer l'article Administration Créer mon blog
22 novembre 2009 7 22 /11 /novembre /2009 22:09
Conky, sert à faire un affichage des parametres système incrusté dans le fond d'écran.

Avant j'utilisait GkrellM, masi les possibilités ne sont pas élevés. Conky est plus compliqué, masi le résultat est là.

Installation du paquet : conky


Installation des sondes de tempertures : lm-sensors .

J'ai utilisé une configuration automatique en suivant la doc de lm-sensors

Asus A8N-SLI32 delux

Sur ma carte mère (Asus A8N-SLI32 deluxe) j'ai un confli entre l'ACPI et l'accès à la sonde it87.

#> dmesg |grep it87
[   15.502170] it87: Found IT8712F chip at 0xd00, revision 7
[   15.502181] it87: in3 is VCC (+5V)
[   15.502183] it87: in7 is VCCH (+5V Stand-By)
[   15.502219] ACPI: I/O resource it87 [0xd05-0xd06] conflicts with ACPI region ECRE [0xd00-0xd1f]

Pour regeler ce problème, on peut rajouter - au prix d'un possible perte de stablitié du noyau - l'option : acpi_enforce_resources=lax dans le ligne de demarrage de grub

En grub2 (paquet grub-pc), ca se rajoute dans le fichier /etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1 quiet splash acpi_enforce_resources=lax"

Résultat

A l'issue de la configuration on peut vérifier qu'on y voit quelque chose :
<code>
$ sensors
k8temp-pci-00c3
Adapter: PCI adapter
Core0 Temp:  +41.0°C                                   
Core1 Temp:  +41.0°C                                   

it8712-isa-0d00
Adapter: ISA adapter
VCore 1:     +1.14 V  (min =  +0.00 V, max =  +4.08 V)  
VCore 2:     +4.08 V  (min =  +0.00 V, max =  +4.08 V)   ALARM
+3.3V:       +3.20 V  (min =  +0.00 V, max =  +4.08 V)  
+5V:         +4.89 V  (min =  +0.00 V, max =  +6.85 V)  
+12V:       +12.16 V  (min =  +0.00 V, max = +16.32 V)  
-12V:        +3.93 V  (min = -27.36 V, max =  +3.93 V)   ALARM
-5V:         +4.03 V  (min = -13.64 V, max =  +4.03 V)   ALARM
Stdby:       +6.85 V  (min =  +0.00 V, max =  +6.85 V)   ALARM
VBat:        +3.09 V
fan1:          0 RPM  (min =    0 RPM, div = 2)
fan2:          0 RPM  (min =    0 RPM, div = 128)
fan3:          0 RPM  (min =    0 RPM, div = 8)
M/B Temp:    +44.0°C  (low  =  -1.0°C, high = +127.0°C)  sensor = thermistor
CPU Temp:    +44.0°C  (low  =  -1.0°C, high = +127.0°C)  sensor = thermistor
Temp3:      -128.0°C  (low  =  -1.0°C, high = +127.0°C)  sensor = disabled
cpu0_vid:   +0.900 V
   </code>

On active le service
<code>sudo sysv-rc-conf lm-sensors on</code>

sensor pour les disques

#> sudo aptitude install hddtemp

on modifie la configuration pour que tout les utilisateurs aient le droit de lacner la commande en tant que root:
#> dpkg-reconfigure hddtemp


#> Faut-il exécuter hddtemp avec les privilèges du superutilisateur ? Oui

sensor pour la carte graphique nvidia

sudo aptitude install nv-clock

la météo

j'ai suivi ce lien conkyForecast et la référence : http://ubuntuforums.org/showthread.php?t=869328

Annexe

configuration de .conkyrc

# Total number of times for Conky to update before quitting. 0 = forever
total_run_times 0

# Print text to stdout
out_to_console no

# Buffer management, avoid blinking
double_buffer yes
no_buffers yes
text_buffer_size 2048

# refresh rate
update_interval 1

# samples for rate average
cpu_avg_samples 4
net_avg_samples 2

# size and posiiton
alignment top_right
minimum_size 320 5
maximum_width 320
gap_x 4
gap_y 50

# shading and framming
draw_shades yes
draw_outline no
draw_borders no
border_width 1
border_inner_margin 4

# should Conky fork in the background
background yes

# window type
own_window yes
own_window_type override # normal / override / desktop
own_window_transparent yes

#font management
use_xft yes
xftalpha .1
override_utf8_locale yes # force UTF8


# Utiliser Xft (polices lissées etc)
use_xft yes

# font face
xftfont Fixed:size=7#OCR A Std:size=6
uppercase no

# Adds spaces to keep things from moving about.
# Works only with fixed width fonts
use_spacer right

# affiche au format (i.e., KiB, MiB, etc)
format_human_readable yes

# Colors
default_color FFFFFF
default_shade_color 333333
default_outline_color black

color1 e49c16
color2 CA0000 #rouge

color6 DDDDDD
color7 AAAAAA
color8 777777
color9 444444

#imlib_cache_size

TEXT
${color1}${color}${time %A %d %B %Y} ${alignr}${color}$sysname ${color1}$kernel ${color}on ${color1}$machine
${color1} ${font Astron Boy Video:style=Bold:pixelsize=30}${time %H:%M:%S}${font}${color}${alignr}${color}${execi 86400 cat /etc/lsb-release|grep ID|cut -d= -f2} ${color1}${execi 86400 cat /etc/lsb-release|grep REL|cut -d= -f2}${color} "${color1}${execi 86400 cat /etc/lsb-release|grep NAME|cut -d= -f2}${color}"
${execpi 1800 conkyForecast --location=FRXX0165 --template=/home/yoyo/.conkyConf/conkyForecast.template}
#
#${color1}${font Aerial:size=8} Computer${color2}${hr}${font}
#${alignr}${color}${execi 86400 cat /etc/lsb-release|grep ID|cut -d= -f2} ${color1}${execi 86400 cat /etc/lsb-release|grep REL|cut -d= -f2}${color} "${color1}${execi 86400 cat /etc/lsb-release|grep NAME|cut -d= -f2}${color}"
#${alignr}${color}$sysname ${color1}$kernel ${color}on ${color1}$machine
#${alignr}${color1}${nodename}${color} fonctionne depuis ${color1}$uptime${color}
#
${color1}${font Aerial:size=8} Réseau ${color2}${hr}
${color1}${font}eth0 :
${alignc}${color2}lan: ${color}${addr eth0}    ${color2}wan:${color}${texeci 3600 wget 192.168.1.1 -O - -o /dev/null |perl -ne 'print $1 if /nbsp;((\d{1,3}\.){3}\d{1,3})</'}
${color2}${downspeedgraph eth0 16,145 582D10 E08000}${alignr}${upspeedgraph eth0 16,145 582D10 E08000}
${color1}Down ${color}${downspeed eth0} ${color grey}ko/s${color}  ${color}${totaldown eth0}${alignr}${color1}Up ${color}${color}${upspeed eth0} ${color grey}ko/s${color}  ${color}${totalup eth0}

${color1}${font Aerial:size=8} Disques ${color2}${hr}
#
${offset 16}${color2}/${color1}     : ${color}${fs_used_perc /} % ${alignr}${color1}[${color}${fs_free /}${color1}/  ${color7}${fs_used /}${color1}/ ${color8}${fs_size /}${color1}]
${offset 16}${color2}${fs_bar 4 /}
${offset 16}${color2}/${color1}home${color2}/${color1}: ${color}${fs_used_perc /home} % ${alignr}${color1}[${color}${fs_free /home}${color1}/  ${color7}${fs_used /home}${color1}/ ${color8}${fs_size /home}${color1}]
${offset 16}${color2}${fs_bar 4 /home}
${offset 16}${color2}/${color1}home${color2}/${color1}eMule${color2}/${color1}: ${color}${fs_used_perc /home/yoyo/eMule} % ${alignr}${color1}[${color}${fs_free /home/yoyo/eMule}${color1}/  ${color7}${fs_used /home/yoyo/eMule}${color1}/ ${color8}${fs_size /home/yoyo/eMule}${color1}]
${offset 16}${color2}${fs_bar 4 /home/yoyo/eMule}
${offset 16}${color2}/${color1}home${color2}/${color1}Photos${color2}/${color1} : ${color}${fs_used_perc /home/yoyo/Photos} % ${alignr}${color1}[${color}${fs_free /home/yoyo/Photos}${color1}/  ${color7}${fs_used /home/yoyo/Photos}${color1}/ ${color8}${fs_size /home/yoyo/Photos}${color1}]
${offset 16}${color2}${fs_bar 4 /home/yoyo/Photos}

${color1}${font Aerial:size=8} Processeur ${color2}${hr}
${font}${color2}${alignc}Total: ${color}$processes   ${color2}Running:${color} ${color}$running_processes

${voffset 2}${color1}CPU Core1 :${alignr}${color}${freq_g 1}GHz ${color2}${color2} ${voffset -12}${cpugraph cpu1 16,128 582D10 E08000 -t} ${voffset -1}${color}${cpu cpu1}%
${voffset 2}${color1}CPU Core2 :${alignr}${color}${freq_g 2}GHz ${color2}${color2} ${voffset -12}${cpugraph cpu2 16,128 582D10 E08000 -t} ${voffset -1}${color}${cpu cpu2}%
${color1}RAM   :${alignr}${color2}${membar 4,128} ${color}${memperc}%
${color1}swap  :${alignr}${color2}${offset -6}${swapbar 4,128} ${color}${swapperc}%

${alignr}${offset -32}${color1}PID   %CPU   %MEM
${alignr}${offset -32}${color1}${top name 1}${color} ${top pid 1} ${top cpu 1} ${top mem 1}
${alignr}${offset -32}${color1}${top name 2}${color6} ${top pid 2} ${top cpu 2} ${top mem 2}
${alignr}${offset -32}${color1}${top name 3}${color7} ${top pid 3} ${top cpu 3} ${top mem 3}
${alignr}${offset -32}${color1}${top name 4}${color8} ${top pid 4} ${top cpu 4} ${top mem 4}
${alignr}${offset -32}${color1}${top name 5}${color9} ${top pid 5} ${top cpu 5} ${top mem 5}

${color1}${font Aerial:size=8} Température ${color2}${hr}${font}

${color1}Carte Mère :${alignr}${offset -35}${color}$+${hwmon 0 temp 2}.0°C
${color1}Processeur Core0/Core1:${alignr}${offset -35}${color6}${exec sensors | grep Core0 | awk '{ print $3}'}/${exec sensors | grep Core1 | awk '{ print $3}'}
#${color1}GPU :${alignr}${offset -35}${color7} +${exec nvidia-settings -q gpucoretemp |grep '):' | awk '{  print$4 0 }'} °C
${color1}GPU (${nvidia gpufreq}MHz):${alignr}${offset -35}${color7} +${nvidia temp} °C
${color1}sda :${alignr}${offset -35}${color8}+${hddtemp /dev/sda}.0°C
${color1}sdb :${alignr}${offset -35}${color8}+${hddtemp /dev/sdb}.0°C
${color1}sdc :${alignr}${offset -35}${color8}+${hddtemp /dev/sdc}.0°C
#
#${color1}${font Aerial:size=8} Rhythmbox${color2}${hr}${font}
#${if_running rhythmbox}
#${color1}Artiste :${alignr}${offset -35}${color}${exec rhythmbox-client --no-start --print-playing-format "%ta"}
#${color1}Album :${alignr}${offset -35}${color6}${exec rhythmbox-client --no-start --print-playing-format "%at"}
#${color1}Titre :${alignr}${offset -35}${color7}${exec rhythmbox-client --no-start --print-playing-format "%tt"}
#${color1}Durée :${alignr}${offset -35}${color8}${exec rhythmbox-client --no-start --print-playing-format "%te / %td"}
#${else}
#${color1}Rhythmbox n'est pas ouvert
#$endif
#
#${color1}${font Astron Boy Video:style=Bold:pixelsize=15} Conçu par Ljere${color2}${hr}${font}
#
${color2}${hr}

configuration de conkyforcast

.conkyforcast.config

# config settings for conkyForecast.py
CACHE_FOLDERPATH = /home/yoyo/.conkyConf/conky_tmp
CONNECTION_TIMEOUT = 5
EXPIRY_MINUTES = 30
TIME_FORMAT = %H:%M
DATE_FORMAT = %d-%m-%Y
LOCALE = fr
XOAP_PARTNER_ID = XXXXXXXXXXX
XOAP_LICENCE_KEY = XXXXXXXX


conkyforecast.template

${voffset 5}${goto 10}${font ConkyWeather:style=Bold:size=40}[--datatype=WF]${font}
${voffset 5}${goto 20}[--datatype=HT --hideunits --centeredwidth=3]/[--datatype=LT --hideunits --centeredwidth=3]
${voffset 10}${goto 10}${font ConkyWindNESW:size=40}[--datatype=BS]${font}
${voffset 5}${goto 10}[--datatype=WS ] - [--datatype=WD]
${voffset -145}${goto 100}${color1}${font Bitstream Vera Sans Mono:style=Bold:size=14}[--datatype=CT]${font}
${voffset 10}${goto 100}${color3}Station: ${color1}[--datatype=OB]
${goto 100}${color3}Précipitation: ${color1}[--datatype=PC]
#${goto 100}${color3}UV: ${color1}[--datatype=UI] - [--datatype=UT]
${goto 100}${color3}Transparence: ${color1}[--datatype=VI]
${goto 100}${color3}Humidité: ${color1}[--datatype=HM]
${goto 100}${color3}Point de Rosé: ${color1}[--datatype=DP]
${goto 100}${color3}Levé/Couché: ${color1}[--datatype=SR] / [--datatype=SS]
${goto 100}${color3}Pression: ${color1}[--datatype=BR] - [--datatype=BD]
${goto 100}${color3}Moon: ${color1}[--datatype=MP]
#${goto 100}${color3}${font SunNMoon:size=40}n${font}${font Arrows:size 20}${color3}b${color8}${font}[--datatype=SR]
#${image [--datatype=MI] -p 173,180 -s 55x55}
${voffset 25}${goto 25}[--datatype=DW --startday=1 --shortweekday]${goto 100}[--datatype=DW --startday=2 --shortweekday]${goto 175}[--datatype=DW --startday=3 --shortweekday]${goto 250}[--datatype=DW --startday=4 --shortweekday]
${voffset 10}${goto 10}${font ConkyWeather:size=32}[--datatype=WF --startday=1 --endday=4 --spaces=3]${font}
${voffset 15}${goto 15}[--datatype=HT --startday=1 --hideunits --centeredwidth=3]/[--datatype=LT --startday=1 --hideunits --centeredwidth=3]${goto 90}[--datatype=HT --startday=2 --hideunits --centeredwidth=3]/[--datatype=LT --startday=2 --hideunits --centeredwidth=3]${goto 170}[--datatype=HT --startday=3 --hideunits --centeredwidth=3]/[--datatype=LT --startday=3 --hideunits --centeredwidth=3]${goto 245}[--datatype=HT --startday=4 --hideunits --centeredwidth=3]/[--datatype=LT --startday=4 --hideunits --centeredwidth=3]
${color3}${font Bitstream Vera Sans Mono:size=7}${alignr 20}Last Update: [--datatype=LU]${font}

Partager cet article

Repost 0
Published by nitocris - dans Linux
commenter cet article

commentaires