[résolu] config conky

hi
j’ai pompé ces lignes …sur le web

[code]# ~/.bashrc: executed by bash(1) for non-login shells.

see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)

for examples

If not running interactively, don’t do anything

[ -z “$PS1” ] && return

don’t put duplicate lines in the history. See bash(1) for more options

export HISTCONTROL=ignoredups

check the window size after each command and, if necessary,

update the values of LINES and COLUMNS.

shopt -s checkwinsize

make less more friendly for non-text input files, see lesspipe(1)

[ -x /usr/bin/lesspipe ] && eval “$(lesspipe)”

set variable identifying the chroot you work in (used in the prompt below)

if [ -z “$debian_chroot” ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi

set a fancy prompt (non-color, unless we know we “want” color)

case “$TERM” in
xterm-color)
PS1=’${debian_chroot:+($debian_chroot)}[\033[01;32m]\u@\h[\033[00m]:[\033[01;34m]\w[\033[00m]$ ‘
;;
*)
PS1=’${debian_chroot:+($debian_chroot)}\u@\h:\w$ '
;;
esac

Comment in the above and uncomment this below for a color prompt

#PS1=’${debian_chroot:+($debian_chroot)}[\033[01;32m]\u@\h[\033[00m]:[\033[01;34m]\w[\033[00m]$ ’

If this is an xterm set the title to user@host:dir

case “$TERM” in
xterm*|rxvt*)
PROMPT_COMMAND=‘echo -ne “\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007”’
;;
*)
;;
esac

Alias definitions.

You may want to put all your additions into a separate file like

~/.bash_aliases, instead of adding them here directly.

See /usr/share/doc/bash-doc/examples in the bash-doc package.

#if [ -f ~/.bash_aliases ]; then

. ~/.bash_aliases

#fi

enable color support of ls and also add handy aliases

if [ “$TERM” != “dumb” ]; then
eval "dircolors -b"
alias ls=‘ls --color=auto’
#alias dir=‘ls --color=auto --format=vertical’
#alias vdir='ls --color=auto --format=long’
fi

some more ls aliases

#alias ll=‘ls -l’
#alias la=‘ls -A’
#alias l=‘ls -CF’

enable programmable completion features (you don’t need to enable

this, if it’s already enabled in /etc/bash.bashrc and /etc/profile

sources /etc/bash.bashrc).

if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi[/code]

le problème, c’est que je n’y connait rien en script. je voudrai afficher les 4 cores et leur température. Qu’est-ce que je doit ajouter ?

Salut,

c’est ton .bashrc ça, concerne pas conky

houps :blush:

[code]background yes

cpu_avg_samples 2
net_avg_samples 2

out_to_console no

X font when Xft is disabled, you can pick one with program xfontsel

#font 8x10
#font 7x13
#font 8x13
#font 7x12
#font mintsmild.se
#font -------34-------*
#font -artwiz-snap-normal-r-normal---100---p--iso8859-1
#font -
-luxi sans-medium-r-normal--13------iso8859-2
#font --helvetica-medium-r-normal--12--100-100---iso8859-2
#font -
-lucidatypewriter-medium-r---14--100-100---iso8895-2
#font -
-courier-medium-r-normal--14--100-100---iso8859-2
#font --lucida-medium-r-normal--13-----*-iso8859-2

Use Xft?

use_xft yes

Xft font when Xft is enabled

#xftfont monospace-8
xftfont Sans -8.5

Text alpha when using Xft

xftalpha 0.8

mail spool

mail_spool $MAIL

Update interval in seconds

update_interval 1

Create own window instead of using desktop (required in nautilus)

#own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_transparent yes
own_window_colour black
own_window yes
own_window_type override

Use double buffering (reduces flicker, may not work for everyone)

double_buffer yes

Minimum size of text area

minimum_size 5 5
maximum_width 215

Draw shades?

draw_shades no

Draw outlines?

draw_outline no

Draw borders around text

draw_borders no

Stippled borders?

stippled_borders 0

border margins

border_margin 5

border width

border_width 0

drawn 1 pixel border around graphs or not

draw_graph_borders no

Default colors and also border colors

default_color white
default_shade_color white
default_outline_color white

Text alignment, other possible values are commented

#alignment top_left
#alignment top_right
#alignment bottom_left
alignment bottom_right

Gap between borders of screen and text

gap_x 5
gap_y 5 #margines gorny

Add spaces to keep things from moving about? This only affects certain objects.

use_spacer yes

Subtract file system buffers from used memory?

no_buffers yes

set to yes if you want all text to be in uppercase

uppercase no

boinc (seti) dir

seti_dir /opt/seti

TEXT
${font Verdana:size=11}$alignc${color #DBAA82}${Time %A %d %B %Y}
$alignc${color #FFFB00}${time %H:%M:%S}${font Sans:size=8.5}

${color #FF000C}Moniteur Systeme : ${color #565868}${stippled_hr}
${color #DBAA82}$sysname : ${color #565868}$kernel ${color #DBAA82}on ${color #565868}$machine
${color #DBAA82}Uptime : ${color #B6A291}$uptime | ${color #DBAA82}Temp : ${color #B6A291}${acpitemp}°C

${color #DBAA82}Adaptateur : ${color #FFFB00}${acpiacadapter}
${color #DBAA82}Autonomie batterie : ${color #FFFB00}${battery BAT1}

${color #DBAA82}cpu: ${color #FFFB00}${cpu}% ${color #344299}$cpubar
${color #FFFFFF}${cpugraph DBAA82 344299}
${color #DBAA82}ram : ${color #3652FF}$mem ${color #DBAA82}/ $memmax - ${color #FFFB00}$memperc% ${color #344299}$membar
${color #DBAA82}swap : ${color #3652FF}$swap ${color #DBAA82}/ $swapmax - ${color #FFFB00}$swapperc% ${color #344299}$swapbar

${color #FFFB00}.: ${top name 1}
${color #DBAA82}PID: ${color #FFFB00}${top pid 1} ${color #DBAA82}%cpu : ${color #FFFB00}${top cpu 1}
${color #565868}.: ${top name 2}
${color #DBAA82}PID: ${color #3652FF}${top pid 2} ${color #DBAA82}%cpu : ${color #344299}${top cpu 2}
${color #565868}.: ${top name 3}
${color #DBAA82}PID: ${color #3652FF}${top pid 3} ${color #DBAA82}%cpu : ${color #344299}${top cpu 3}
${color #565868}.: ${top name 4}
${color #DBAA82}PID: ${color #3652FF}${top pid 4} ${color #DBAA82}%cpu : ${color #344299}${top cpu 4}
${color #565868}.: ${top name 5}
${color #DBAA82}PID: ${color #3652FF}${top pid 5} ${color #DBAA82}%cpu : ${color #344299}${top cpu 5}

${color #FF000C}Disques : ${color #565868}${stippled_hr}
${color #DBAA82}root : ${color #3652FF}${fs_used /} ${color #DBAA82}/ ${fs_size /} (${color #FFFB00}${fs_free_perc /}% ${color #DBAA82}libre)
${color #344299}${fs_bar /}

${color #DBAA82}home : ${color #3652FF}${fs_used /home} ${color #DBAA82}/ ${fs_size /home} (${color #FFFB00}${fs_free_perc /home}% ${color #DBAA82}libre)
${color #344299}${fs_bar /home}

${color #FF000C}Réseau : ${color #565868}${stippled_hr}
${color #DBAA82}down: ${color #FFFB00}${downspeedf eth1} k/s ${color #DBAA82}up: ${color #FFFB00}${upspeedf eth1} k/s
${color #FFFFFF}${downspeedgraph eth1 25,100 DBAA82 344299} ${color #FFFFFF}${upspeedgraph eth1 25,100 344299 DBAA82}

$alignc${color #FFFB00}${mpd_title}
$alignc${color #DBAA82}${mpd_artist}
$alignc${color #DBAA82}${mpd_album}
$alignc${color #DBAA82}${mpd_elapsed} / ${mpd_length} (${mpd_percent}%)
${color #3652FF}${mpd_bar (20),(100)}[/code]

Juste une doc qui t’aidera
doc.ubuntu-fr.org/conky
Bonne soirée
Cyrille

salut shell-boudeur!
voila des infos :arrow_right: conkyrc settings et conky variables
où tu as ça [quote=“conky variables”]cpu>>> (cpuN)>>> CPU usage in percents. For SMP machines, the CPU number can be provided as an argument. ${cpu cpu0} is the total usage, and ${cpu cpuX} (X >= 1) are individual CPUs.[/quote]
et aussi http://conky.sourceforge.net/screenshots.html avec des screenshots des exemples de conkyrc et de scripts.
…blabla bla blabla …vais dormir moi…

merci pour les liens. pour les variables, est-ce qu’il y aurait en fr ?
Pour le reste, j’insère un retour à la ligne, je fais des copier/coller et je modifie mais c’est pas top.
j’ai réussi à mettre les 4 cores, c’est pas si mal :laughing:
Allez ! pour me la péter, il est bô mon fond d’écran :wink:

http://www.pcinpact.com/forum/lofiversion/index.php/t97542.html

re
j’ai des ptits soucis pour afficher la température.
J’ai installé lm-sensors et fait un sensors-detect, mais pourriez-vous me traduire ceci en human langage ?

[code]/# sensors-detect

sensors-detect revision 5249 (2008-05-11 22:56:25 +0200)

This program will help you determine which kernel modules you need
to load to use lm_sensors most effectively. It is generally safe
and recommended to accept the default answers to all questions,
unless you know what you’re doing.

We can start with probing for (PCI) I2C or SMBus adapters.
Do you want to probe now? (YES/no): y
Probing for PCI bus adapters…
Use driver `i2c-i801’ for device 0000:00:1f.3: Intel ICH9

We will now try to load each adapter module in turn.
Module `i2c-i801’ already loaded.
If you have undetectable or unsupported I2C/SMBus adapters, you can have
them scanned by manually loading the modules before running this script.

We are now going to do the I2C/SMBus adapter probings. Some chips may
be double detected; we choose the one with the highest confidence
value in that case.
If you found that the adapter hung after probing a certain address,
you can specify that address to remain unprobed.

Next adapter: SMBus I801 adapter at 0500 (i2c-0)
Do you want to scan it? (YES/no/selectively): y
Client found at address 0x50
Probing for Analog Devices ADM1033'... No Probing forAnalog Devices ADM1034’… No
Probing for SPD EEPROM'... Yes (confidence 8, not a hardware monitoring chip) Probing forEDID EEPROM’… No
Client found at address 0x52
Probing for Analog Devices ADM1033'... No Probing forAnalog Devices ADM1034’… No
Probing for SPD EEPROM'... Yes (confidence 8, not a hardware monitoring chip) Probing forEDID EEPROM’… No

Some chips are also accessible through the ISA I/O ports. We have to
write to arbitrary I/O ports to probe them. This is usually safe though.
Yes, you do have ISA I/O ports even if you do not have any ISA slots!
Do you want to scan the ISA I/O ports? (YES/no): y
Probing for National Semiconductor LM78' at 0x290... No Probing forNational Semiconductor LM78-J’ at 0x290… No
Probing for National Semiconductor LM79' at 0x290... No Probing forWinbond W83781D’ at 0x290… No
Probing for Winbond W83782D' at 0x290... No Probing forIPMI BMC KCS’ at 0xca0… No
Probing for `IPMI BMC SMIC’ at 0xca8… No

Some Super I/O chips may also contain sensors. We have to write to
standard I/O ports to probe them. This is usually safe.
Do you want to scan for Super I/O sensors? (YES/no): y
Probing for Super-I/O at 0x2e/0x2f
Trying family National Semiconductor'... No Trying familySMSC’… No
Trying family VIA/Winbond/Fintek'... No Trying familyITE’… Yes
Found ITE IT8718F Super IO Sensors' Success! (address 0x290, driverit87’)
Probing for Super-I/O at 0x4e/0x4f
Trying family National Semiconductor'... No Trying familySMSC’… No
Trying family VIA/Winbond/Fintek'... No Trying familyITE’… No

Some south bridges, CPUs or memory controllers may also contain
embedded sensors. Do you want to scan for them? (YES/no): y
Silicon Integrated Systems SIS5595… No
VIA VT82C686 Integrated Sensors… No
VIA VT8231 Integrated Sensors… No
AMD K8 thermal sensors… No
AMD K10 thermal sensors… No
Intel Core family thermal sensor… Success!
(driver `coretemp’)
Intel AMB FB-DIMM thermal sensor… No

Now follows a summary of the probes I have just done.
Just press ENTER to continue:

Driver `it87’ (should be inserted):
Detects correctly:

  • ISA bus, address 0x290
    Chip `ITE IT8718F Super IO Sensors’ (confidence: 9)

Driver `coretemp’ (should be inserted):
Detects correctly:

  • Chip `Intel Core family thermal sensor’ (confidence: 9)

I will now generate the commands needed to load the required modules.
Just press ENTER to continue:

To load everything that is needed, add this to /etc/modules:

#----cut here----

Chip drivers

it87
coretemp
#----cut here----

Do you want to add these lines automatically? (yes/NO)y
[/code]

[quote=“shell-boudeur”]merci pour les liens. pour les variables, est-ce qu’il y aurait en fr ?
Pour le reste, j’insère un retour à la ligne, je fais des copier/coller et je modifie mais c’est pas top.
j’ai réussi à mettre les 4 cores, c’est pas si mal :laughing:
Allez ! pour me la péter, il est bô mon fond d’écran :wink:
(…)[/quote]
viewtopic.php?f=1&t=67 :wink:

le résultat de mon sensors-detect signifie quoi ?
que je ne peux pas capter les températures ?

Ashgenesis : tu cherches à me dégoûter ? :cry:

Apparemment, il a trouvé une sonde sur la CM

Found `ITE IT8718F Super IO Sensors' Success! (address 0x290, driver `it87')
ainsi que celle du proc

Intel Core family thermal sensor... Success! (driver `coretemp')
Regarde si tu as quelque chose dans /sys/devices/platform/IT8718F ou qqchose qui ressemble au nom de la sonde.

merci
j’ai réussi en m’aidant de http://forum.debian-fr.org/viewtopic.php?f=3&t=14870&start=0&st=0&sk=t&sd=a
et de ce lien http://www.galaxius.org/doc/conky.html donné par themorice dans le même post.

[quote]${color 0477FB}CORE 0 TEMP ${color AB18E1}${execi 10 ~/Scripts/core0temp.pl} °C
${color 0477FB}CORE 1 TEMP ${color AB18E1}${execi 10 ~/Scripts/core1temp.pl} °C[/quote]

ça me donne ça :

[code]background yes

cpu_avg_samples 2
net_avg_samples 2

out_to_console no
use_xft yes
xftfont Terminal Bitstream Vera Sans Mono:size=10
xftalpha 0.8
update_interval 1

own_window yes
own_window_type override
own_window_transparent yes

alignment bottom_left

double_buffer yes
draw_shades no
draw_outline no
draw_borders no
stippled_borders 10
border_margin 4
border_width 1

default_color #88bbff
default_shade_color black

gap_x 20
gap_y 40
alignment top_right
maximum_width 230
minimum_size 230 10

use_spacer yes
no_buffers yes
uppercase no

TEXT

$nodename : ${alignc}$sysname $kernel
IP: ${addr eth0}
Uptime: $uptime
Load: $loadavg

${color}Core1: ${cpu cpu1}% ${color #88bbff}${cpubar cpu1 10,96} ${color #0000FF}${execi 10 ~/Script/Conky/core0temp.pl}°C
${color}Core2: ${cpu cpu2}% ${color #88bbff}${cpubar cpu2 10,96} ${color #0000FF}${execi 10 ~/Script/Conky/core1temp.pl}°C
${color}Core3: ${cpu cpu3}% ${color #88bbff}${cpubar cpu3 10,96} ${color #0000FF}${execi 10 ~/Script/Conky/core2temp.pl}°C
${color}Core4: ${cpu cpu4}% ${color #88bbff}${cpubar cpu4 10,96} ${color #0000FF}${execi 10 ~/Script/Conky/core3temp.pl}°C

${color}RAM: ${color #88bbff}$mem/$memmax - $memperc%
${color}Swap: ${color #88bbff}$swap/$swapmax - $swapperc%

${color #000000}Name PID CPU% MEM%
${color #009900} ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
${color lightgrey} ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
${color lightgrey} ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
${color lightgrey} ${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}
${color #000000}Mem usage
${color #009900} ${top_mem name 1} ${top_mem pid 1} ${top_mem cpu 1} ${top_mem mem 1}
${color lightgrey} ${top_mem name 2} ${top_mem pid 2} ${top_mem cpu 2} ${top_mem mem 2}
${color lightgrey} ${top_mem name 3} ${top_mem pid 3} ${top_mem cpu 3} ${top_mem mem 3}[/code]

et pour les script de ~/Script/Conky:

#!/usr/bin/perl use strict; my $temp; open (FILE, '<', '/sys/devices/platform/coretemp.0/temp1_input'); $temp = <FILE>; close (FILE); print ($temp / 1000); print ("\n");

content môa :smiley:

Merci à tous !

[quote=“shell-boudeur”]le résultat de mon sensors-detect signifie quoi ?
que je ne peux pas capter les températures ?

Ashgenesis : tu cherches à me dégoûter ? :cry:[/quote]
Mais non faut pas tout prendre mal comme ça c’est juste que t’as un beau fond d’écran et qu’il faut le mettre dans le topic des fonds d’écrans :wink:

Mais où vont-ils chercher tous ça ces jeunes :smiley: