getInfo 2.8.2

This commit is contained in:
kyodev 2017-10-17 20:40:32 +02:00
parent 7edcab52e0
commit c178278ece
2 changed files with 41 additions and 39 deletions

View File

@ -1,6 +1,6 @@
#!/bin/bash
version=2.8.1
version=2.8.2
date="17/10/2017"
projet="simpledeb"
contact="IRC freenode ##sdeb ou https://framagit.org/kyodev/kyopages/issues/"
@ -1063,16 +1063,17 @@ figet_batt_test(){ # 17/10/2017
text="répertoire /sys/class/power_supply/ inexistant"
return 1
fi
text="## batterie test \n\n"
text="## batterie test \n\n"
text="\`/sys/class/power_supply/ 1\` \n"
text+='```\n'
echo -e "$text" >> "$fileOutput"
f__scandir "/sys/class/power_supply/" 2
text+='```\n' >> "$fileOutput"
echo -e "$text" >> "$fileOutput" # flush avant scandir
f__scandir "/sys/class/power_supply/" 1
text='``` \n' >> "$fileOutput"
figet_batt
text+="figet_batt \n"
text+='```\n'
text+="$fget_batt \n"
text+="figet_batt \n"
text+='```\n'
text+="$fget_batt \n"
text+='``` \n'
echo -e "$text" >> "$fileOutput"
}
@ -1262,16 +1263,17 @@ figet_dmi(){ # 12/10/2017
figet_dmi_test(){ # 17/10/2017
local text
text="## dmi test \n\n"
text+='```\n'
echo -e "$text" >> "$fileOutput"
f__scandir "/sys/class/dmi/id/" 2
text+='```\n' >> "$fileOutput"
text="## dmi test \n\n"
text="\`/sys/class/dmi/ 1\` \n"
text+='``` \n'
echo -e "$text" >> "$fileOutput" # flush avant scandir
f__scandir "/sys/class/dmi/" 1
text='``` \n' >> "$fileOutput"
figet_dmi
text+="figet_dmi \n"
text+='```\n'
text+="$fget_dmi \n"
text+='```\n'
text+="figet_dmi \n"
text+='``` \n'
text+="$fget_dmi \n"
text+='``` \n'
echo -e "$text" >> "$fileOutput"
}
@ -1347,48 +1349,48 @@ figet_hw(){ # 14/10/2017
figet_hw_test(){ # 17/10/2017
local text temp
text+="## hwmon test \n\n"
text+='```\n'
echo -e "$text" >> "$fileOutput" # flush avant f__scandir
f__scandir "/sys/class/hwmon/" 2
text='```\n'
text+="\`/sys/class/hwmon/ 1\` \n"
text+='``` \n'
echo -e "$text" >> "$fileOutput" # flush avant scandir
f__scandir "/sys/class/hwmon/" 1
text='``` \n'
if [ "$(which sensors)" ]; then
text+="\`sensors\` \n"
text+='```\n'
text+='``` \n'
text+="$(sensors) \n"
text+='```\n'
text+='``` \n'
fi
if [ "$(which acpi)" ]; then
text+="\`acpi -V\` \n"
text+='```\n'
text+='``` \n'
text+="$(acpi -V) \n"
text+='```\n'
text+='``` \n'
fi
text+='```\n'
text+="\`/sys/class/thermal/ 1\` \n"
text+='```\n'
echo -e "$text" >> "$fileOutput" # flush avant f__scandir
echo -e "$text" >> "$fileOutput" # flush avant scandir
f__scandir "/sys/class/thermal/" 1
text='```\n'
text='``` \n'
text+="\`/sys/devices/virtual/thermal/ 1\` \n"
text+='```\n'
echo -e "$text" >> "$fileOutput" # flush avant f__scandir
text+='``` \n'
echo -e "$text" >> "$fileOutput" # flush avant scandir
f__scandir "/sys/devices/virtual/thermal/" 1
text='```\n'
text='``` \n'
figet_hw
text+="figet_hw \n"
text+='```\n'
text+="$fget_hw \n"
text+="figet_hw \n"
text+='```\n'
text+="$fget_hw \n"
text+='``` \n'
# tempo pour analyse méthode figet_cpu
if [ -f "/sys/class/hwmon/hwmon0/temp1_input" ]; then
temp="$(< "/sys/class/hwmon/hwmon0/temp1_input")"
temp="$((temp * 100 / 10000))" # 33000 x 100 / 10 000 = 330
temp="[${temp/${temp: -1}}.${temp: -1}°C]" # formatage 1 point décimal
fi
text+="hwmon0 temp1_input \n"
text+='```\n'
text+="$temp \n"
text+='```\n'
text+="hwmon0 temp1_input \n"
text+='``` \n'
text+="$temp \n"
text+='``` \n'
echo -e "$text" >> "$fileOutput"
}

View File

@ -16,7 +16,7 @@
* smartmontools/smartctl (root,temp?)
* batterie souris? /sys/class/input/input19/ , 20
filtrer temperature 0 (sur i5: 6temp!)
* strings: /sys/class/hwmon/hwmon1/device/disp: Permission non accordée
---
* f__requis f__wget_test fscript_get_version fscript_update fscript_cronAnacron