Skip Menu |

This queue is for tickets about the Mac-SysProfile CPAN distribution.

Report information
The Basics
Id: 52983
Status: resolved
Priority: 0/
Queue: Mac-SysProfile

People
Owner: Nobody in particular
Requestors: sth [...] magnet.fsu.edu
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Bug in memory classification for Mac::SysProfile for OS X 10.6
Date: Tue, 22 Dec 2009 18:05:44 -0500
To: bug-Mac-SysProfile [...] rt.cpan.org
From: Scott Hannahs <sth [...] magnet.fsu.edu>
Daniel, I believe I have found a problem with Mac:SysProfile version 0.03. I have been messing around with the OCSNG inventory system which calls this module. When using Mac OS X 10.6.2 Perl 5.10.0 The system profiler command returns: % system_profiler SPMemoryDataType Memory: Memory Slots: ECC: Enabled DIMM Riser A/DIMM 1: Size: 1 GB Type: DDR2 FB-DIMM Speed: 667 MHz Status: OK Manufacturer: 0x802C Part Number: 0x3138484631323837324A4436363744364434 Serial Number: 0xE7095361 DIMM Riser A/DIMM 2: Size: 1 GB Type: DDR2 FB-DIMM Speed: 667 MHz Status: OK Manufacturer: 0x802C Part Number: 0x3138484631323837324A4436363744364434 Serial Number: 0xE7095367 <etc... for all the memory modules> But the hash table for this has a table for "memory slots" that only contains the entry for ECC. There is no entry for all the memory modules. There should be a table for each Memory slot. To get the memory slots the following code is used: # create the profile object and return undef unless we get something back my $pro = Mac::SysProfile->new(); my $h = $pro->gettype('SPMemoryDataType'); return(undef) unless(ref($h) eq 'HASH'); # Workaround for MacOSX 10.5.7 if ($h->{'Memory Slots'}) { $h = $h->{'Memory Slots'}; } Any help or insight you can give on this would be appreciated. -Scott Dr. Scott Hannahs, Director of DC Field Instrumentation and Facilities National High Magnetic Field Laboratory, Florida State University http://sthmac.magnet.fsu.edu 1800 E. Paul Dirac Dr., Tallahassee FL 32310, (850)644-0216/FAX 644-0534
Subject: Re: [rt.cpan.org #52983] Bug in memory classification for Mac::SysProfile for OS X 10.6
Date: Tue, 22 Dec 2009 22:47:24 -0600
To: bug-Mac-SysProfile [...] rt.cpan.org
From: Dan Muey <webmaster [...] simplemood.com>
thanks Scott, I'll try to take a look tomorrow On Dec 22, 2009, at 5:06 PM, Scott Hannahs via RT wrote: Show quoted text
> Tue Dec 22 18:06:12 2009: Request 52983 was acted upon. > Transaction: Ticket created by sth@magnet.fsu.edu > Queue: Mac-SysProfile > Subject: Bug in memory classification for Mac::SysProfile for OS > X 10.6 > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: sth@magnet.fsu.edu > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=52983 > > > > Daniel, > > I believe I have found a problem with Mac:SysProfile version 0.03. I > have been messing around with the OCSNG inventory system which calls > this module. When using > > Mac OS X 10.6.2 > Perl 5.10.0 > > The system profiler command returns: > % system_profiler SPMemoryDataType > Memory: > > Memory Slots: > > ECC: Enabled > > DIMM Riser A/DIMM 1: > > Size: 1 GB > Type: DDR2 FB-DIMM > Speed: 667 MHz > Status: OK > Manufacturer: 0x802C > Part Number: 0x3138484631323837324A4436363744364434 > Serial Number: 0xE7095361 > > DIMM Riser A/DIMM 2: > > Size: 1 GB > Type: DDR2 FB-DIMM > Speed: 667 MHz > Status: OK > Manufacturer: 0x802C > Part Number: 0x3138484631323837324A4436363744364434 > Serial Number: 0xE7095367 > > <etc... for all the memory modules> > > But the hash table for this has a table for "memory slots" that only > contains the entry for ECC. There is no entry for all the memory > modules. There should be a table for each Memory slot. > > To get the memory slots the following code is used: > > # create the profile object and return undef unless we get > something back > my $pro = Mac::SysProfile->new(); > my $h = $pro->gettype('SPMemoryDataType'); > return(undef) unless(ref($h) eq 'HASH'); > > # Workaround for MacOSX 10.5.7 > if ($h->{'Memory Slots'}) { > $h = $h->{'Memory Slots'}; > } > > Any help or insight you can give on this would be appreciated. > > -Scott > > > > > Dr. Scott Hannahs, Director of DC Field Instrumentation and Facilities > National High Magnetic Field Laboratory, Florida State University > http://sthmac.magnet.fsu.edu > 1800 E. Paul Dirac Dr., Tallahassee FL 32310, (850)644-0216/FAX > 644-0534 > >
Subject: Re: [rt.cpan.org #52983] Bug in memory classification for Mac::SysProfile for OS X 10.6
Date: Wed, 23 Dec 2009 12:10:17 -0500
To: bug-Mac-SysProfile [...] rt.cpan.org
From: Scott Hannahs <sth [...] magnet.fsu.edu>
Just a thought. I was looking at the code (DISCLAIMER: I am not a perl programmer by any stretch of the imagination) but it seems to me that you assume that each section is preceded by a name terminated by a colon (:). The rest of the line is ignored? If this is the case then processing the system profiler output below will ignore the value "Enabled" for ECC: and in fact put all the DIMM data in the ECC section? I really think that the Apple format for this is terrible. Also as a cleanup tweak in the xml subroutine you hardwire the -xml flag even though you setup a variable in conf: `$conf{bin} -xml $key` should be ??? `$conf{bin} $conf{xml} $key` Hope that helps On Dec 22, 2009, at 23:47, SimpleMood Webmaster via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=52983 > > > thanks Scott, I'll try to take a look tomorrow > > On Dec 22, 2009, at 5:06 PM, Scott Hannahs via RT wrote: >
>> Tue Dec 22 18:06:12 2009: Request 52983 was acted upon. >> Transaction: Ticket created by sth@magnet.fsu.edu >> Queue: Mac-SysProfile >> Subject: Bug in memory classification for Mac::SysProfile for OS >> X 10.6 >> Broken in: (no value) >> Severity: (no value) >> Owner: Nobody >> Requestors: sth@magnet.fsu.edu >> Status: new >> Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=52983 > >> >> >> Daniel, >> >> I believe I have found a problem with Mac:SysProfile version 0.03. I >> have been messing around with the OCSNG inventory system which calls >> this module. When using >> >> Mac OS X 10.6.2 >> Perl 5.10.0 >> >> The system profiler command returns: >> % system_profiler SPMemoryDataType >> Memory: >> >> Memory Slots: >> >> ECC: Enabled >> >> DIMM Riser A/DIMM 1: >> >> Size: 1 GB >> Type: DDR2 FB-DIMM >> Speed: 667 MHz >> Status: OK >> Manufacturer: 0x802C >> Part Number: 0x3138484631323837324A4436363744364434 >> Serial Number: 0xE7095361 >> >> DIMM Riser A/DIMM 2: >> >> Size: 1 GB >> Type: DDR2 FB-DIMM >> Speed: 667 MHz >> Status: OK >> Manufacturer: 0x802C >> Part Number: 0x3138484631323837324A4436363744364434 >> Serial Number: 0xE7095367 >> >> <etc... for all the memory modules> >> >> But the hash table for this has a table for "memory slots" that only >> contains the entry for ECC. There is no entry for all the memory >> modules. There should be a table for each Memory slot. >> >> To get the memory slots the following code is used: >> >> # create the profile object and return undef unless we get >> something back >> my $pro = Mac::SysProfile->new(); >> my $h = $pro->gettype('SPMemoryDataType'); >> return(undef) unless(ref($h) eq 'HASH'); >> >> # Workaround for MacOSX 10.5.7 >> if ($h->{'Memory Slots'}) { >> $h = $h->{'Memory Slots'}; >> } >> >> Any help or insight you can give on this would be appreciated. >> >> -Scott >> >> >> >> >> Dr. Scott Hannahs, Director of DC Field Instrumentation and >> Facilities >> National High Magnetic Field Laboratory, Florida State University >> http://sthmac.magnet.fsu.edu >> 1800 E. Paul Dirac Dr., Tallahassee FL 32310, (850)644-0216/FAX >> 644-0534 >> >>
> >
Subject: Re: [rt.cpan.org #52983] Bug in memory classification for Mac::SysProfile for OS X 10.6
Date: Wed, 23 Dec 2009 15:29:13 -0600
To: bug-Mac-SysProfile [...] rt.cpan.org
From: Dan Muey <webmaster [...] simplemood.com>
thanks Scott, I've not had time today but I'll try to look ASAP, sounds like you're on to something! On Dec 23, 2009, at 11:10 AM, Scott Hannahs via RT wrote: Show quoted text
> Queue: Mac-SysProfile > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=52983 > > > Just a thought. I was looking at the code (DISCLAIMER: I am not a > perl programmer by any stretch of the imagination) but it seems to me > that you assume that each section is preceded by a name terminated by > a colon (:). The rest of the line is ignored? > > If this is the case then processing the system profiler output below > will ignore the value "Enabled" for ECC: and in fact put all the DIMM > data in the ECC section? I really think that the Apple format for > this is terrible. > > Also as a cleanup tweak in the xml subroutine you hardwire the -xml > flag even though you setup a variable in conf: > `$conf{bin} -xml $key` > should be ??? > `$conf{bin} $conf{xml} $key` > Hope that helps > > On Dec 22, 2009, at 23:47, SimpleMood Webmaster via RT wrote: >
>> <URL: http://rt.cpan.org/Ticket/Display.html?id=52983 > >> >> thanks Scott, I'll try to take a look tomorrow >> >> On Dec 22, 2009, at 5:06 PM, Scott Hannahs via RT wrote: >>
>>> Tue Dec 22 18:06:12 2009: Request 52983 was acted upon. >>> Transaction: Ticket created by sth@magnet.fsu.edu >>> Queue: Mac-SysProfile >>> Subject: Bug in memory classification for Mac::SysProfile for OS >>> X 10.6 >>> Broken in: (no value) >>> Severity: (no value) >>> Owner: Nobody >>> Requestors: sth@magnet.fsu.edu >>> Status: new >>> Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=52983 > >>> >>> >>> Daniel, >>> >>> I believe I have found a problem with Mac:SysProfile version >>> 0.03. I >>> have been messing around with the OCSNG inventory system which calls >>> this module. When using >>> >>> Mac OS X 10.6.2 >>> Perl 5.10.0 >>> >>> The system profiler command returns: >>> % system_profiler SPMemoryDataType >>> Memory: >>> >>> Memory Slots: >>> >>> ECC: Enabled >>> >>> DIMM Riser A/DIMM 1: >>> >>> Size: 1 GB >>> Type: DDR2 FB-DIMM >>> Speed: 667 MHz >>> Status: OK >>> Manufacturer: 0x802C >>> Part Number: 0x3138484631323837324A4436363744364434 >>> Serial Number: 0xE7095361 >>> >>> DIMM Riser A/DIMM 2: >>> >>> Size: 1 GB >>> Type: DDR2 FB-DIMM >>> Speed: 667 MHz >>> Status: OK >>> Manufacturer: 0x802C >>> Part Number: 0x3138484631323837324A4436363744364434 >>> Serial Number: 0xE7095367 >>> >>> <etc... for all the memory modules> >>> >>> But the hash table for this has a table for "memory slots" that only >>> contains the entry for ECC. There is no entry for all the memory >>> modules. There should be a table for each Memory slot. >>> >>> To get the memory slots the following code is used: >>> >>> # create the profile object and return undef unless we get >>> something back >>> my $pro = Mac::SysProfile->new(); >>> my $h = $pro->gettype('SPMemoryDataType'); >>> return(undef) unless(ref($h) eq 'HASH'); >>> >>> # Workaround for MacOSX 10.5.7 >>> if ($h->{'Memory Slots'}) { >>> $h = $h->{'Memory Slots'}; >>> } >>> >>> Any help or insight you can give on this would be appreciated. >>> >>> -Scott >>> >>> >>> >>> >>> Dr. Scott Hannahs, Director of DC Field Instrumentation and >>> Facilities >>> National High Magnetic Field Laboratory, Florida State University >>> http://sthmac.magnet.fsu.edu >>> 1800 E. Paul Dirac Dr., Tallahassee FL 32310, (850)644-0216/FAX >>> 644-0534 >>> >>>
>> >>
> >
Subject: Re: [rt.cpan.org #52983] Bug in memory classification for Mac::SysProfile for OS X 10.6
Date: Wed, 10 Feb 2010 18:42:25 -0500
To: bug-Mac-SysProfile [...] rt.cpan.org
From: Scott Hannahs <sth [...] magnet.fsu.edu>
Not to be a pest... Alright I admit I am being a pest. Have you had a moment to look at the code? -Scott On Dec 23, 2009, at 16:29, SimpleMood Webmaster via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=52983 > > > thanks Scott, I've not had time today but I'll try to look ASAP, > sounds like you're on to something! > > On Dec 23, 2009, at 11:10 AM, Scott Hannahs via RT wrote: >
>> Queue: Mac-SysProfile >> Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=52983 > >> >> Just a thought. I was looking at the code (DISCLAIMER: I am not a >> perl programmer by any stretch of the imagination) but it seems to me >> that you assume that each section is preceded by a name terminated by >> a colon (:). The rest of the line is ignored? >> >> If this is the case then processing the system profiler output below >> will ignore the value "Enabled" for ECC: and in fact put all the DIMM >> data in the ECC section? I really think that the Apple format for >> this is terrible. >> >> Also as a cleanup tweak in the xml subroutine you hardwire the -xml >> flag even though you setup a variable in conf: >> `$conf{bin} -xml $key` >> should be ??? >> `$conf{bin} $conf{xml} $key` >> Hope that helps >> >> On Dec 22, 2009, at 23:47, SimpleMood Webmaster via RT wrote: >>
>>> <URL: http://rt.cpan.org/Ticket/Display.html?id=52983 > >>> >>> thanks Scott, I'll try to take a look tomorrow >>> >>> On Dec 22, 2009, at 5:06 PM, Scott Hannahs via RT wrote: >>>
>>>> Tue Dec 22 18:06:12 2009: Request 52983 was acted upon. >>>> Transaction: Ticket created by sth@magnet.fsu.edu >>>> Queue: Mac-SysProfile >>>> Subject: Bug in memory classification for Mac::SysProfile for OS >>>> X 10.6 >>>> Broken in: (no value) >>>> Severity: (no value) >>>> Owner: Nobody >>>> Requestors: sth@magnet.fsu.edu >>>> Status: new >>>> Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=52983 > >>>> >>>> >>>> Daniel, >>>> >>>> I believe I have found a problem with Mac:SysProfile version >>>> 0.03. I >>>> have been messing around with the OCSNG inventory system which >>>> calls >>>> this module. When using >>>> >>>> Mac OS X 10.6.2 >>>> Perl 5.10.0 >>>> >>>> The system profiler command returns: >>>> % system_profiler SPMemoryDataType >>>> Memory: >>>> >>>> Memory Slots: >>>> >>>> ECC: Enabled >>>> >>>> DIMM Riser A/DIMM 1: >>>> >>>> Size: 1 GB >>>> Type: DDR2 FB-DIMM >>>> Speed: 667 MHz >>>> Status: OK >>>> Manufacturer: 0x802C >>>> Part Number: 0x3138484631323837324A4436363744364434 >>>> Serial Number: 0xE7095361 >>>> >>>> DIMM Riser A/DIMM 2: >>>> >>>> Size: 1 GB >>>> Type: DDR2 FB-DIMM >>>> Speed: 667 MHz >>>> Status: OK >>>> Manufacturer: 0x802C >>>> Part Number: 0x3138484631323837324A4436363744364434 >>>> Serial Number: 0xE7095367 >>>> >>>> <etc... for all the memory modules> >>>> >>>> But the hash table for this has a table for "memory slots" that >>>> only >>>> contains the entry for ECC. There is no entry for all the memory >>>> modules. There should be a table for each Memory slot. >>>> >>>> To get the memory slots the following code is used: >>>> >>>> # create the profile object and return undef unless we get >>>> something back >>>> my $pro = Mac::SysProfile->new(); >>>> my $h = $pro->gettype('SPMemoryDataType'); >>>> return(undef) unless(ref($h) eq 'HASH'); >>>> >>>> # Workaround for MacOSX 10.5.7 >>>> if ($h->{'Memory Slots'}) { >>>> $h = $h->{'Memory Slots'}; >>>> } >>>> >>>> Any help or insight you can give on this would be appreciated. >>>> >>>> -Scott >>>> >>>> >>>> >>>> >>>> Dr. Scott Hannahs, Director of DC Field Instrumentation and >>>> Facilities >>>> National High Magnetic Field Laboratory, Florida State University >>>> http://sthmac.magnet.fsu.edu >>>> 1800 E. Paul Dirac Dr., Tallahassee FL 32310, (850)644-0216/FAX >>>> 644-0534 >>>> >>>>
>>> >>>
>> >>
> >
Subject: Re: [rt.cpan.org #52983] Bug in memory classification for Mac::SysProfile for OS X 10.6
Date: Thu, 11 Feb 2010 09:51:29 -0600
To: bug-Mac-SysProfile [...] rt.cpan.org
From: Dan Muey <webmaster [...] simplemood.com>
doh! thanks, slipped my mind and got busy, if it's not updated in a week ping me again, thanks! On Feb 10, 2010, at 5:43 PM, Scott Hannahs via RT wrote: Show quoted text
> Queue: Mac-SysProfile > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=52983 > > > Not to be a pest... Alright I admit I am being a pest. Have you had > a moment to look at the code? > > -Scott > > On Dec 23, 2009, at 16:29, SimpleMood Webmaster via RT wrote: >
>> <URL: http://rt.cpan.org/Ticket/Display.html?id=52983 > >> >> thanks Scott, I've not had time today but I'll try to look ASAP, >> sounds like you're on to something! >> >> On Dec 23, 2009, at 11:10 AM, Scott Hannahs via RT wrote: >>
>>> Queue: Mac-SysProfile >>> Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=52983 > >>> >>> Just a thought. I was looking at the code (DISCLAIMER: I am not a >>> perl programmer by any stretch of the imagination) but it seems to >>> me >>> that you assume that each section is preceded by a name terminated >>> by >>> a colon (:). The rest of the line is ignored? >>> >>> If this is the case then processing the system profiler output below >>> will ignore the value "Enabled" for ECC: and in fact put all the >>> DIMM >>> data in the ECC section? I really think that the Apple format for >>> this is terrible. >>> >>> Also as a cleanup tweak in the xml subroutine you hardwire the -xml >>> flag even though you setup a variable in conf: >>> `$conf{bin} -xml $key` >>> should be ??? >>> `$conf{bin} $conf{xml} $key` >>> Hope that helps >>> >>> On Dec 22, 2009, at 23:47, SimpleMood Webmaster via RT wrote: >>>
>>>> <URL: http://rt.cpan.org/Ticket/Display.html?id=52983 > >>>> >>>> thanks Scott, I'll try to take a look tomorrow >>>> >>>> On Dec 22, 2009, at 5:06 PM, Scott Hannahs via RT wrote: >>>>
>>>>> Tue Dec 22 18:06:12 2009: Request 52983 was acted upon. >>>>> Transaction: Ticket created by sth@magnet.fsu.edu >>>>> Queue: Mac-SysProfile >>>>> Subject: Bug in memory classification for Mac::SysProfile for OS >>>>> X 10.6 >>>>> Broken in: (no value) >>>>> Severity: (no value) >>>>> Owner: Nobody >>>>> Requestors: sth@magnet.fsu.edu >>>>> Status: new >>>>> Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=52983 > >>>>> >>>>> >>>>> Daniel, >>>>> >>>>> I believe I have found a problem with Mac:SysProfile version >>>>> 0.03. I >>>>> have been messing around with the OCSNG inventory system which >>>>> calls >>>>> this module. When using >>>>> >>>>> Mac OS X 10.6.2 >>>>> Perl 5.10.0 >>>>> >>>>> The system profiler command returns: >>>>> % system_profiler SPMemoryDataType >>>>> Memory: >>>>> >>>>> Memory Slots: >>>>> >>>>> ECC: Enabled >>>>> >>>>> DIMM Riser A/DIMM 1: >>>>> >>>>> Size: 1 GB >>>>> Type: DDR2 FB-DIMM >>>>> Speed: 667 MHz >>>>> Status: OK >>>>> Manufacturer: 0x802C >>>>> Part Number: 0x3138484631323837324A4436363744364434 >>>>> Serial Number: 0xE7095361 >>>>> >>>>> DIMM Riser A/DIMM 2: >>>>> >>>>> Size: 1 GB >>>>> Type: DDR2 FB-DIMM >>>>> Speed: 667 MHz >>>>> Status: OK >>>>> Manufacturer: 0x802C >>>>> Part Number: 0x3138484631323837324A4436363744364434 >>>>> Serial Number: 0xE7095367 >>>>> >>>>> <etc... for all the memory modules> >>>>> >>>>> But the hash table for this has a table for "memory slots" that >>>>> only >>>>> contains the entry for ECC. There is no entry for all the memory >>>>> modules. There should be a table for each Memory slot. >>>>> >>>>> To get the memory slots the following code is used: >>>>> >>>>> # create the profile object and return undef unless we get >>>>> something back >>>>> my $pro = Mac::SysProfile->new(); >>>>> my $h = $pro->gettype('SPMemoryDataType'); >>>>> return(undef) unless(ref($h) eq 'HASH'); >>>>> >>>>> # Workaround for MacOSX 10.5.7 >>>>> if ($h->{'Memory Slots'}) { >>>>> $h = $h->{'Memory Slots'}; >>>>> } >>>>> >>>>> Any help or insight you can give on this would be appreciated. >>>>> >>>>> -Scott >>>>> >>>>> >>>>> >>>>> >>>>> Dr. Scott Hannahs, Director of DC Field Instrumentation and >>>>> Facilities >>>>> National High Magnetic Field Laboratory, Florida State University >>>>> http://sthmac.magnet.fsu.edu >>>>> 1800 E. Paul Dirac Dr., Tallahassee FL 32310, (850)644-0216/FAX >>>>> 644-0534 >>>>> >>>>>
>>>> >>>>
>>> >>>
>> >>
> >
Subject: Re: [rt.cpan.org #52983] Bug in memory classification for Mac::SysProfile for OS X 10.6
Date: Fri, 12 Mar 2010 16:52:14 -0500
To: bug-Mac-SysProfile [...] rt.cpan.org
From: Scott Hannahs <sth [...] magnet.fsu.edu>
How about a ping once a month? :-) -Scott On Feb 11, 2010, at 10:53, SimpleMood Webmaster via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=52983 > > > doh! thanks, slipped my mind and got busy, if it's not updated in a > week ping me again, thanks! > > On Feb 10, 2010, at 5:43 PM, Scott Hannahs via RT wrote: >
>> Queue: Mac-SysProfile >> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=52983 > >> >> Not to be a pest... Alright I admit I am being a pest. Have you >> had >> a moment to look at the code? >> >> -Scott >> >> On Dec 23, 2009, at 16:29, SimpleMood Webmaster via RT wrote: >>
>>> <URL: http://rt.cpan.org/Ticket/Display.html?id=52983 > >>> >>> thanks Scott, I've not had time today but I'll try to look ASAP, >>> sounds like you're on to something! >>> >>> On Dec 23, 2009, at 11:10 AM, Scott Hannahs via RT wrote: >>>
>>>> Queue: Mac-SysProfile >>>> Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=52983 > >>>> >>>> Just a thought. I was looking at the code (DISCLAIMER: I am not a >>>> perl programmer by any stretch of the imagination) but it seems to >>>> me >>>> that you assume that each section is preceded by a name terminated >>>> by >>>> a colon (:). The rest of the line is ignored? >>>> >>>> If this is the case then processing the system profiler output >>>> below >>>> will ignore the value "Enabled" for ECC: and in fact put all the >>>> DIMM >>>> data in the ECC section? I really think that the Apple format for >>>> this is terrible. >>>> >>>> Also as a cleanup tweak in the xml subroutine you hardwire the -xml >>>> flag even though you setup a variable in conf: >>>> `$conf{bin} -xml $key` >>>> should be ??? >>>> `$conf{bin} $conf{xml} $key` >>>> Hope that helps >>>> >>>> On Dec 22, 2009, at 23:47, SimpleMood Webmaster via RT wrote: >>>>
>>>>> <URL: http://rt.cpan.org/Ticket/Display.html?id=52983 > >>>>> >>>>> thanks Scott, I'll try to take a look tomorrow >>>>> >>>>> On Dec 22, 2009, at 5:06 PM, Scott Hannahs via RT wrote: >>>>>
>>>>>> Tue Dec 22 18:06:12 2009: Request 52983 was acted upon. >>>>>> Transaction: Ticket created by sth@magnet.fsu.edu >>>>>> Queue: Mac-SysProfile >>>>>> Subject: Bug in memory classification for Mac::SysProfile for OS >>>>>> X 10.6 >>>>>> Broken in: (no value) >>>>>> Severity: (no value) >>>>>> Owner: Nobody >>>>>> Requestors: sth@magnet.fsu.edu >>>>>> Status: new >>>>>> Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=52983 > >>>>>> >>>>>> >>>>>> Daniel, >>>>>> >>>>>> I believe I have found a problem with Mac:SysProfile version >>>>>> 0.03. I >>>>>> have been messing around with the OCSNG inventory system which >>>>>> calls >>>>>> this module. When using >>>>>> >>>>>> Mac OS X 10.6.2 >>>>>> Perl 5.10.0 >>>>>> >>>>>> The system profiler command returns: >>>>>> % system_profiler SPMemoryDataType >>>>>> Memory: >>>>>> >>>>>> Memory Slots: >>>>>> >>>>>> ECC: Enabled >>>>>> >>>>>> DIMM Riser A/DIMM 1: >>>>>> >>>>>> Size: 1 GB >>>>>> Type: DDR2 FB-DIMM >>>>>> Speed: 667 MHz >>>>>> Status: OK >>>>>> Manufacturer: 0x802C >>>>>> Part Number: 0x3138484631323837324A4436363744364434 >>>>>> Serial Number: 0xE7095361 >>>>>> >>>>>> DIMM Riser A/DIMM 2: >>>>>> >>>>>> Size: 1 GB >>>>>> Type: DDR2 FB-DIMM >>>>>> Speed: 667 MHz >>>>>> Status: OK >>>>>> Manufacturer: 0x802C >>>>>> Part Number: 0x3138484631323837324A4436363744364434 >>>>>> Serial Number: 0xE7095367 >>>>>> >>>>>> <etc... for all the memory modules> >>>>>> >>>>>> But the hash table for this has a table for "memory slots" that >>>>>> only >>>>>> contains the entry for ECC. There is no entry for all the memory >>>>>> modules. There should be a table for each Memory slot. >>>>>> >>>>>> To get the memory slots the following code is used: >>>>>> >>>>>> # create the profile object and return undef unless we get >>>>>> something back >>>>>> my $pro = Mac::SysProfile->new(); >>>>>> my $h = $pro->gettype('SPMemoryDataType'); >>>>>> return(undef) unless(ref($h) eq 'HASH'); >>>>>> >>>>>> # Workaround for MacOSX 10.5.7 >>>>>> if ($h->{'Memory Slots'}) { >>>>>> $h = $h->{'Memory Slots'}; >>>>>> } >>>>>> >>>>>> Any help or insight you can give on this would be appreciated. >>>>>> >>>>>> -Scott >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> Dr. Scott Hannahs, Director of DC Field Instrumentation and >>>>>> Facilities >>>>>> National High Magnetic Field Laboratory, Florida State University >>>>>> http://sthmac.magnet.fsu.edu >>>>>> 1800 E. Paul Dirac Dr., Tallahassee FL 32310, (850)644-0216/FAX >>>>>> 644-0534 >>>>>> >>>>>>
>>>>> >>>>>
>>>> >>>>
>>> >>>
>> >>
> >
On Fri Mar 12 16:53:14 2010, sth@magnet.fsu.edu wrote: Show quoted text
> How about a ping once a month? :-)
Thanks, I'm working on using an XML module to get the data into the hashref. The benefits are: - all 'types' have data under xml mode - standard parsing exists The drawbacks are: - the XML output doesn't contain human readable text like the "plain text, almost YAML" output - the initial structure is much different from the "plain text, almost YAML" format structure I'll have 0.04 out ASAP but it will take some time …
Subject: Re: [rt.cpan.org #52983] Bug in memory classification for Mac::SysProfile for OS X 10.6
Date: Sat, 13 Mar 2010 15:30:51 -0500
To: bug-Mac-SysProfile [...] rt.cpan.org
From: Scott Hannahs <sth [...] magnet.fsu.edu>
On Mar 12, 2010, at 11:35 PM, Daniel Muey via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=52983 > > > On Fri Mar 12 16:53:14 2010, sth@magnet.fsu.edu wrote:
>> How about a ping once a month? :-)
> > Thanks, I'm working on using an XML module to get the data into the hashref. > > The benefits are: > - all 'types' have data under xml mode > - standard parsing exists > > The drawbacks are: > - the XML output doesn't contain human readable text like the "plain text, almost YAML" output > - the initial structure is much different from the "plain text, almost YAML" format structure > > I'll have 0.04 out ASAP but it will take some time …
Thanks for the update. This sounds like a major restructuring, but ending up a more robust solution. I'll keep an eye out for the update. Cheers, Scott
Subject: Re: [rt.cpan.org #52983] Bug in memory classification for Mac::SysProfile for OS X 10.6
Date: Wed, 20 Apr 2011 17:07:14 -0400
To: bug-Mac-SysProfile [...] rt.cpan.org
From: Scott Hannahs <sth [...] magnet.fsu.edu>
Daniel, Any progress? It has been awhile and I just got bit trying to update my perl module on a new system. -Scott On Mar 12, 2010, at 23:35, Daniel Muey via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=52983 > > > On Fri Mar 12 16:53:14 2010, sth@magnet.fsu.edu wrote:
>> How about a ping once a month? :-)
> > Thanks, I'm working on using an XML module to get the data into the hashref. > > The benefits are: > - all 'types' have data under xml mode > - standard parsing exists > > The drawbacks are: > - the XML output doesn't contain human readable text like the "plain text, almost YAML" output > - the initial structure is much different from the "plain text, almost YAML" format structure > > I'll have 0.04 out ASAP but it will take some time …
Subject: Re: [rt.cpan.org #52983] Bug in memory classification for Mac::SysProfile for OS X 10.6
Date: Wed, 20 Apr 2011 16:16:13 -0500
To: bug-Mac-SysProfile [...] rt.cpan.org
From: Dan Muey <webmaster [...] simplemood.com>
Time flies :) Sorry, this fell through the cracks. It might be a few weeks until I have time but I'll try to do it soon, thanks! On Apr 20, 2011, at 4:07 PM, Scott Hannahs via RT wrote: Show quoted text
> Queue: Mac-SysProfile > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=52983 > > > Daniel, > > Any progress? It has been awhile and I just got bit trying to update my perl module on a new system. > > -Scott > > On Mar 12, 2010, at 23:35, Daniel Muey via RT wrote: >
>> <URL: https://rt.cpan.org/Ticket/Display.html?id=52983 > >> >> On Fri Mar 12 16:53:14 2010, sth@magnet.fsu.edu wrote:
>>> How about a ping once a month? :-)
>> >> Thanks, I'm working on using an XML module to get the data into the hashref. >> >> The benefits are: >> - all 'types' have data under xml mode >> - standard parsing exists >> >> The drawbacks are: >> - the XML output doesn't contain human readable text like the "plain text, almost YAML" output >> - the initial structure is much different from the "plain text, almost YAML" format structure >> >> I'll have 0.04 out ASAP but it will take some time …
> >
Subject: Re: [rt.cpan.org #52983] Bug in memory classification for Mac::SysProfile for OS X 10.6
Date: Sat, 18 Jun 2011 10:50:50 -0400
To: bug-Mac-SysProfile [...] rt.cpan.org
From: Scott Hannahs <sth [...] magnet.fsu.edu>
Daniel, Since this seems to be a bigger project than I thought, I have a suggestion. Could you replace the Mac::SysProfile archive at CPAN with a zip file that has no "dot" files for the resource forks. This would at least allow me to use CPAN to build the current version. Even if that is version 0.31 that would help and at least allow things to go forward easily in the script development for the inventory system. When 0.40 comes out then it should allow for all the nice updates to be consistent. I assume like all of us, there are lots of things on your schedule like a day job... So I hesitate to create another thing to do, but this would be helpful and relatively simple. (I think!). If the zip step includes a "--datafork" then that should do it. Cheers, -Scott On Apr 20, 2011, at 17:16, SimpleMood Webmaster via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=52983 > > > Time flies :) Sorry, this fell through the cracks. It might be a few weeks until I have time but I'll try to do it soon, thanks! > > On Apr 20, 2011, at 4:07 PM, Scott Hannahs via RT wrote: >
>> Queue: Mac-SysProfile >> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=52983 > >> >> Daniel, >> >> Any progress? It has been awhile and I just got bit trying to update my perl module on a new system. >> >> -Scott >> >> On Mar 12, 2010, at 23:35, Daniel Muey via RT wrote: >>
>>> <URL: https://rt.cpan.org/Ticket/Display.html?id=52983 > >>> >>> On Fri Mar 12 16:53:14 2010, sth@magnet.fsu.edu wrote:
>>>> How about a ping once a month? :-)
>>> >>> Thanks, I'm working on using an XML module to get the data into the hashref. >>> >>> The benefits are: >>> - all 'types' have data under xml mode >>> - standard parsing exists >>> >>> The drawbacks are: >>> - the XML output doesn't contain human readable text like the "plain text, almost YAML" output >>> - the initial structure is much different from the "plain text, almost YAML" format structure >>> >>> I'll have 0.04 out ASAP but it will take some time …
>> >>
> >
From: guillaume.protet [...] ocsinventory-ng.org
Hi Daniel, I am the official maintainer of the OCS Inventory NG MacOSX agent and we use Mac::Sysprofile to get hardware and software data for coputer inventories. Scott helps us by suggesting ideas, debugging an testing many thing about MacOSX agent integration. We encounter the same memories detection problem under MacOSX 10.6 and 10.7, as reported in this bug report. As you said, the better solution to solve the problem is to use the system_profiler xml output instead of stdout. You said you started to work on a new Mac::Sysprofile 0.4 version. What about this 0.4 version ? Did you continue to work on it ? Instead of re-create the wheel, I ask you if I can help and if we can work together to continue this 0.4 version. It should be glad if we can work to release a new version of Mac::Sysprofile ;) ;). Kind regards, -- Guillaume Le Sam 18 Juin 2011 10:51:05, sth@magnet.fsu.edu a écrit : Show quoted text
> Daniel, > > Since this seems to be a bigger project than I thought, I have a > suggestion. Could you replace the Mac::SysProfile archive at CPAN > with a zip file that has no "dot" files for the resource forks. > This would at least allow me to use CPAN to build the current > version. Even if that is version 0.31 that would help and at > least allow things to go forward easily in the script development > for the inventory system. When 0.40 comes out then it should > allow for all the nice updates to be consistent. > > I assume like all of us, there are lots of things on your schedule > like a day job... So I hesitate to create another thing to do, but > this would be helpful and relatively simple. (I think!). If the > zip step includes a "--datafork" then that should do it. > > Cheers, > > -Scott > > > > On Apr 20, 2011, at 17:16, SimpleMood Webmaster via RT wrote: >
> > <URL: https://rt.cpan.org/Ticket/Display.html?id=52983 > > > > > Time flies :) Sorry, this fell through the cracks. It might be a few
> weeks until I have time but I'll try to do it soon, thanks!
> > > > On Apr 20, 2011, at 4:07 PM, Scott Hannahs via RT wrote: > >
> >> Queue: Mac-SysProfile > >> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=52983 > > >> > >> Daniel, > >> > >> Any progress? It has been awhile and I just got bit trying to
> update my perl module on a new system.
> >> > >> -Scott > >> > >> On Mar 12, 2010, at 23:35, Daniel Muey via RT wrote: > >>
> >>> <URL: https://rt.cpan.org/Ticket/Display.html?id=52983 > > >>> > >>> On Fri Mar 12 16:53:14 2010, sth@magnet.fsu.edu wrote:
> >>>> How about a ping once a month? :-)
> >>> > >>> Thanks, I'm working on using an XML module to get the data into
> the hashref.
> >>> > >>> The benefits are: > >>> - all 'types' have data under xml mode > >>> - standard parsing exists > >>> > >>> The drawbacks are: > >>> - the XML output doesn't contain human readable text like the
> "plain text, almost YAML" output
> >>> - the initial structure is much different from the "plain text,
> almost YAML" format structure
> >>> > >>> I'll have 0.04 out ASAP but it will take some time …
> >> > >>
> > > >
>
Subject: Re: [rt.cpan.org #52983] Bug in memory classification for Mac::SysProfile for OS X 10.6
Date: Wed, 31 Aug 2011 17:20:47 -0500
To: bug-Mac-SysProfile [...] rt.cpan.org
From: Dan Muey <webmaster [...] simplemood.com>
Hello Guillaume, I've not had time yet, if you like I'd be happy to review a patch and publish it once we're all happy with it. Thanks! -- Dan On Aug 31, 2011, at 5:01 PM, Guillaume PROTET via RT wrote: Show quoted text
> Queue: Mac-SysProfile > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=52983 > > > Hi Daniel, > > I am the official maintainer of the OCS Inventory NG MacOSX agent and we use Mac::Sysprofile > to get hardware and software data for coputer inventories. Scott helps us by suggesting > ideas, debugging an testing many thing about MacOSX agent integration. > > We encounter the same memories detection problem under MacOSX 10.6 and 10.7, as > reported in this bug report. As you said, the better solution to solve the problem is to use the > system_profiler xml output instead of stdout. > > You said you started to work on a new Mac::Sysprofile 0.4 version. What about this 0.4 > version ? Did you continue to work on it ? Instead of re-create the wheel, I ask you if I can > help and if we can work together to continue this 0.4 version. It should be glad if we can work > to release a new version of Mac::Sysprofile ;) ;). > > Kind regards, > > -- > Guillaume > > > > > Le Sam 18 Juin 2011 10:51:05, sth@magnet.fsu.edu a écrit :
>> Daniel, >> >> Since this seems to be a bigger project than I thought, I have a >> suggestion. Could you replace the Mac::SysProfile archive at CPAN >> with a zip file that has no "dot" files for the resource forks. >> This would at least allow me to use CPAN to build the current >> version. Even if that is version 0.31 that would help and at >> least allow things to go forward easily in the script development >> for the inventory system. When 0.40 comes out then it should >> allow for all the nice updates to be consistent. >> >> I assume like all of us, there are lots of things on your schedule >> like a day job... So I hesitate to create another thing to do, but >> this would be helpful and relatively simple. (I think!). If the >> zip step includes a "--datafork" then that should do it. >> >> Cheers, >> >> -Scott >> >> >> >> On Apr 20, 2011, at 17:16, SimpleMood Webmaster via RT wrote: >>
>>> <URL: https://rt.cpan.org/Ticket/Display.html?id=52983 > >>> >>> Time flies :) Sorry, this fell through the cracks. It might be a few
>> weeks until I have time but I'll try to do it soon, thanks!
>>> >>> On Apr 20, 2011, at 4:07 PM, Scott Hannahs via RT wrote: >>>
>>>> Queue: Mac-SysProfile >>>> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=52983 > >>>> >>>> Daniel, >>>> >>>> Any progress? It has been awhile and I just got bit trying to
>> update my perl module on a new system.
>>>> >>>> -Scott >>>> >>>> On Mar 12, 2010, at 23:35, Daniel Muey via RT wrote: >>>>
>>>>> <URL: https://rt.cpan.org/Ticket/Display.html?id=52983 > >>>>> >>>>> On Fri Mar 12 16:53:14 2010, sth@magnet.fsu.edu wrote:
>>>>>> How about a ping once a month? :-)
>>>>> >>>>> Thanks, I'm working on using an XML module to get the data into
>> the hashref.
>>>>> >>>>> The benefits are: >>>>> - all 'types' have data under xml mode >>>>> - standard parsing exists >>>>> >>>>> The drawbacks are: >>>>> - the XML output doesn't contain human readable text like the
>> "plain text, almost YAML" output
>>>>> - the initial structure is much different from the "plain text,
>> almost YAML" format structure
>>>>> >>>>> I'll have 0.04 out ASAP but it will take some time …
>>>> >>>>
>>> >>>
>>
> > >
From: guillaume.protet [...] ocsinventory-ng.org
Hi Daniel, Ok thanks a lot. I will start working on it and I will send you a first patch as soon as possible. Kind regards, -- Guillaume Le Mer 31 Aoû 2011 18:17:44, webmaster@simplemood.com a écrit : Show quoted text
> Hello Guillaume, > > I've not had time yet, if you like I'd be happy to review a patch and > publish it once we're all happy with it. > > Thanks! > > -- > Dan > > On Aug 31, 2011, at 5:01 PM, Guillaume PROTET via RT wrote: >
> > Queue: Mac-SysProfile > > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=52983 > > > > > Hi Daniel, > > > > I am the official maintainer of the OCS Inventory NG MacOSX agent
> and we use Mac::Sysprofile
> > to get hardware and software data for coputer inventories. Scott
> helps us by suggesting
> > ideas, debugging an testing many thing about MacOSX agent
> integration.
> > > > We encounter the same memories detection problem under MacOSX 10.6
> and 10.7, as
> > reported in this bug report. As you said, the better solution to
> solve the problem is to use the
> > system_profiler xml output instead of stdout. > > > > You said you started to work on a new Mac::Sysprofile 0.4 version.
> What about this 0.4
> > version ? Did you continue to work on it ? Instead of re-create the
> wheel, I ask you if I can
> > help and if we can work together to continue this 0.4 version. It
> should be glad if we can work
> > to release a new version of Mac::Sysprofile ;) ;). > > > > Kind regards, > > > > -- > > Guillaume > > > > > > > > > > Le Sam 18 Juin 2011 10:51:05, sth@magnet.fsu.edu a écrit :
> >> Daniel, > >> > >> Since this seems to be a bigger project than I thought, I have a > >> suggestion. Could you replace the Mac::SysProfile archive at
> CPAN
> >> with a zip file that has no "dot" files for the resource forks. > >> This would at least allow me to use CPAN to build the current > >> version. Even if that is version 0.31 that would help and at > >> least allow things to go forward easily in the script development > >> for the inventory system. When 0.40 comes out then it should > >> allow for all the nice updates to be consistent. > >> > >> I assume like all of us, there are lots of things on your schedule > >> like a day job... So I hesitate to create another thing to do,
> but
> >> this would be helpful and relatively simple. (I think!). If the > >> zip step includes a "--datafork" then that should do it. > >> > >> Cheers, > >> > >> -Scott > >> > >> > >> > >> On Apr 20, 2011, at 17:16, SimpleMood Webmaster via RT wrote: > >>
> >>> <URL: https://rt.cpan.org/Ticket/Display.html?id=52983 > > >>> > >>> Time flies :) Sorry, this fell through the cracks. It might be a
> few
> >> weeks until I have time but I'll try to do it soon, thanks!
> >>> > >>> On Apr 20, 2011, at 4:07 PM, Scott Hannahs via RT wrote: > >>>
> >>>> Queue: Mac-SysProfile > >>>> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=52983 > > >>>> > >>>> Daniel, > >>>> > >>>> Any progress? It has been awhile and I just got bit trying to
> >> update my perl module on a new system.
> >>>> > >>>> -Scott > >>>> > >>>> On Mar 12, 2010, at 23:35, Daniel Muey via RT wrote: > >>>>
> >>>>> <URL: https://rt.cpan.org/Ticket/Display.html?id=52983 > > >>>>> > >>>>> On Fri Mar 12 16:53:14 2010, sth@magnet.fsu.edu wrote:
> >>>>>> How about a ping once a month? :-)
> >>>>> > >>>>> Thanks, I'm working on using an XML module to get the data into
> >> the hashref.
> >>>>> > >>>>> The benefits are: > >>>>> - all 'types' have data under xml mode > >>>>> - standard parsing exists > >>>>> > >>>>> The drawbacks are: > >>>>> - the XML output doesn't contain human readable text like the
> >> "plain text, almost YAML" output
> >>>>> - the initial structure is much different from the "plain text,
> >> almost YAML" format structure
> >>>>> > >>>>> I'll have 0.04 out ASAP but it will take some time …
> >>>> > >>>>
> >>> > >>>
> >>
> > > > > >
>
From: guillaume.protet [...] ocsinventory-ng.org
Hi Daniel, This is first version (and surely extremely buggy !!) of the sysprofile xml refound. It is really a major refound because of this points: - I use Mac::PropertyList module to parse the xml because it is in PLIST format. - All the names of the keys changed because the xml output is really different. Fo example, it now "hardware_overview" instead of "Hardware Overview". So, any program written using Mac::Sysprofile 0.03 won't work in 0.0.4 . Let me know any comment on this patch or any correction on this. Kind regards, -- Guillaume Le Jeu 01 Sep 2011 07:33:06, mortheres a écrit : Show quoted text
> Hi Daniel, > > Ok thanks a lot. I will start working on it and I will send you a first > patch as soon as possible. > > Kind regards, > > -- > Guillaume > > > Le Mer 31 Aoû 2011 18:17:44, webmaster@simplemood.com a écrit :
> > Hello Guillaume, > > > > I've not had time yet, if you like I'd be happy to review a patch and > > publish it once we're all happy with it. > > > > Thanks! > > > > -- > > Dan > > > > On Aug 31, 2011, at 5:01 PM, Guillaume PROTET via RT wrote: > >
> > > Queue: Mac-SysProfile > > > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=52983 > > > > > > > Hi Daniel, > > > > > > I am the official maintainer of the OCS Inventory NG MacOSX agent
> > and we use Mac::Sysprofile
> > > to get hardware and software data for coputer inventories. Scott
> > helps us by suggesting
> > > ideas, debugging an testing many thing about MacOSX agent
> > integration.
> > > > > > We encounter the same memories detection problem under MacOSX 10.6
> > and 10.7, as
> > > reported in this bug report. As you said, the better solution to
> > solve the problem is to use the
> > > system_profiler xml output instead of stdout. > > > > > > You said you started to work on a new Mac::Sysprofile 0.4 version.
> > What about this 0.4
> > > version ? Did you continue to work on it ? Instead of re-create the
> > wheel, I ask you if I can
> > > help and if we can work together to continue this 0.4 version. It
> > should be glad if we can work
> > > to release a new version of Mac::Sysprofile ;) ;). > > > > > > Kind regards, > > > > > > -- > > > Guillaume > > > > > > > > > > > > > > > Le Sam 18 Juin 2011 10:51:05, sth@magnet.fsu.edu a écrit :
> > >> Daniel, > > >> > > >> Since this seems to be a bigger project than I thought, I have a > > >> suggestion. Could you replace the Mac::SysProfile archive at
> > CPAN
> > >> with a zip file that has no "dot" files for the resource forks. > > >> This would at least allow me to use CPAN to build the current > > >> version. Even if that is version 0.31 that would help and at > > >> least allow things to go forward easily in the script development > > >> for the inventory system. When 0.40 comes out then it should > > >> allow for all the nice updates to be consistent. > > >> > > >> I assume like all of us, there are lots of things on your schedule > > >> like a day job... So I hesitate to create another thing to do,
> > but
> > >> this would be helpful and relatively simple. (I think!). If the > > >> zip step includes a "--datafork" then that should do it. > > >> > > >> Cheers, > > >> > > >> -Scott > > >> > > >> > > >> > > >> On Apr 20, 2011, at 17:16, SimpleMood Webmaster via RT wrote: > > >>
> > >>> <URL: https://rt.cpan.org/Ticket/Display.html?id=52983 > > > >>> > > >>> Time flies :) Sorry, this fell through the cracks. It might be a
> > few
> > >> weeks until I have time but I'll try to do it soon, thanks!
> > >>> > > >>> On Apr 20, 2011, at 4:07 PM, Scott Hannahs via RT wrote: > > >>>
> > >>>> Queue: Mac-SysProfile > > >>>> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=52983 > > > >>>> > > >>>> Daniel, > > >>>> > > >>>> Any progress? It has been awhile and I just got bit trying to
> > >> update my perl module on a new system.
> > >>>> > > >>>> -Scott > > >>>> > > >>>> On Mar 12, 2010, at 23:35, Daniel Muey via RT wrote: > > >>>>
> > >>>>> <URL: https://rt.cpan.org/Ticket/Display.html?id=52983 > > > >>>>> > > >>>>> On Fri Mar 12 16:53:14 2010, sth@magnet.fsu.edu wrote:
> > >>>>>> How about a ping once a month? :-)
> > >>>>> > > >>>>> Thanks, I'm working on using an XML module to get the data into
> > >> the hashref.
> > >>>>> > > >>>>> The benefits are: > > >>>>> - all 'types' have data under xml mode > > >>>>> - standard parsing exists > > >>>>> > > >>>>> The drawbacks are: > > >>>>> - the XML output doesn't contain human readable text like the
> > >> "plain text, almost YAML" output
> > >>>>> - the initial structure is much different from the "plain text,
> > >> almost YAML" format structure
> > >>>>> > > >>>>> I'll have 0.04 out ASAP but it will take some time …
> > >>>> > > >>>>
> > >>> > > >>>
> > >>
> > > > > > > > >
> >
> >
Subject: Sysprofile-0.04.patch
--- SysProfile.pm.old 2011-11-01 20:41:55.000000000 +0100 +++ SysProfile.pm 2011-11-01 20:41:33.000000000 +0100 @@ -3,15 +3,17 @@ use strict; use warnings; -our $VERSION = '0.03'; +use Mac::PropertyList qw (:all); + +our $VERSION = '0.04'; my %conf = ( 'bin' => 'system_profiler', 'lst' => '-listDataTypes', 'sfw' => 'SPSoftwareDataType', - 'sfx' => 'System Software Overview', - 'osx' => 'System Version', - 'drw' => 'Kernel Version', + 'sfx' => 'os_overview', + 'osx' => 'os_version', + 'drw' => 'kernel_version', 'xml' => '-xml', ); @@ -37,26 +39,33 @@ delete $pro->{$typ}; return undef; } - my $raw = $fre || !$pro->{$typ} ? `$conf{bin} $typ` : $pro->{$typ}; - my $hdr = ''; - for(split /\n/, $raw) { - next if m/^\s*$/ || m/^\w/; - if(m/^\s{4}\w/) { - $hdr = $_; - $hdr =~ s/^\s+//; - $hdr =~ s/:.*$//; - $pro->{$typ}->{$hdr} = {}; - } elsif(m/^\s{6}\w/) { - s/^\s+//; - s/\s+$//; - my($k,$v) = split /:\s+/; - if($hdr) { - $pro->{$typ}->{$hdr}->{$k} = $v; + my $xml = $fre || !$pro->{$typ} ? `$conf{bin} -xml $typ` : $pro->{$typ}; + my $data = parse_plist($xml); + + my $items = $$data[0]->{_items}; + + #Workaround for memories + if ( $$items[0]->{_items} && $$items[0]->{_items}->type =~ /array/ ) { + $items = $$items[0]->{_items} + } + + my $hdr; + foreach (@$items) { + if ($_->{_name}->value) { + $hdr = $_->{_name}->value; + delete $_->{_name}; + } + + #We store data in hash + while( my ($key, $value) = each %{$_} ) { + if ($hdr) { + $pro->{$typ}->{$hdr}->{$key} = $value->value; } else { - $pro->{$typ}->{$k} = $v; + $pro->{$typ}->{$key} = $value->value; } } - } + } + return $pro->{$typ}; }
Subject: Re: [rt.cpan.org #52983] Bug in memory classification for Mac::SysProfile for OS X 10.6
Date: Tue, 1 Nov 2011 16:43:38 -0500
To: bug-Mac-SysProfile [...] rt.cpan.org
From: Dan Muey <webmaster [...] simplemood.com>
thanks, I'll look it over, hopefully by Friday On Nov 1, 2011, at 2:55 PM, Guillaume PROTET via RT wrote: Show quoted text
> Queue: Mac-SysProfile > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=52983 > > > Hi Daniel, > > This is first version (and surely extremely buggy !!) of the sysprofile xml refound. It is really a > major refound because of this points: > - I use Mac::PropertyList module to parse the xml because it is in PLIST format. > - All the names of the keys changed because the xml output is really different. Fo example, it > now "hardware_overview" instead of "Hardware Overview". So, any program written using > Mac::Sysprofile 0.03 won't work in 0.0.4 . > > Let me know any comment on this patch or any correction on this. > > Kind regards, > > -- > Guillaume > > Le Jeu 01 Sep 2011 07:33:06, mortheres a écrit :
>> Hi Daniel, >> >> Ok thanks a lot. I will start working on it and I will send you a first >> patch as soon as possible. >> >> Kind regards, >> >> -- >> Guillaume >> >> >> Le Mer 31 Aoû 2011 18:17:44, webmaster@simplemood.com a écrit :
>>> Hello Guillaume, >>> >>> I've not had time yet, if you like I'd be happy to review a patch and >>> publish it once we're all happy with it. >>> >>> Thanks! >>> >>> -- >>> Dan >>> >>> On Aug 31, 2011, at 5:01 PM, Guillaume PROTET via RT wrote: >>>
>>>> Queue: Mac-SysProfile >>>> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=52983 > >>>> >>>> Hi Daniel, >>>> >>>> I am the official maintainer of the OCS Inventory NG MacOSX agent
>>> and we use Mac::Sysprofile
>>>> to get hardware and software data for coputer inventories. Scott
>>> helps us by suggesting
>>>> ideas, debugging an testing many thing about MacOSX agent
>>> integration.
>>>> >>>> We encounter the same memories detection problem under MacOSX 10.6
>>> and 10.7, as
>>>> reported in this bug report. As you said, the better solution to
>>> solve the problem is to use the
>>>> system_profiler xml output instead of stdout. >>>> >>>> You said you started to work on a new Mac::Sysprofile 0.4 version.
>>> What about this 0.4
>>>> version ? Did you continue to work on it ? Instead of re-create the
>>> wheel, I ask you if I can
>>>> help and if we can work together to continue this 0.4 version. It
>>> should be glad if we can work
>>>> to release a new version of Mac::Sysprofile ;) ;). >>>> >>>> Kind regards, >>>> >>>> -- >>>> Guillaume >>>> >>>> >>>> >>>> >>>> Le Sam 18 Juin 2011 10:51:05, sth@magnet.fsu.edu a écrit :
>>>>> Daniel, >>>>> >>>>> Since this seems to be a bigger project than I thought, I have a >>>>> suggestion. Could you replace the Mac::SysProfile archive at
>>> CPAN
>>>>> with a zip file that has no "dot" files for the resource forks. >>>>> This would at least allow me to use CPAN to build the current >>>>> version. Even if that is version 0.31 that would help and at >>>>> least allow things to go forward easily in the script development >>>>> for the inventory system. When 0.40 comes out then it should >>>>> allow for all the nice updates to be consistent. >>>>> >>>>> I assume like all of us, there are lots of things on your schedule >>>>> like a day job... So I hesitate to create another thing to do,
>>> but
>>>>> this would be helpful and relatively simple. (I think!). If the >>>>> zip step includes a "--datafork" then that should do it. >>>>> >>>>> Cheers, >>>>> >>>>> -Scott >>>>> >>>>> >>>>> >>>>> On Apr 20, 2011, at 17:16, SimpleMood Webmaster via RT wrote: >>>>>
>>>>>> <URL: https://rt.cpan.org/Ticket/Display.html?id=52983 > >>>>>> >>>>>> Time flies :) Sorry, this fell through the cracks. It might be a
>>> few
>>>>> weeks until I have time but I'll try to do it soon, thanks!
>>>>>> >>>>>> On Apr 20, 2011, at 4:07 PM, Scott Hannahs via RT wrote: >>>>>>
>>>>>>> Queue: Mac-SysProfile >>>>>>> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=52983 > >>>>>>> >>>>>>> Daniel, >>>>>>> >>>>>>> Any progress? It has been awhile and I just got bit trying to
>>>>> update my perl module on a new system.
>>>>>>> >>>>>>> -Scott >>>>>>> >>>>>>> On Mar 12, 2010, at 23:35, Daniel Muey via RT wrote: >>>>>>>
>>>>>>>> <URL: https://rt.cpan.org/Ticket/Display.html?id=52983 > >>>>>>>> >>>>>>>> On Fri Mar 12 16:53:14 2010, sth@magnet.fsu.edu wrote:
>>>>>>>>> How about a ping once a month? :-)
>>>>>>>> >>>>>>>> Thanks, I'm working on using an XML module to get the data into
>>>>> the hashref.
>>>>>>>> >>>>>>>> The benefits are: >>>>>>>> - all 'types' have data under xml mode >>>>>>>> - standard parsing exists >>>>>>>> >>>>>>>> The drawbacks are: >>>>>>>> - the XML output doesn't contain human readable text like the
>>>>> "plain text, almost YAML" output
>>>>>>>> - the initial structure is much different from the "plain text,
>>>>> almost YAML" format structure
>>>>>>>> >>>>>>>> I'll have 0.04 out ASAP but it will take some time …
>>>>>>> >>>>>>>
>>>>>> >>>>>>
>>>>>
>>>> >>>> >>>>
>>>
>> >>
> > > > <Sysprofile-0.04.patch>
From: guillaume.protet [...] ocsinventory-ng.org
Hi Daniel, Did you had time to take a look to the patch ? I just want to know if your are agree with the new hash keys names because it has an impact for code and I just want to know if I can modify OCS agent code to be compatible with this patch. Bugs could be fixed later and I want to know if you are ok with this refund way. Thanks in advance. Kind regards, -- Guillaume Le Mar 01 Nov 2011 17:37:44, webmaster@simplemood.com a écrit : Show quoted text
> thanks, I'll look it over, hopefully by Friday > > On Nov 1, 2011, at 2:55 PM, Guillaume PROTET via RT wrote: >
> > Queue: Mac-SysProfile > > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=52983 > > > > > Hi Daniel, > > > > This is first version (and surely extremely buggy !!) of the
> sysprofile xml refound. It is really a
> > major refound because of this points: > > - I use Mac::PropertyList module to parse the xml because it is in
> PLIST format.
> > - All the names of the keys changed because the xml output is really
> different. Fo example, it
> > now "hardware_overview" instead of "Hardware Overview". So, any
> program written using
> > Mac::Sysprofile 0.03 won't work in 0.0.4 . > > > > Let me know any comment on this patch or any correction on this. > > > > Kind regards, > > > > -- > > Guillaume > > > > Le Jeu 01 Sep 2011 07:33:06, mortheres a écrit :
> >> Hi Daniel, > >> > >> Ok thanks a lot. I will start working on it and I will send you a
> first
> >> patch as soon as possible. > >> > >> Kind regards, > >> > >> -- > >> Guillaume > >> > >> > >> Le Mer 31 Aoû 2011 18:17:44, webmaster@simplemood.com a écrit :
> >>> Hello Guillaume, > >>> > >>> I've not had time yet, if you like I'd be happy to review a patch
> and
> >>> publish it once we're all happy with it. > >>> > >>> Thanks! > >>> > >>> -- > >>> Dan > >>>
On Sat Nov 19 11:25:06 2011, mortheres wrote: Show quoted text
> Hi Daniel, > > Did you had time to take a look to the patch ?
The idea of using Mac::PropertyList is great! The patch however didn't work. (erros about calling method on undef values) I modified it to work w/ some TODOs (https://rt.cpan.org/Ticket/Display.html?id=72570) in the code about what needs done to finalize the format. Thanks!