scripts-reco

Des scripts pour faciliter le reconditionnement de portables - retour accueil

git clone git://bebou.netlib.re/scripts-reco

Log | Files | Refs | README |

commit 33b9d06bf3350e6b2b338200755435c566502ac1
parent 64e4ff5846e3a9c336455c30488f4a62bc2e41f4
Auteurice: Arthur Pons <arthur.pons@unistra.fr>
Date:   Tue,  1 Apr 2025 09:09:40 +0200

Ajout des GPU

copier/coller, on peut factoriser l'appel à dmidecode

Diffstat:
Mtests/rapport | 10++++++++++
1 file changed, 10 insertions(+), 0 deletions(-)

diff --git a/tests/rapport b/tests/rapport @@ -17,6 +17,16 @@ sudo dmidecode -t memory | awk -F':' ' { printf "RAM : %s, %s, %s, %s\n",arr[i,"size"],arr[i,"type"],arr[i,"speed"],arr[i,"manuf"]} }' +# GPU +sudo dmidecode -t baseboard | awk -F': ' ' + /^Onboard Device/ { mem++ } + /^ Type:/ && mem>0 { arr[mem,"type"]=$2 } + /^ Reference Designation:/ && mem>0 { arr[mem,"name"]=$2 } + /^ Status:/ && mem>0 { arr[mem,"status"]=$2 } + END { for(i=1;i<=mem;i++) + { if(arr[i,"type"]=="Video") { printf "GPU : %s, %s, %s\n",arr[i,"type"],arr[i,"name"],arr[i,"status"]} } + }' + # Batterie for batterie in $(find /sys/class/power_supply/ -type l -name 'BAT*');do