file containing one to four of the following blocks of text? I then
want to print the results in a format showing the memory size (128)
for each device that was found?
Structure: Memory Device (Type 17)
Type: 17
Length: 15h
Handle: 0024h (36t)
Memory Array Handle: 0021
Memory Error Information Handle: FFFE
Total Width: 64 (0040h)
Data Width: 64 (0040h)
Size: 128 (0080h)
Form Factor: DIMM
Device Set: 0001h
Device Locator: DIMM 0
Bank Locator: BANK 0
Memory Type: SDRAM
Type Detail: 0080h
Serial Number:
For example, say the SMBIOS dump contained 2 of the above blocks and I
want to print something like:
myhost 128 256 x x
Would I use an array to store the 4 memory values? I tried something
like the following.. .Am I on the right track? I just need help
with how to parse the file and extract the memory sizes into some type
of variable.
while (<INFILE>)
{
if(/\(Type 17\)/)
{
while(<INFILE>)
{ if(/Size/)
{ # Assign size to array
$memory=~s/^\s*Size\:\s*//;
}
if(/Serial/)
{ next; }
}
}
}
.................................................. ...............
Posted via TITANnews - Uncensored Newsgroups Access
at http://www.TitanNews.com <<<<
-=Every Newsgroup - Anonymous, UNCENSORED, BROADBAND Downloads=-