3 ms·
How exactly do you do this? When I try sudo <binary path> it immediately sigkills with a "launch constraint violation". And I tried on 10.8 from back before SIP
by krackers 3y ago
How exactly do you do this? When I try sudo <binary path> it immediately sigkills with a "launch constraint violation". And I tried on 10.8 from back before SIP was a thing, and didn't see any difference in terms of the per-process metrics I could sort by.
- inferiorhuman 3y agoLaunch an app bundle with open(1).
- chatmasta 3y agoThis works for me (macOS 13.5): sudo '/System/Applications/Utilities/Activity Monitor.app/Contents/MacOS/Activity Monitor' But it's certainly possible that I'm forgetting about some protection I had to disable to make it work. According to my notes, the reason I saved this command is because it let me see the list of open files and ports. But I'm actually not seeing those when running it now...
- krackers 3y agoYou can get open files and ports even without sudo for non-root processes by just hitting cmd+i. Maybe running with sudo might allow you to sample or get files for processes owned by root (presumably the info is same as what you'd get with lsof though). (And by ports it seems to mean network ports. If you want mach ports, you can use lsmp).
- inferiorhuman 3y agoThat doesn't work on MacOS 14. It fails with a code signing violation. You need to use open(1) for app bundles.