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 4be2a8ffff4f4f40fb5491877d184212c1f4590b
parent d500be923a601acba2701d6f78e2fb662de498aa
Auteurice: Arthur Pons <arthur.pons@unistra.fr>
Date:   Fri, 14 Mar 2025 19:25:25 +0100

Récupération info RAM plus robuste

Testé sur la packard bell

Diffstat:
Mtests/rapport | 11++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/tests/rapport b/tests/rapport @@ -7,9 +7,14 @@ cat /proc/cpuinfo | grep "^model name" | sort -u | sed 's/^[^:]*:/CPU :/' # RAM sudo dmidecode -t memory | awk -F':' ' - /^ Size:/ { printf "RAM : %s",$2 } - /^ (Type:|Manufacturer:)/ { printf $2 } - /^ Configured Memory Speed:/ { print $2 }' + /Memory Device/ { mem++ } + /^ Size:/ && mem>0 { arr[mem,"size"]=$2 } + /^ Type:/ && mem>0 { arr[mem,"type"]=$2 } + /^ Manufacturer:/ && mem>0 { arr[mem,"manuf"]=$2 } + /^ Configured Memory Speed:/ && mem>0 { arr[mem,"speed"]=$2 } + END { for(i=1;i<=mem;i++) + { printf "RAM : %s, %s, %s, %s\n",arr[i,"size"],arr[i,"type"],arr[i,"speed"],arr[i,"manuf"]} + }' # Batterie . "/sys/class/power_supply/BAT0/uevent"