LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Enterprise (http://www.linuxquestions.org/questions/linux-enterprise-47/)
-   -   Remote CentOS server is slow (http://www.linuxquestions.org/questions/linux-enterprise-47/remote-centos-server-is-slow-939681/)

chekhov_neo 04-13-2012 02:03 PM

Remote CentOS server is slow
 
Hello,

I'm accessing a remote CentOS server through SSH. Any command I issue to the server executes with a delay. Sometimes they take too long.

Using ping I found the RTT to be just 0.5 ms. I'm facing this problem ever since I solved the issue mentioned in this thread.

I found a few threads which were dealing with similar issue but they didn't help me much.

Any help would be appreciated. Thank you.

unSpawn 04-14-2012 03:33 AM

Quote:

Originally Posted by chekhov_neo (Post 4652034)
Using ping I found the RTT to be just 0.5 ms.

Pinging a machine is nice to see if it is Live (if it accepts ping) but you don't use ICMP for actual traffic. You use TCP mostly so I suggest you use 'tcptraceroute' or 'lft' instead to test port accessibility and "Internet weather" conditions.


Quote:

Originally Posted by chekhov_neo (Post 4652034)
Any command I issue to the server executes with a delay. Sometimes they take too long.

- What is long? Run
Code:

time \ps
on that machine and compare with another one.
- Is the load on the machine significant or not?
- Is there any difference between commands issued as unprivileged user or root?
- Did you ever fully revert your changes?
0. /var/log/yum.log lists packages removed at that time so if you removed them on say Feb 26th 01:01:02 then you could check with
Code:

awk '/Feb.*26.*01:01:02.*Erased: / {print $NF}' /var/log/yum.log|while read PKG; do rpm -q "${PKG}"; done
if packages are installed.
1. verify your RPMDB with
Code:

rpm -Vva 2>&1 | grep -v '^\.\{8\}'
and check output (see "verify options" in 'man rpm' for output format listing).
2. Wrt your other thread copying files over from another machine may make it work again but it doesn't address proper package installation (like running pre- and post-installation scripts) or RPMDB integrity. Re-installing damaged packages properly would.
- Does any system log file that (r)syslog(-ng) logs to show any errors?
- Do you have a backup from before your changes that you can compare details with?

chekhov_neo 04-16-2012 05:25 PM

Hi unSpawn,

Thank you for your response! I got the problem solved!

Quote:

Originally Posted by unSpawn (Post 4652384)
Pinging a machine is nice to see if it is Live (if it accepts ping) but you don't use ICMP for actual traffic. You use TCP mostly so I suggest you use 'tcptraceroute' or 'lft' instead to test port accessibility and "Internet weather" conditions.



- What is long? Run
Code:

time \ps
on that machine and compare with another one.

As suggested by you, I tried the tcptraceroute and time \ps commands. The former gave a latency of 27 ms approximately while the latter gave the following:

Code:

$time \ps
  PID TTY          TIME CMD
15813 pts/6    00:00:00 bash
15857 pts/6    00:00:00 ps

real    0m0.012s
user    0m0.004s
sys    0m0.008s

These delays were too less to cause the kind of delay I was experiencing.

Quote:

Originally Posted by unSpawn (Post 4652384)
- Did you ever fully revert your changes?
0. /var/log/yum.log lists packages removed at that time so if you removed them on say Feb 26th 01:01:02 then you could check with
Code:

awk '/Feb.*26.*01:01:02.*Erased: / {print $NF}' /var/log/yum.log|while read PKG; do rpm -q "${PKG}"; done
if packages are installed.

Then I checked the yum logs and I found that I haven't re-installed all the packages. So I started installing the missing packages one by one. After installing one system-config-date package, the serve started working fine without any delays! I'm wondering how not having this package was causing delays.

Once again thank you very much for your suggestions. I love this forum. You guys rock! :)


All times are GMT -5. The time now is 02:07 AM.