As Steve mentioned, dmidecode provides information on physical > memory. Here's a quickie to dump memory sizes: > > sudo dmidecode -t 6 | grep Installed | grep -v Not | cut -f 2 -d : > | cut -f 2,3 -d ' ' >
I was curious and gave this a run on my Dell Precision desktop here at work. "-t 6" (type 6: Memory Module, see man dmidecode for all the types) returned nothing on this Dell. Type 17 "Memory Device" shows all the slots in my machine and reports their size. This alternate command line works for me (sorry, I'm an awk geek so I had to use awk :) dmidecode -t 17 | awk '/Size:/ { if ($2!="No") memtotal+=$2 } BEGIN { memtotal=0 } END { print "Total memory: "memtotal" MB" }' My system has 4 banks, two with 256MB chips and two empty (Size reports as "No Module Installed"). (note, dmidecode must be in your path when you call it with sudo like this. Alternatively you could call it as: sudo /usr/sbin/dmidecode .....) Sample runs: [EMAIL PROTECTED] ~]$ sudo dmidecode -t 17 | awk '/Size:/ { if ($2!="No") memtotal+=$2 } BEGIN { memtotal=0 } END { print "Total memory: "memtotal" MB" }' Total memory: 512 MB [EMAIL PROTECTED] ~]$ sudo dmidecode -t 17 | awk '/Size:/ { if ($2!="No") memtotal+=$2 } BEGIN { memtotal=0 } END { print "Total memory: "memtotal" MB" }' Total memory: 1024 MB -Shawn
_______________________________________________ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/