Alex (DV411)

Q: best way to poll 40 xserves for model numbers

There is a server farm of about 40 xserves from 2006 through 2009 (model numbers 1,1, 2,1, 3,1). Outside of going to each one and running a system report, is there a way to poll them for that model number (1,1, etc.) so that I could have a report matching machine name to a model number? What's the best way to do it?

 

Thanks!

Posted on Feb 6, 2014 11:14 PM

Close

Q: best way to poll 40 xserves for model numbers

  • All replies
  • Helpful answers

  • by Strontium90,Solvedanswer

    Strontium90 Strontium90 Feb 7, 2014 5:29 PM in response to Alex (DV411)
    Level 5 (4,087 points)
    Servers Enterprise
    Feb 7, 2014 5:29 PM in response to Alex (DV411)

    If you have Apple Remote Desktop, this is cake...

     

    Select all your servers and run a Send Unix task.  Enter this command:

     

    sysctl -n hw.model

     

    Simple and effective.  Or, if you want a more comprehensive report, use the reporting function of ARD and ask for Serial Number and Machine Model (plus just about any other piece of data you need).

     

    Nice server farm by the way.  Ah, Xserves.  My heart swells with longing.

     

    R-

    Apple Consultants Network

    Apple Professional Services

    Author "Mavericks Server – Foundation Services"  :: Exclusively available in Apple's iBooks Store

  • by Antonio Rocco,Helpful

    Antonio Rocco Antonio Rocco Feb 8, 2014 3:30 AM in response to Alex (DV411)
    Level 6 (10,616 points)
    Desktops
    Feb 8, 2014 3:30 AM in response to Alex (DV411)

    Strontium90's right ARD is definitely tool to use.

     

    I did this not long ago on a more modest 'farm' where the needs, different to yours, you may find useful?

     

    system_profiler SPHardwareDataType | grep Model\ Identifier | awk '{ print $3; }'

    system_profiler SPHardwareDataType | grep Serial\ Number | awk '{ print $4; }'

    system_profiler SPNetworkDataType | grep IPv4\ Addresses | awk '{ print $3; }'

     

    This 'tied-in' the model and serial number to a particular server's IP address (fixed and therefore known). The resulting data was entered into the customer's audit database afterwards. Took about 15 minutes. The longest (and hardest) part was instructing the customer on how to get that data into their excel spreadsheet.

  • by Alex (DV411),

    Alex (DV411) Alex (DV411) Feb 18, 2014 11:38 PM in response to Strontium90
    Level 1 (5 points)
    Feb 18, 2014 11:38 PM in response to Strontium90

    My boss did exactly that command after I posted the question. Gotta say, I was shocked with the simplicity of sending a single shell command to multiple servers and then reading the results. Don't think anything like that is possible in Windows GUI. ARD rocks.

     

    Thank you.