Extension Attribute (is or isn't 64 bit)

donmontalvo
Esteemed Contributor III

Has anyone created an Extension Attribute to flag computers that are or aren't booted into 64 bit?

PS, does it look like we need a "Casper Extension Attributes" mailing list? :)

Thanks,
Don

--
https://donmontalvo.com
5 REPLIES 5

jarednichols
Honored Contributor

Not that I'm aware of but it's easy to grab with a "uname -a"

$ uname -a
Darwin iMac.local 10.0.0 Darwin Kernel Version 10.0.0: Fri Jul 31 22:47:34
PDT 2009; root:xnu-1456.1.25~1/RELEASE_X86_64 x86_64

That "x86_64" bit at the end is the relevant info. If it's 32-bit it'll be
i386.
-- Jared F. Nichols
Desktop Engineer, Client Services
Information Services Department
MIT Lincoln Laboratory
244 Wood Street
Lexington, Massachusetts 02420
781.981.5436

donmontalvo
Esteemed Contributor III

Nice,

Thanks, I know this works too:

$ system_profiler | grep "64-bit Kernel and Extensions" 64-bit Kernel and Extensions: No

I was hoping a scripting guru could step in to whip up an Extension Attribute. It would fit nicely into the Resource Kit.

Hmmm...it would be nice to have an App Store utility from JAMF that lets you enter what you're looking for (64 bit = Yes or No) and produce an Extension Attribute. I'd happily pay $5 for it. :) Did you guys know Pixelmator made $1M one week after selling it through App Store...

(ok everyone get out of Tom's way...<g>)

Don

--
https://donmontalvo.com

donmontalvo
Esteemed Contributor III

(resending...sorry for the missing line wrap. Don)

Nice,

Thanks, I know this works too:

$ system_profiler | grep "64-bit Kernel and Extensions" 64-bit Kernel and Extensions: No

I was hoping a scripting guru could step in to whip up an Extension Attribute. It would fit nicely into the Resource Kit.

Hmmm...it would be nice to have an App Store utility from JAMF that lets you enter what you're looking for (64 bit = Yes or No) and produce an Extension Attribute. I'd happily pay $5 for it. :) Did you guys know Pixelmator made $1M one week after selling it through App Store...

(ok everyone get out of Tom's way...<g>)

Don

--
https://donmontalvo.com

sean
Valued Contributor

Shows both the current setting and also what the machine is capable of. It's always worth limiting system_profiler to just the section that you want, to reduce overhead, or not to run if not necessary.

#!/bin/sh

intel="i386"
ppc="powerpc"
leopard="10.5"
snowleopard="10.6"

myOS=sw_vers -productVersion | cut -c 1-4
thisMach=uname -p

if [ "$thisMach" = "i386" ] && [ "$myOS" = "$snowleopard" ]
then

result1=ioreg -l -p IODeviceTree | grep firmware-abi | grep -o '".*>'
result2=system_profiler SPSoftwareDataType | grep 64-bit | sed 's/ {6}//'

result=echo "$result1 $result2"

elif [ "$thisMach" = "i386" ] && [ "$myOS" = "$leopard" ]
then

result=ioreg -l -p IODeviceTree | grep firmware-abi | grep -o '".*>'

elif [ "$thisMach" = "$ppc" ]
then

result=ioreg -l -p IODeviceTree | grep -i firmware | cut -d "<" -f 2 | sed 's/>//'

fi

echo "<result>$result</result>"

Hope this helps

Sean

donmontalvo
Esteemed Contributor III

FYI, wanted to kick start this thread again. Not sure what the best way is to have this EA only return a value if the hardware actually supports 64 bit. Or if that should be anything to worry about. :)

Using this...

#!/bin/sh

echo "<result>$( ioreg -l -p IODeviceTree | awk '/firmware-abi/ { split($0, line, """); printf("%s
", line[4]); }' )</result>"
--
https://donmontalvo.com