system_profiler - macOS


Synopsis

system_profiler [-STdetailLevel] [-xml] [-json] [-noSummary] [-diagnostics] [-noComments] [-systemReport] [-processInfo] [-systemOverview] [-miniReport] [-plugins path] [-metadata path] [-includeUnrecognized] [-logFilePath file.txt] [-verbose] [-help]

Overview

system_profiler is a macOS command-line tool that provides detailed information about your system’s hardware, software, and network configuration. It’s a valuable tool for troubleshooting, support, and understanding the inner workings of your Mac.

Syntax

Required arguments: None

Optional arguments:

  • -STdetailLevel: (0-7) Set the level of detail in the output. Higher numbers provide more detailed information. Default: 3
  • -xml: Output the results in XML format.
  • -json: Output the results in JSON format.
  • -noSummary: Exclude the summary section from the output.
  • -diagnostics: Include diagnostic information in the output.
  • -noComments: Exclude comments from the output.
  • -systemReport: Generate a full system report.
  • -processInfo: Include process information in the output.
  • -systemOverview: Generate a brief system overview.
  • -miniReport: Generate a minimal report.
  • -plugins path: Specify a custom path to plugins.
  • -metadata path: Specify a custom path to metadata.
  • -includeUnrecognized: Include unrecognized data in the output.
  • -logFilePath file.txt: Specify a file path for logging.
  • -verbose: Enable verbose output.
  • -help: Display help information.

Options/Flags

-STdetailLevel: Controls the level of detail provided in the output. Higher values provide more information. Common values are:

  • 0: Minimal details
  • 3: Default level
  • 7: Most detailed information

-xml: Outputs results in XML format, which is suitable for parsing and machine processing.

-json: Outputs results in JSON format, another machine-readable format.

-noSummary: Excludes the summary section from the output. This can be useful when focusing on specific aspects of the system.

-diagnostics: Includes diagnostic information in the output, which can be helpful for troubleshooting.

-noComments: Excludes comments from the output, providing a more concise and data-centric report.

-systemReport: Generates a comprehensive system report that includes all available information.

-systemOverview: Generates a brief overview of the system, including basic hardware and software details.

-miniReport: Generates a basic report with a minimal amount of information.

Examples

Get a detailed system report:

system_profiler -STdetailLevel 7

Output the report in XML format:

system_profiler -xml > system_report.xml

Generate a minimal report:

system_profiler -miniReport

Common Issues

  • Permission denied: Ensure you have sufficient permissions to run the command. Try using sudo.
  • Unrecognized data: If you see unrecognized data in the output, it may be due to unrecognized hardware or software. Consider using -includeUnrecognized to include it in the report.

Integration

system_profiler can be integrated with other macOS commands and tools. For example:

  • Combine with grep to filter the output: system_profiler -xml | grep "Memory"
  • Use with open to view the output in a graphical interface: system_profiler -systemReport | open -f
  • ioreg: Provides information about hardware devices and their configuration.
  • kextstat: Lists loaded kernel extensions.
  • lshw: Provides information about system hardware, similar to system_profiler.