16. Diagnose Nginx CPU Bottleneck
Beginner Mode
Start your terminal to use beginner mode.
Scenario
The web server has become sluggish and users are experiencing timeout errors. Multiple worker processes are running under the nginx user, and one of them is consuming excessive CPU resources, causing the entire application to slow down.
Task
Identify the process running under the nginx user that consumes the most CPU or memory, and write its PID to /home/devops/solution.txt.
Example
# Before (multiple nginx processes, one consuming excessive resources)
USER PID %CPU %MEM COMMAND
nginx 12345 92.3 4.1 nginx: worker process
nginx 12346 15.4 2.8 nginx: worker process
nginx 12347 1.2 1.0 nginx: worker process
python3 22310 45.7 6.2 python3 app.py
java 19872 37.9 12.4 java -jar app.jar
# After (PID of highest-consuming nginx process identified)
12345
Terminal requires a larger screen
Open this page on a desktop or tablet (≥ 768px) to launch the terminal and practice hands-on.
Linux Terminal Environment
Write and execute your solution in the terminal below.
Essential
Linux 0/29
AWS 0/10
Kubernetes 0/15
CI/CD 0/5
Networking 0/9
Need more practice in this area? Explore more questions →
Palantir
Accenture
Coinbase
Adobe
EPAM
Twitch
Amazon
Kayak
Autodesk
Lyft
Revolut
RedHat
Bloomberg
Datadog
TCS
HashiCorp
Google
DeutscheBank
GitHub
Apple
Cloudflare
Stripe
Microsoft
NVIDIA
GoDaddy
X
SAP
Spotify
Airbnb
Meta
Reddit
Yelp
Okta
Dropbox
Slack
ActivisionBlizzard
Zscaler
Uber
IBM
DeliveryHero
Robinhood
GitLab
Shopify
Samsung
Elastic
Twilio
Netflix
CrowdStrike
Ubisoft
Anthropic
Capital One
Splunk
Intel
AMD
Databricks