mirror of https://framagit.org/kyodev/kyopages.git
getInfo 2.8.6
This commit is contained in:
parent
a6070a8f97
commit
65b9082c68
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
version=2.8.5
|
||||
version=2.8.6
|
||||
date="17/10/2017"
|
||||
projet="simpledeb"
|
||||
contact="IRC freenode ##sdeb ou https://framagit.org/kyodev/kyopages/issues/"
|
||||
|
@ -359,7 +359,7 @@ fi_cpu(){ # 17/10/2017
|
|||
|
||||
fi_disk(){ # 17/10/2017
|
||||
local disk_lsblk disk_df disk_df_i fstab resume idResume idSwap alert_uuidResume text pluriel
|
||||
local dd_temp dd_temp_alert dd_temp_alert_text dd_temp idisk tempodd
|
||||
local dd_temp dd_temp_alert dd_temp idisk tempodd
|
||||
disk_lsblk="$(lsblk -o NAME,FSTYPE,SIZE,LABEL,MOUNTPOINT,UUID)"
|
||||
disk_df="$(df -h --output=source,target,fstype,size,used,avail,pcent --exclude=tmpfs --exclude=devtmpfs | grep -Ev 'devpts|none|proc|sys|tmpfs|udev')"
|
||||
disk_df_i="$(df -i --exclude=tmpfs --exclude=devtmpfs | grep -Ev 'devpts|none|proc|sys|tmpfs|udev')"
|
||||
|
@ -382,15 +382,13 @@ fi_disk(){ # 17/10/2017
|
|||
if [ "$(which hddtemp)" ]; then
|
||||
unset dd_temp dd_temp_alert
|
||||
for idisk in $disk_fix; do
|
||||
tempodd="$(LC_ALL=C hddtemp /dev/sd$idisk | cut -d ':' -f3 | sed 's/[^0-9]*//g; /not available/d')"
|
||||
[ -r '/dev/$idisk' ] || continue
|
||||
tempodd="$(LC_ALL=C hddtemp /dev/$idisk | cut -d ':' -f3 | sed 's/[^0-9]*//g; /not available/d')"
|
||||
dd_temp+="$idisk: $tempodd °C"$' \n'
|
||||
[ "$dd_temp" -ge 50 ] && dd_temp_alert+="/!\ $idisk: température > 50°c) "$' \n'
|
||||
[ "$tempodd" -ge 50 ] && dd_temp_alert+="/!\ $idisk: température > 50°C) "$' \n'
|
||||
done
|
||||
dd_temp=${dd_temp::-1} # suppression dernier $'\n'
|
||||
dd_temp_alert=${dd_temp_alert::-1} # suppression dernier $'\n'
|
||||
[ "$(wc -w <<< $dd_temp_alert)" -gt 1 ] && pluriel="s" || unset pluriel
|
||||
dd_temp_alert_text="disque$pluriel dépassant 50°C: \n"
|
||||
dd_temp_alert_text+="$dd_temp_alert \n"
|
||||
fi
|
||||
###
|
||||
text="## disque(s) \n\n"
|
||||
|
@ -407,10 +405,12 @@ fi_disk(){ # 17/10/2017
|
|||
text+="| :---: | :---: | :---: | :---: | \n"
|
||||
text+="| $disk_ata | $disk_usb | $disk_mmc | $disk_nvme | \n\n"
|
||||
# éventuellement hddtemp
|
||||
text+='`hddtemp /dev/sd?` (température disques) \n'
|
||||
text+='``` \n'
|
||||
text+="$dd_temp \n"
|
||||
text+='``` \n'
|
||||
if [ "$dd_temp" ]; then
|
||||
text+='`hddtemp /dev/sd?` (température disques) \n'
|
||||
text+='``` \n'
|
||||
text+="$dd_temp \n"
|
||||
text+='``` \n'
|
||||
fi
|
||||
if [ "$dd_temp_alert" ]; then
|
||||
text+="$dd_temp_alert \n"
|
||||
text+="$dd_temp_alert_text \n"
|
||||
|
|
|
@ -16,12 +16,12 @@
|
|||
* smartmontools/smartctl (root,temp?)
|
||||
* batterie souris? /sys/class/input/input19/ , 20
|
||||
* filtrer temperature 0 (sur i5: 6temp!)
|
||||
|
||||
* revoir test $EUID: [ "$EUID" -eq 0 ] || [ "$SUDO_UID" ]
|
||||
---
|
||||
|
||||
* f__requis f__wget_test fscript_get_version fscript_update fscript_cronAnacron
|
||||
|
||||
## 2.8.5 17/10/2017
|
||||
## 2.8.6 17/10/2017
|
||||
|
||||
* nouveau: figet_hw_test, acpi -V si disponible, tests (temporaires) sur
|
||||
/sys/class/thermal/ & /sys/devices/virtual/thermal/ & hwmon0(méthode neofetch)
|
||||
|
|
Loading…
Reference in New Issue