Solved

Linux TOP Command processes - Normal or not?

Posted on 2015-02-17
4
233 Views
Last Modified: 2015-02-17
Hi all - I am trying to troubleshoot a problem with 1 web server (Linux/Apache/MySql/PHP). Having isolated the issue,
I setup a test server to duplicate the problem, and added just the 1 user that runs php scripts and a MySQL DB. (that user does *not* have access to this test server). I ran some of his scripts, then stopped them, then Rebooted this test server.

Attached is a screen-shot of a Linux "top" command that I did *after* rebooting the Server.
I am not sure how to troubleshoot from here. What I am questioning on the "top" command is:
- mysql/mysqld is running ... and says "194% of CPU Utilization
- Multiple occurances of that user named "romancer" that keep appearing & disappearing. "romancer" is a legitimate customer, but after a Reboot, per the attached "top" command, seems to still be using server resources.
(FYI, that "dd-agent" is from DataDog server monitor that I added after the problem occurred to help me troubleshoot)

Any suggestions anyone? Thanks all in advance !!
- B
0
Comment
Question by:bleggee
  • 2
4 Comments
 
LVL 28

Expert Comment

by:Jan Springer
ID: 40614404
I don't see the attachments but that certainly doesn't sound normal.
0
 
LVL 35

Expert Comment

by:gr8gonzo
ID: 40614494
1. Does romancer have any cron jobs set up that might start a process automatically, even after a reboot?

2. Sounds like a script or a query that isn't optimized. You could enable slow query logs and see whether he's running a bad or unindexed heavy query.

3. Spikes of 194% CPU usage aren't unusual. Hyperthreading and multiple virtual cores can easily lead to CPU usage over 100%, but if it's occurring all the time to the point of impacting other customers or other server applications, then it may be a problem.
0
 
LVL 1

Author Comment

by:bleggee
ID: 40614808
Here's that Screen Shot attachement ...
top-for-ee.jpg
0
 
LVL 35

Accepted Solution

by:
gr8gonzo earned 500 total points
ID: 40614831
So it definitely looks like a correlation between a script running and the database usage. I'd definitely enable the slow query log, check the web server access log, and try to trace back the queries to a particular script to see what's going on.
0

Featured Post

Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question