Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Another thing you can do: profile the process to find out what exactly it’s spending all that CPU time on. There are a few different ways to do this on macOS, including the GUI Instruments.app which comes with Xcode, and dtrace. But if you’re the sort who always has a terminal open, the quickest way is to just run

    sudo spindump
Also useful when a process is hung, even if it’s not taking up CPU time.

Sometimes the output isn’t useful due to a binary having been stripped of symbol names, but all macOS system libraries have symbols, so you can usually figure out something.



So users are expected to run debugger tools in order to figure out what some hidden program is doing?

Many years back I couldn't sleep and noticed my HDD's was working hard. I checked and it was google updater that was scanning everything...

I will never know why, they might be stealing IP (i was working on OCR at the time) or they just wanted to create a profile to serve better ads...


> So users are expected to run debugger tools in order to figure out what some hidden program is doing?

That's like saying "So we're expected to investigate and have a full trial before sending someone to jail?". If you just want to delete it, go ahead. If you want to go as far as creating a whole domain to blame Chrome, yes, you do need more than just "I deleted it and coincidentally my computer got fast".


> If you want to go as far as creating a whole domain to blame Chrome, yes, you do need more than just "I deleted it and coincidentally my computer got fast".

I think the fact that the site exists and is a pretty highly ranked story on HN probably proves that incorrect.


s/you do need more/you should need more/

Clearly if you read the thread, most people here aren't happy about this being at the top of HN, and it honestly reminds me of reddit where people just upvote things purely based on the headline, without even looking at the content. If anything this is just a sad day for HN.


> most people here aren't happy about this being at the top of HN

well the ones that comment, at least.

there might very well be a silent majority that is reading these threads with great joy.

like for instance the bit where someone lost it when they got reminded of the site guidelines and felt the need to list their "accomplishments" on HN

you don't get entertainment like that in normal threads.


You're welcome!

Of course your comment also violates the guidelines: "Please respond to the strongest plausible interpretation of what someone says, not a weaker one that's easier to criticize. Assume good faith." Reinforcing my claim that violation of the guidelines is the norm here rather than the exception.

My point was that authors of HN submissions are almost always treated with disrespect by HN commenters, and I was citing my repeated personal experience of having been such an author. (I believe the HN moderators are in denial and view the site through rose-colored/orange-colored glasses). I don't view having been #1 on HN to be an "accomplishment". I don't find it useful at all, because I run an independent business, yet being #1 on HN never increases my software sales at all, so it's pretty useless as far as I'm concerned. It just increases my server usage. I've sometimes considered (as I'm sure many people have) simply blocking Hacker News referers on my server. Could still happen...

In fact I finally created an account on HN simply to try to have some "control over the narrative" in HN comments about my own authored articles, because there are often some really dumb misunderstandings in the comments. Not sure it has been worth it though.

Technically, I "lost it" on HN about 3 weeks ago, when I got sick and tired of accurate information being downvoted. The only reason I'm still here now is that I have way too much free time on my hands due to the pandemic/social distancing.


How else do you expect to figure out what a program is doing? Should it make a pop up with a stack trace from time to time?


Maybe a notification of what it is doing. "We are using your computer for machine learning" or "Currently upgrading Chrome". Or some sort of documentation on what the program is supposed to do.


There is a GUI program as he said.

By definition, “hidden” programs are not gonna tell you what they are doing up front.


Yep lots of responsible software companies will tell you what software is doing if it goes outside the parameters of their software. Say if a program is scanning your computer for information when it's really only supposed to be a web browser.


Speaking of the GUI Instruments.app. Is there a way to start a process from there, instead of attaching to an already running process? I used it the other day and could only figure out how to attach to an already running process with it.


Create a new profiling environment based on the template you're interested in, making sure "Choose a profiling template for:" is set to "Your Computer > All Processes." Next, in the top-left of the window, where it says "Your Computer > All Processes", click on All Processes. Select Choose Target... and navigate to your binary and hit Choose. Then hit the red circle to begin recording. This will launch a new instance of the specified binary and profile it.

This may not work for binaries that set PT_DENY_ATTACH, though.


Thanks :)


Yes, it’s possible. In the menu with all the processes, pick the option “Choose Target”. It’s kind of an annoying UI, but it works.

Another option is to use `xcrun xctrace` to get a recording from the command line, which can then be opened in Instruments.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: