I have a Ubuntu web server for Rails 3.0 application. when I login to my webserver and do


I get set of processes with their stats. Out of that nano process is occupying 100% of the CPU. And that nano process is a root process. I dont know what is going wrong. Because of this, my apache processes, ruby processes all are getting their chance to answer to answer any web requests.

I am the only one who is logged in via ssh. I have disabled webserver logins via password. Please help.

  • Use vi instead? ;) – EEAA Dec 18 '10 at 15:54

I've had this happen with other text editting programs if I'm ssh'd into the box and lose connection. When I go back in, the process I was using before disconnect was taking 100% cpu.

I'd kill it.

  • prolly going crazy when loosing the terminal since it's parent died. had the same issue with vi but didn't thought of tracing it to see where the cpu goes. – user237419 Dec 18 '10 at 16:34

If you have sudo permissions, you can kill that process. Note you may lose something important that is being edited in nano, so be careful, especially to get the right pid.

First find the pid:

ps -ef|grep nano

This will list all nano processes, something like this:

root 1234 0 0 08:13 ? 00:00:01 nano

find the pid in the second column (1234 in the above example). Then you can do:

sudo kill <pid>

If that doesn't work:

sudo kill -9 <pid>

Replace the <pid> with the actual pid.

If you don't have sudo permissions, then you can try using su and log in as root in a similar way, though in that case you need the root password (sudo asks you for your password, i.e. the password of the currently logged in user). If you don't have any way to log in as root, then you cannot do anything about that process - you need to contact somebody who has such permissions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.