0

I am looking to find out what system calls (at least a one or two, not all of them obviously) are being used when using the following command in Mac OSX 10.11.3

system_profiler SPHardwareDataType

I'm just not sure how to find out about the system calls in relation to the command.

Thanks, Jo

Jo-Anne
  • 131
  • 3
  • 16

1 Answers1

1

Based on the reference I gave in my earlier comment:

sudo dtruss system_profiler

dtruss runs your command and traces the system calls.

sudo runs the dtruss command with root priviledge (you need to be member of the sudoer group; may require you to enter your password).

You may pipe the output through grep to filter the output:

sudo dtruss system_profiler | grep <phrase you are looking for>

You can find detailed info on all these commands using:

man <cmd>

You can search the man pages for keywords:

man -k <keyword>
Community
  • 1
  • 1
Gregor Ophey
  • 817
  • 6
  • 12
  • Thanks for the answer, I appreciate it. When I try the sudo dtruss system_profiler and enter my password I get the following: dtrace: failed to execute system_profiler: dtrace cannot control executables signed with restricted entitlements...any ideas on that one? Thanks a ton. – Jo-Anne Mar 18 '16 at 21:59
  • @Jo-Anne B: I'm not a Mac User, but http://internals.exposed/blog/dtrace-vs-sip.html shows a way to disable System Integrity Protection, which is the OS feature, that causes dtruss to fail ... – Gregor Ophey Mar 20 '16 at 22:24