BIOSのシリアルナンバー等の、Mac OS Xが搭載されているハードウェア情報を取得する際は「system_profiler」コマンドが利用出来る。 これはLinuxでいうと「dmidecode」コマンドに相当するコマンドだ。

実行すると、以下のような内容が表示される。 表示される内容はdmidecodeよりも多く、ネットワーク設定(IPアドレスなども)についても表示される。

以下、ヘルプの情報を記載

Mac-mini-2009-SERVER:~ user$ system_profiler --helo
Usage: system_profiler [-listDataTypes]
       system_profiler [-xml] [-detailLevel n]
       system_profiler [-xml] [dataType1 ... dataTypeN]

  -detailLevel n    specifies the level of detail for the report
                      mini = short report (contains no identifying or personal information)
                      basic = basic hardware and network information
                      full = all available information

  -listDataTypes    lists all the available datatypes

  -xml              generates xml output instead of plain text
                    if redirected to a file with the extension ".spx"
                    the file can be opened in System Profiler.app

Examples:

  system_profiler
     Generates a text report with the standard detail level.

  system_profiler -detailLevel mini
     Generates a short report without identifying/personal information.

  system_profiler -listDataTypes
     Shows a list of the available data types.

  system_profiler SPSoftwareDataType SPNetworkDataType
     Generates a text report containing only software and network data.

  system_profiler -xml >MySystem.spx
     Creates a XML file which can be opened by System Profiler.app

Mac-mini-2009-SERVER:~ user$ system_profiler --help
Usage: system_profiler [-listDataTypes]
       system_profiler [-xml] [-detailLevel n]
       system_profiler [-xml] [dataType1 ... dataTypeN]

  -detailLevel n    specifies the level of detail for the report
                      mini = short report (contains no identifying or personal information)
                      basic = basic hardware and network information
                      full = all available information

  -listDataTypes    lists all the available datatypes

  -xml              generates xml output instead of plain text
                    if redirected to a file with the extension ".spx"
                    the file can be opened in System Profiler.app

Examples:

  system_profiler
     Generates a text report with the standard detail level.

  system_profiler -detailLevel mini
     Generates a short report without identifying/personal information.

  system_profiler -listDataTypes
     Shows a list of the available data types.

  system_profiler SPSoftwareDataType SPNetworkDataType
     Generates a text report containing only software and network data.

  system_profiler -xml >MySystem.spx
     Creates a XML file which can be opened by System Profiler.app

実際に実行した際の表示が以下。

Mac-mini-2009-SERVER:~ user$ system_profiler
Audio:

    Intel High Definition Audio:

      Audio ID: 65

        Headphone:

          Connection: Combination Output

        Line Input:

          Connection: Combination Input

        Speaker:

          Connection: Internal

        S/PDIF Optical Digital Audio Output:

~~~~~~~~~~~~中略~~~~~~~~~~~~~~~~~
      Software Versions:
          CoreWLAN: 3.4 (340.18)
          CoreWLANKit: 2.0.2 (202.11)
          Menu Extra: 8.1 (810.11)
          configd plug-in: 8.5 (850.252)
          System Information: 8.3 (830.5)
          IO80211 Family: 5.3 (530.5)
          Diagnostics: 2.1 (210.25)
          AirPort Utility: 6.3.1 (631.4)
      Interfaces:
        en1:
          Card Type: AirPort Extreme  (0x14E4, 0x90)
          Firmware Version: Broadcom BCM43xx 1.0 (5.10.131.36.16)
          MAC Address: 90:84:0d:f5:3b:82
          Locale: Japan
          Country Code: JP
          Supported PHY Modes: 802.11 a/b/g/n
          Supported Channels: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140
          Wake On Wireless: Supported
          Status: Off

シリアルナンバー等を取得する場合は、grepで指定して取得すればいい。

Mac-mini-2009-SERVER:~ user$ system_profiler | grep "Serial Number (system):"
Serial Number (system): YM01008VB9X