Solved

Linux TOP Command processes - Normal or not?

Posted on 2015-02-17
4
211 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 34

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 34

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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

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 …
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

708 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now