Merci Debian Alain
Ajouter à ton sudoers :
## Same thing without a password
TON_USER ALL=NOPASSWD:/usr/sbin/hddtemp
TON_USER ALL = NOPASSWD: /usr/sbin/smartctl
.conkyrc
conky.config = {
alignment = 'top_middle',
maximum_width = 1366,
minimum_width = 300,
gap_x = -650,
gap_y = 75,
border_inner_margin = 2,
border_outer_margin = 8,
stippled_borders = 1,
border_width = 1,
own_window = true,
own_window_class = 'Conky',
own_window_type = 'normal',
own_window_transparent = false,
own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
double_buffer = true,
short_units = true,
format_human_readable = false,
times_in_seconds = false,
update_interval = 1,
use_spacer = 'none',
net_avg_samples = 1,
cpu_avg_samples = 1,
top_cpu_separate = false,
use_xft = true,
override_utf8_locale = true,
draw_shades = true,
draw_borders = false,
draw_graph_borders = true,
default_bar_width = 50,
default_bar_height = 6,
default_graph_width = 60,
default_graph_height = 35,
--own_window_colour = '73675F',
own_window_colour = '1E1E1E',
default_color = '5E5350',
default_shade_color = '0F0F0F',
color1 = '666666',
color2 = '1793d0',
}
conky.text = [[
${voffset 0}
${font good times:style=Bold:size=14}${color A5968C}${alignc}${texeci 3600 date +%A | awk '{print toupper(substr($0,0,1))tolower(substr($0,2))}'} ${time %d %B %Y}
${image ~/.conky/images/intel.png -p 5,40}
${font good times:style=Bold:size=12}${color A5968C}${alignc -45}${execi 1000 cat /proc/cpuinfo | grep 'model name' | sed -e 's/model name.*://' | sed -e 's/Intel//g' | uniq | cut -c 1-26}$color
${voffset 40}${offset 10}${font good times:style=Bold:size=14}${color A5968C}CPU$color${alignr 12}${exec sensors | grep 'CPU Temperature:' | awk '{print $3}' | cut -c2-3} °C $color
${offset 10}${font good times:style=Bold:size=14}${color A5968C}FAN$color${alignr 2}${exec sensors | grep 'CPU FAN Speed:' | awk '{print $4}'}${font Regular:style=Bold:size=12} Tr/min $color
${offset 10}${font good times:style=Bold:size=14}${color A5968C}Core 0$color${alignr 12}${exec sensors | grep 'Core 0' | awk '{print $3}' | cut -c2-3} °C $color
${offset 10}${font good times:style=Bold:size=14}${color A5968C}Core 1$color${alignr 12}${exec sensors | grep 'Core 1' | awk '{print $3}' | cut -c2-3} °C $color
${offset 10}${font good times:style=Bold:size=14}${color A5968C}Core 2$color${alignr 12}${exec sensors | grep 'Core 2' | awk '{print $3}' | cut -c2-3} °C $color
${offset 10}${font good times:style=Bold:size=14}${color A5968C}Core 3$color${alignr 12}${exec sensors | grep 'Core 3' | awk '{print $3}' | cut -c2-3} °C $color
${image ~/.conky/images/nvidia.png -p 0,250}
${offset 60}${font good times:style=Bold:size=14}${color A5968C}${exec nvidia-smi --query-gpu=gpu_name --format=csv,noheader,nounits}$color
${voffset 0}${alignr 60}${font good times:style=Bold:size=14}${exec nvidia-settings -q 'GPUCurrentFanSpeedRPM' | grep Attribute | cut -d ' ' -f 6 | cut -c 1-4 | tr -d '.'}${alignr 100}${font Regular:style=Bold:size=12}Tr/min
${font good times:style=Bold:size=14}${alignc}${execi 60 nvidia-settings -query [gpu:0]/GPUCoreTemp -t}${offset 5}°C
${voffset 10}${alignc}${execbar 20,220 nvidia-settings -query [gpu:0]/GPUCoreTemp -t}
${voffset 10}${font good times:style=Bold:size=16}${color A5968C}${alignc}HDD$color
${voffset 0}${font good times:style=Bold:size=14}${alignc}${execi 10 sudo hddtemp -n /dev/sda}${offset 5}°C
${voffset 10}${font good times:style=Bold:size=16}${color A5968C}${alignc}RAM$color
${offset 10}${color 595454}${font Matias:style=Bold:size=14}${goto 10}RAM${goto 280}${color}$memperc%\
${voffset 0}${goto 60}${if_match ${memperc} > 0}${color A5968C}${else}${color}${endif}${font :size=9}▩\
${if_match ${memperc} > 10}${color A5968C}${else}${color}${endif}▩\
${if_match ${memperc} > 15}${color A5968C}${else}${color}${endif}▩\
${if_match ${memperc} > 20}${color A5968C}${else}${color}${endif}▩\
${if_match ${memperc} > 25}${color A5968C}${else}${color}${endif}▩\
${if_match ${memperc} > 30}${color A5968C}${else}${color}${endif}▩\
${if_match ${memperc} > 35}${color A5968C}${else}${color}${endif}▩\
${if_match ${memperc} > 40}${color A5968C}${else}${color}${endif}▩\
${if_match ${memperc} > 45}${color A5968C}${else}${color}${endif}▩\
${if_match ${memperc} > 50}${color A5968C}${else}${color}${endif}▩\
${if_match ${memperc} > 55}${color A5968C}${else}${color}${endif}▩\
${if_match ${memperc} > 60}${color A5968C}${else}${color}${endif}▩\
${if_match ${memperc} > 65}${color A5968C}${else}${color}${endif}▩\
${if_match ${memperc} > 70}${color A5968C}${else}${color}${endif}▩\
${if_match ${memperc} > 75}${color A5968C}${else}${color}${endif}▩\
${if_match ${memperc} > 80}${color A5968C}${else}${color}${endif}▩\
${if_match ${memperc} > 85}${color A5968C}${else}${color}${endif}▩\
${if_match ${memperc} > 90}${color A5968C}${else}${color}${endif}▩\
${if_match ${memperc} > 95}${color A5968C}${else}${color}${endif}▩\
${if_match ${memperc} == 100}${color A5968C}${else}${color}${endif}▩
${offset 10}${color 595454}${font Matias:style=Bold:size=14}${goto 10}SWAP${goto 280}${color}$swapperc%\
${voffset 0}${goto 60}${if_match ${swapperc} > 0}${color A5968C}${else}${color}${endif}${font :size=9}▩\
${if_match ${swapperc} > 10}${color A5968C}${else}${color}${endif}▩\
${if_match ${swapperc} > 15}${color A5968C}${else}${color}${endif}▩\
${if_match ${swapperc} > 20}${color A5968C}${else}${color}${endif}▩\
${if_match ${swapperc} > 25}${color A5968C}${else}${color}${endif}▩\
${if_match ${swapperc} > 30}${color A5968C}${else}${color}${endif}▩\
${if_match ${swapperc} > 35}${color A5968C}${else}${color}${endif}▩\
${if_match ${swapperc} > 40}${color A5968C}${else}${color}${endif}▩\
${if_match ${swapperc} > 45}${color A5968C}${else}${color}${endif}▩\
${if_match ${swapperc} > 50}${color A5968C}${else}${color}${endif}▩\
${if_match ${swapperc} > 55}${color A5968C}${else}${color}${endif}▩\
${if_match ${swapperc} > 60}${color A5968C}${else}${color}${endif}▩\
${if_match ${swapperc} > 65}${color A5968C}${else}${color}${endif}▩\
${if_match ${swapperc} > 70}${color A5968C}${else}${color}${endif}▩\
${if_match ${swapperc} > 75}${color A5968C}${else}${color}${endif}▩\
${if_match ${swapperc} > 80}${color A5968C}${else}${color}${endif}▩\
${if_match ${swapperc} > 85}${color A5968C}${else}${color}${endif}▩\
${if_match ${swapperc} > 90}${color A5968C}${else}${color}${endif}▩\
${if_match ${swapperc} > 95}${color A5968C}${else}${color}${endif}▩\
${if_match ${swapperc} == 100}${color A5968C}${else}${color}${endif}▩
${font good times:style=Bold:size=16}${color A5968C}${alignc}NET$color
${offset 10}${font Matias:style=Bold:size=14}${goto 10}${color 595454}Up: ${goto 280}${color}${upspeedf enp5s0}\
${voffset 0}${goto 60}${if_match ${upspeedf enp5s0} > 0}${color FF9042}${else}${color}${endif}${font :size=9}▩\
${if_match ${upspeedf enp5s0} > 10}${color FF9042}${else}${color}${endif}▩\
${if_match ${upspeedf enp5s0} > 15}${color FF9042}${else}${color}${endif}▩\
${if_match ${upspeedf enp5s0} > 20}${color FF9042}${else}${color}${endif}▩\
${if_match ${upspeedf enp5s0} > 25}${color FF9042}${else}${color}${endif}▩\
${if_match ${upspeedf enp5s0} > 30}${color FF9042}${else}${color}${endif}▩\
${if_match ${upspeedf enp5s0} > 35}${color FF9042}${else}${color}${endif}▩\
${if_match ${upspeedf enp5s0} > 40}${color FF9042}${else}${color}${endif}▩\
${if_match ${upspeedf enp5s0} > 45}${color FF9042}${else}${color}${endif}▩\
${if_match ${upspeedf enp5s0} > 50}${color FF9042}${else}${color}${endif}▩\
${if_match ${upspeedf enp5s0} > 55}${color FF9042}${else}${color}${endif}▩\
${if_match ${upspeedf enp5s0} > 60}${color FF9042}${else}${color}${endif}▩\
${if_match ${upspeedf enp5s0} > 65}${color FF9042}${else}${color}${endif}▩\
${if_match ${upspeedf enp5s0} > 70}${color FF9042}${else}${color}${endif}▩\
${if_match ${upspeedf enp5s0} > 75}${color FF9042}${else}${color}${endif}▩\
${if_match ${upspeedf enp5s0} > 80}${color FF9042}${else}${color}${endif}▩\
${if_match ${upspeedf enp5s0} > 85}${color FF9042}${else}${color}${endif}▩\
${if_match ${upspeedf enp5s0} > 90}${color FF9042}${else}${color}${endif}▩\
${if_match ${upspeedf enp5s0} > 95}${color FF9042}${else}${color}${endif}▩\
${if_match ${upspeedf enp5s0} > 100}${color FF9042}${else}${color}${endif}▩
${offset 10}${font Matias:style=Bold:size=14}${goto 10}${color 595454}Down: ${goto 280}${color}${downspeedf enp5s0}\
${voffset 0}${goto 60}${if_match ${downspeedf enp5s0} > 0}${color 8BC34A}${else}${color}${endif}${font :size=9}▩\
${if_match ${downspeedf enp5s0} > 50}${color 8BC34A}${else}${color}${endif}▩\
${if_match ${downspeedf enp5s0} > 100}${color 8BC34A}${else}${color}${endif}▩\
${if_match ${downspeedf enp5s0} > 125}${color 8BC34A}${else}${color}${endif}▩\
${if_match ${downspeedf enp5s0} > 150}${color 8BC34A}${else}${color}${endif}▩\
${if_match ${downspeedf enp5s0} > 175}${color 8BC34A}${else}${color}${endif}▩\
${if_match ${downspeedf enp5s0} > 200}${color 8BC34A}${else}${color}${endif}▩\
${if_match ${downspeedf enp5s0} > 225}${color 8BC34A}${else}${color}${endif}▩\
${if_match ${downspeedf enp5s0} > 250}${color 8BC34A}${else}${color}${endif}▩\
${if_match ${downspeedf enp5s0} > 275}${color 8BC34A}${else}${color}${endif}▩\
${if_match ${downspeedf enp5s0} > 300}${color 8BC34A}${else}${color}${endif}▩\
${if_match ${downspeedf enp5s0} > 350}${color 8BC34A}${else}${color}${endif}▩\
${if_match ${downspeedf enp5s0} > 400}${color 8BC34A}${else}${color}${endif}▩\
${if_match ${downspeedf enp5s0} > 450}${color 8BC34A}${else}${color}${endif}▩\
${if_match ${downspeedf enp5s0} > 500}${color 8BC34A}${else}${color}${endif}▩\
${if_match ${downspeedf enp5s0} > 600}${color 8BC34A}${else}${color}${endif}▩\
${if_match ${downspeedf enp5s0} > 700}${color 8BC34A}${else}${color}${endif}▩\
${if_match ${downspeedf enp5s0} > 800}${color 8BC34A}${else}${color}${endif}▩\
${if_match ${downspeedf enp5s0} > 850}${color 8BC34A}${else}${color}${endif}▩\
${if_match ${downspeedf enp5s0} > 900}${color 8BC34A}${else}${color}${endif}▩\
${voffset 10}
${color #8BC34A}${alignc}${font Matias:style=Bold:size=16} SMART INFOS :
${color #A5968C}${alignc}${font Matias:style=Bold:size=15}${execi 1800 sudo smartctl -a /dev/sda | grep "Model Family:" | awk '{print $0}'}
${voffset 10}${font Matias:style=Bold:size=14}${color}ID 01${alignc} Read Error Rate : ${color #8BC34A}${alignc -130}${execi 1800 sudo smartctl -a /dev/sda | grep Raw_Read_Error_Rate | awk '{print $10}'}
${color}ID 07${alignc} Seek Error Rate : ${color #8BC34A}${alignc -130}${execi 1800 sudo smartctl -a /dev/sda | grep Seek_Error_Rate | awk '{print $10}'}
${color}ID 195${alignc} Hardware ECC Recovered : ${color #8BC34A}${alignc -130}${execi 1800 sudo smartctl -a /dev/sda | grep Hardware_ECC_Recovered | awk '{print $10}'}
${voffset 10}${color}ID 05${alignc} Reallocated Sectors Count : ${color #8BC34A}${alignc -130}${execi 1800 sudo smartctl -a /dev/sda | grep Reallocated_Sector_Ct | awk '{print $10}'}
${color}ID 196${alignc} Reallocation Event Count : ${color #8BC34A}${alignc -130}${execi 1800 sudo smartctl -a /dev/sda | grep Reallocated_Event_Count | awk '{print $10}'}
${voffset 10}${color}ID 199${alignc} UltraDMA CRC Error Count : ${color #8BC34A}${alignc -130}${execi 1800 sudo smartctl -a /dev/sda | grep UDMA_CRC_Error_Count | awk '{print $10}'}
${voffset 0}${font}
]];
Ce script est pas mal aussi pour tout les diques présent:
for i in /dev/[sh]d[abcdefghijklmnopqrstuvwxyz]; do echo "=== Disque Dur: $i ==="; sudo smartctl -a $i | awk '/ID#|Raw_Read_Error_Rate|Throughput_Performance|Reallocated_Sector_Ct|Seek_Error_Rate|Seek_Time_Performance|Spin_Retry_Count|Reallocated_Event_Count|Current_Pending_Sector|Offline_Uncorrectable|UDMA_CRC_Error_Count/ { print $0 }'; done;
Dernière modification par Anonyme (04-06-2020 07:16:47)