I have a Ubuntu 12.04.4 64bit installation (running as an OpenVZ container) that was running fairly well until I changed the hostname.

The change was made just by modifying /etc/hostname and /etc/hosts, and restarting the network. After that, load avg increased a lot (normally was 0.3 and now stays constantly at 2.5)

If I use some tool like htop or top the only process that I can see with some cpu usage is init (always between 10 and 15 percent).

I tried to strace init to try to get some clue, but I always get the same error:

Could not attach to process.  If your uid matches the uid of the target
process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try
again as the root user.  For more details, see /etc/sysctl.d/10-ptrace.conf

and I cant change that key also.

I cant find anything in syslog so I am completely clueless here. Has anyone faced a similar situation or has any tips on how to debug this problem? If really needed, a restart can be performed but I would prefer to not do that.

  • What process do you try to trace? This sometimes happens when in-kernel drivers go nuts, you don't see 'em in top. Also, system load is different from CPU load, perhaps there's a lot of I/O... Try iotop -o and see if something shows up. – Jan Oct 3 '14 at 22:04
  • Sorry for just answering now. I tried to trace init because it was the only one showing some abnormal activity. I think this may be something related to OpenVZ/upstart. I was forced to reboot the system in the meantime and everything got normal again. Either way if you have any tips on how to debug a problem like this please post them as an answer. – Salem Oct 7 '14 at 9:23

It would at first guess be something that when installed copied the hostname into it's configuration file and is now having problems with the machine renamed.

I would grep -iR oldhostname /etc and see if that gives a clue.

Also, just to check you did actually reboot after changing the hostname? If not then you should if possible do so because running processes initialised with the old hostname. If a reboot isn't feasible you could try reloading affected processes if you can identify them but I've not personally tried that approach.

Finally, atop is a very useful tool for problem identification as it gives a comprehensive overview of the system, cpu, memory, network, drives etc. It often helps to narrow down the affected area and then you use a more specific tool if needed to zoom in on the problem.

| improve this answer | |

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.