I develop ruby on rails apps. Today I noticed a bunch of unexpected ruby processes taking up a bunch of memory. So I decided to investigate. The results of the investigation are sort of inconclusive because of unexpected behavior of system tools. In this post, I'll describe the steps I took and ask several questions about that along the way.

I quit ruby mine and anything else that's ruby that I could think off. The process were still there enter image description here

Next I tried to find out the command line used to start them. So I opened Terminal and did this enter image description here

To my surprise, ps reported no process named ruby. So question number:

1) Why does Activity Monitor show processes named "ruby" but ps doesn't?

Next I wanted query ps by process id like this: enter image description here

To my surprise, instead of command used to start the process, there is some kind of description of what it is.

2) Why doesn't ps show the command line used to start processes like it usually does?
3) How can I get the command line used to start this process?

Ok. Looks like it's spring (I think it's like a container to run ruby on rails applications in dev) started in /ch dir. Let's stop it.

enter image description here

No such luck. 4) What's wrong here? Spring thinks it's not running. PS seems to imply that it is. Is spring buggy? Or am I misunderstanding output of ps?

I hope that by getting answers to these questions, I and other readers of this question will learn some things about investigating rouge process in general. That's why I didn't just pkill and move on with my day.

You must log in to answer this question.

Browse other questions tagged .