My conkyrc and fix hddtemp sdd temp error

Da un pò non davo una sistemata al mio vecchio conky, andava bene ma durante alcuni passaggi aveva perso qualche informazione.

L’inserimento di un nuovo HD SDD veniva ingorato da hddtemp e il passaggio da nvidia a nouveau lasciava vuoto il campo della temperatura GPU.

Il mio conky :

Seguiamo l’artiocolo per risolvere gli errori e avere conky a posto.

Per prima cosa occorre avere una buona base musicale, avviamo il video :

hddtemp

Potrebbe succedere che un HD non venga riconosciuto completamente

$ hddtemp /dev/sdb
WARNING: Drive /dev/sdb doesn't seem to have a temperature sensor.
WARNING: This doesn't mean it hasn't got one.
WARNING: If you are sure it has one, please contact me (hddtemp@guzu.net).
WARNING: See --help, --debug and --drivebase options.

/dev/sdb: Samsung SSD 860 EVO 500G B     �@:  no sensor

Eseguiamo un altro check

$ hddtemp --debug /dev/sdb
 
========== hddtemp 0.3-beta15 ==========
Model: Samsung SSD 860 EVO 500G B   �@
 
field(5)         = 0
field(9)         = 67
field(12)        = 177
field(177)       = 25
field(179)       = 0
field(181)       = 0
field(182)       = 0
field(183)       = 0
field(187)       = 0
field(190)       = 27
field(195)       = 0
field(199)       = 0
field(235)       = 37
field(241)       = 51

If one of the field value seems to match the temperature, be sure to read
the hddtemp man page before sending a report (section REPORT). Thanks.

Il valore 190 è quello della temperatura che interessa a noi, ora lo andremo ad aggiungere al db di hddtemp in /etc/hddtemp.db.

# echo ""Samsung SSD 860 EVO 500G B" 190  C  "Samsung SSD 860 EVO 500GB"" >> /etc/hddtemp.db

Ora il nostro output sarà :

$ hddtemp /dev/sd?
/dev/sda: ST31000528AS: 32°C
/dev/sdb: Samsung SSD 860 EVO 500G B �@: 28°C
/dev/sdc: WDC WD5000AAKS-00YGA0: 35°C

Nvidia GPU

Con i vecchi driver Nvidia installati si aveva un output specifico, ora che abbiamo i Nouveau la temperatura esce solo da sensors.

$ sensors 
acpitz-acpi-0 
Adapter: ACPI interface 
temp1:        +27.8°C   
temp2:        +29.8°C   

nouveau-pci-0100 
Adapter: PCI adapter 
GPU core:    962.00 mV (min =  +0.82 V, max =  +1.16 V) 
fan1:         840 RPM 
temp1:        +39.0°C  (high = +95.0°C, hyst =  +3.0°C) 
                      (crit = +105.0°C, hyst =  +5.0°C) 
                      (emerg = +135.0°C, hyst =  +5.0°C) 

coretemp-isa-0000 
Adapter: ISA adapter 
Package id 0:  +47.0°C  (high = +80.0°C, crit = +99.0°C) 
Core 0:        +42.0°C  (high = +80.0°C, crit = +99.0°C) 
Core 1:        +43.0°C  (high = +80.0°C, crit = +99.0°C) 
Core 2:        +45.0°C  (high = +80.0°C, crit = +99.0°C) 
Core 3:        +47.0°C  (high = +80.0°C, crit = +99.0°C)

Un semplice grep su temp1 da 2 risultati, filtriamolo :

$ sensors | grep -m2 'temp1' | cut -c16-19 | tail -n1
39.0

conky

Sul PC abbiamo 1 HD sata (sda) con debian, un SSD (sdb)con win10 e infine un HD sata (sdc) come archivio dati.

Questo il mio vuovo conkyrc :

conky.config = {
    alignment = 'top_right',
    background = false,
    border_width = 1,
    cpu_avg_samples = 2,
    default_color = 'white',
    default_outline_color = 'white',
    default_shade_color = 'white',
    draw_borders = false,
    draw_graph_borders = true,
    draw_outline = false,
    draw_shades = false,
    use_xft = true,
    font = 'Noto Sans:size=7',
    gap_x = 25,
    gap_y = 100,
    minimum_height = 5,
    minimum_width = 5,
    maximum_width = 265,
    use_spacer = yes,
    net_avg_samples = 2,
    no_buffers = true,
    out_to_console = false,
    out_to_stderr = false,
    extra_newline = false,
    double_buffer = true,
    own_window = true,
    own_window_class = 'Conky',
    own_window_type = 'normal',
    own_window_colour=black,
    own_window_transparent=false,
    own_window_hints="undecorated,below,sticky,skip_taskbar,skip_pager",
    own_window_argb_visual = true,
    own_window_argb_value = 0,
    own_window_transparent = true,
    stippled_borders = 0,
    update_interval = 1.0,
    uppercase = false,
    use_spacer = 'none',
    show_graph_scale = false,
    show_graph_range = false,
    alignment = 'top_right'
}

conky.text = [[
$sysname $kernel
$hr
${color grey}Uptime:$color $uptime

Processore
${color grey}CPU Usage:$color $cpu% ${goto 100}${cpubar 4}
${color grey}Frequency (in MHz):$color $freq
core 0:${cpu cpu1}%${color3} ${goto 60}   ${execi 20 sensors | grep Core\ 0 | cut -c17-18}°C
core 1:${cpu cpu2}%${color3} ${goto 60}   ${execi 20 sensors | grep Core\ 1 | cut -c17-18}°C
core 2:${cpu cpu3}%${color3} ${goto 60}   ${execi 20 sensors | grep Core\ 2 | cut -c17-18}°C
core 3:${cpu cpu4}%${color3} ${goto 60}   ${execi 20 sensors | grep Core\ 3 | cut -c17-18}°C
${color grey}Processes:$color $processes  ${color grey}Running:$color $running_processes

${color grey}Name${goto 101} PID${goto 139} CPU%${goto 179}MEM%
${color lightgrey} ${top name 1}${goto 101} ${top pid 1}${goto 139} ${top cpu 1}${goto 179} ${top mem 1}
${color lightgrey} ${top name 2}${goto 101} ${top pid 2}${goto 139} ${top cpu 2}${goto 179} ${top mem 2}
${color lightgrey} ${top name 3}${goto 101} ${top pid 3}${goto 139} ${top cpu 3}${goto 179} ${top mem 3}
${color lightgrey} ${top name 4}${goto 101} ${top pid 4}${goto 139} ${top cpu 4}${goto 179} ${top mem 4}
${color lightgrey} ${top name 5}${goto 101} ${top pid 5}${goto 139} ${top cpu 4}${goto 179} ${top mem 5}
${color lightgrey} ${top name 6}${goto 101} ${top pid 6}${goto 139} ${top cpu 4}${goto 179} ${top mem 6}
${color lightgrey} ${top name 7}${goto 101} ${top pid 7}${goto 139} ${top cpu 4}${goto 179} ${top mem 7}
${color lightgrey} ${top name 8}${goto 101} ${top pid 8}${goto 139} ${top cpu 4}${goto 179} ${top mem 8}
$hr
Memoria
${color grey}RAM Usage:$color $mem / $memmax 
$memperc% ${goto 51}${membar 4}
${color grey}Swap Usage:$color $swap / $swapmax 
$swapperc% ${goto 51}${swapbar 4}
$hr
${color grey}File systems:
SDA     ${diskiograph /dev/sda 18,170 666666 CC3333}
/         ${goto 71}${fs_used /}  /  ${fs_size /}   ${goto 160}${fs_bar 6 /}
/home     ${goto 71}${fs_used /home}  /  ${fs_size /home} ${goto 160}${fs_bar 6 /home}
/archivio ${goto 71}${fs_used /media/archivio}  /  ${fs_size /media/archivio} ${goto 160}${fs_bar 6 /media/archivio}
/backup   ${goto 71}${fs_used /media/backup}  /  ${fs_size /media/backup} ${goto 160}${fs_bar 6 /media/backup}
/data     ${goto 71}${fs_used /media/data}  /  ${fs_size /media/data} ${goto 160}${fs_bar 6 /media/data}
$hr
TEMP
SDA:${goto 39} ${execi 5 hddtemp -n /dev/sda} °C
SDB:${goto 39} ${execi 5 hddtemp -n /dev/sdb} °C
SDC:${goto 39} ${execi 5 hddtemp -n /dev/sdc} °C
Nvidia GPU:${goto 59} ${execi 5 sensors | grep -m2 'temp1' | cut -c16-19 | tail -n1} °C
Nvidia fan:${goto 59} ${execi 5 sensors | grep 'fan1' | cut -c15-17} rpm
$hr
${color grey}Networking:
Local IP : ${addr eth0}
Public IP: ${execi 3600 w3m -no-cookie -dump http://checkip.dyndns.org | awk '{print $4}'}
Down: ${goto 45}${downspeed eth0}  -  Up: ${goto 145}${upspeed eth0}
${goto 5}Total Down: ${totaldown eth0}
${goto 5}Total Up: ${totalup eth0}
$hr


${goto 5}open ports: ${tcp_portmon 1 65535 count}
${offset 10}URL${goto 180}PORT
${tcp_portmon 1 65535 rip  0}${alignr 1}${tcp_portmon 1 65535 rport  0}
${tcp_portmon 1 65535 rip  1}${alignr 1}${tcp_portmon 1 65535 rport  1}
${tcp_portmon 1 65535 rip  2}${alignr 1}${tcp_portmon 1 65535 rport  2}
${tcp_portmon 1 65535 rip  3}${alignr 1}${tcp_portmon 1 65535 rport  3}
${tcp_portmon 1 65535 rip  4}${alignr 1}${tcp_portmon 1 65535 rport  4}
${tcp_portmon 1 65535 rip  5}${alignr 1}${tcp_portmon 1 65535 rport  5}
]]

Vi auguro buon divertimento.

Rispondi

Questo sito utilizza Akismet per ridurre lo spam. Scopri come vengono elaborati i dati derivati dai commenti.