8 comments

  • comex80 days ago
    Neat, though I&#x27;m guessing it&#x27;s pretty slow.<p>Tip for anyone reading: If you only need to trace file accesses or command executions, `eslogger lookup` and `eslogger exec` respectively will give you what you need (albeit in the form of a not-particularly-friendly JSON blob).
  • sandbags80 days ago
    Modulo I haven’t tried it yet it’s been an irritant that SIP broke tracing so this is a welcome development, thank you.
  • BirAdam80 days ago
    This triggered a small emotional reaction. I really miss the days when Apple made real effort toward servers with MacOS X Server and Xserve. Hopefully, since they&#x27;re using their own hardware&#x2F;software internally for servers, Apple may one day go back down that road.
  • CGamesPlay80 days ago
    Love it. I&#x27;ve never successfully used dtruss without hardlocking my system, so it&#x27;s nice to see that this isn&#x27;t a wrapper around that.
    • saagarjha80 days ago
      The bug for this was fixed in Tahoe
      • viraptor80 days ago
        For the whole dtrace system?
        • saagarjha79 days ago
          Yes
          • StrangeDoctor79 days ago
            Fantastic news, thanks for sharing. I stopped looking into it after some spectacularly bad hard lockups, some in prod…
            • saagarjha79 days ago
              Considering you need to turn off SIP to use it, I would not recommend using DTrace in prod…
              • viraptor79 days ago
                You need to escalate to root to run it anyway. If anyone can get root on my laptop, there&#x27;s nothing that SIP can realistically protect me from. Actually, if anyone can get access to my user outside of sandbox, everything I care about is already exposed.<p>(Also, you can disable it only for dtrace if you want)
                • saagarjha79 days ago
                  Turning off SIP allows for trivial escalation to root usually
                  • viraptor79 days ago
                    That&#x27;s quite vague. Got any links with the details?
                    • saagarjha79 days ago
                      Here&#x27;s an example: <a href="https:&#x2F;&#x2F;gist.github.com&#x2F;ChiChou&#x2F;e3a50f00853b2fbfb1debad46e501121" rel="nofollow">https:&#x2F;&#x2F;gist.github.com&#x2F;ChiChou&#x2F;e3a50f00853b2fbfb1debad46e50...</a>
  • burnt-resistor80 days ago
    Doesn&#x27;t appear to work, and lacks pypi and brew packaging.<p><pre><code> $ pipx install git+https:&#x2F;&#x2F;github.com&#x2F;Mic92&#x2F;strace-macos installed package strace-macos 0.1.0, installed using Python 3.13.7 These apps are now globally available - strace done! $ strace df -h Error: Failed to load LLDB Python module. Make sure you&#x27;re running with system Python (&#x2F;usr&#x2F;bin&#x2F;python3) and have Xcode Command Line Tools installed. To install Xcode Command Line Tools: xcode-select --install $ sudo strace df -h [same shit] </code></pre> After fixing[0] the awkward python system requirement, it doesn&#x27;t work with built-in binaries without SIP disabled, it&#x27;s really slow, it colorizes output even when piping, and the colors are terrible. Better than nothing but it&#x27;s currently less effort to temporarily disable SIP for dtruss and reenable it later than install this in this early form. Maybe with time it will improve, but it seems like a vehicle to aggressively advertise consulting services.<p>0:<p><pre><code> env PIPX_DEFAULT_PYTHON=&#x27;&#x2F;usr&#x2F;bin&#x2F;python3&#x27; pipx install git+https:&#x2F;&#x2F;github.com&#x2F;Mic92&#x2F;strace-macos</code></pre>
    • soraminazuki79 days ago
      It’s working. You deliberately ignored the requirements clearly stated multiple times in the README, which explains that it must use the same version of Python as LLDB because it relies on LLDB&#x27;s Python bindings. The tool even explained again what you should do instead after you defied the installation instructions, yet you chose to run the same command again with sudo, turning this into a spectacle. This isn’t a software issue. It’s you messing around.<p>&gt; it seems like a vehicle to aggressively advertise consulting services.<p>It&#x27;s an open source tool that addresses a pain point many people have, made with someone&#x27;s spare time with no strings attached. What is wrong with you?<p>&gt; it doesn&#x27;t work with built-in binaries without SIP disabled<p>You can&#x27;t debug system binaries on macOS with SIP. That&#x27;s the whole point of SIP. Debugging user binaries is still very much allowed.<p><pre><code> sudo lldb &#x2F;bin&#x2F;ls Password: (lldb) target create &quot;&#x2F;bin&#x2F;ls&quot; Current executable set to &#x27;&#x2F;bin&#x2F;ls&#x27; (arm64e). (lldb) r error: process exited with status -1 (attach failed (Not allowed to attach to process. Look in the console messages (Console.app), near the debugserver entries, when the attach failed. The subsystem that denied the attach permission will likely have logged an informative message about why it was denied.)) </code></pre> &gt; lacks pypi and brew packaging<p>That&#x27;s an entitled complaint against a project made just 2 days ago [1], which offers a single line command for installation.<p>[1]: <a href="https:&#x2F;&#x2F;github.com&#x2F;Mic92&#x2F;strace-macos&#x2F;commit&#x2F;712aaf14d07f2efa48a65e44e03d735242e3b29c" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Mic92&#x2F;strace-macos&#x2F;commit&#x2F;712aaf14d07f2ef...</a>
  • cyberpunk80 days ago
    Silly question but doesn’t macos ship with dtrace? So why not use dtruss?
    • agsnu80 days ago
      Barely supported by Apple these days - in addition to needing to disable SIP which is a pain, it was broken causing system freezes for several major macOS releases.
    • owyn80 days ago
      dtruss requires disabling SIP. This seems like a better option for basic &quot;what just happened?&quot; debugging.
    • saagarjha80 days ago
      You need to disable SIP to use DTrace
      • Citizen839680 days ago
        Not entirely. You can selectively remove protections:<p>csrutil enable --without dtrace
    • pjmlp80 days ago
      Another silly question, did everyone forgot about instruments?
      • viraptor80 days ago
        Does instruments allow you to track file reads&#x2F;writes and other syscalls&#x2F;mach stuff? Their docs are quite bad at describing the capabilities, so I&#x27;m not really sure. From what I can see it&#x27;s a profiler rather than a tracing tool.
      • youngtaff80 days ago
        Isn&#x27;t Instruments built on dtrace?
  • gkfasdfasdf80 days ago
    TIL Nix flakes work on macos - is this a legit alternative to homebrew?
    • arianvanp80 days ago
      Yes. It&#x27;s great. Especially paired with nix-darwin which allows you to declaratively manage all your macos settings too
      • pasc187880 days ago
        Sort of.<p>For things that run on Linux and other Unices yes.<p>For macOS UI programs and those that need specific permissions and for commercial programs stick with Homebrew but you can define what you want in homebrew in nix.
        • rusty-jules79 days ago
          Using nix-darwin to manage brew declaratively feels like using a jackhammer to nail a picture to the wall, but I can’t live without it anymore.
  • Andrew-Tate79 days ago
    [flagged]
    • aspect054579 days ago
      What’s up with that user name
      • zahlman79 days ago
        <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;threads?id=Andrew-Tate">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;threads?id=Andrew-Tate</a><p>Turn on showdead; it&#x27;s pretty clearly some sort of AI bot.