Skip to content

Conversation

@praveenintune81-design
Copy link

@praveenintune81-design praveenintune81-design commented Jan 30, 2026

Hi
#####################################################################
Scenario 1: Service Not Starting

Que:- A web application service called 'myapp' failed to start after a server reboot.
What commands would you run to diagnose the issue?
Write at least 4 commands in order.

Ans:-
1:- # systemctl status myapp # (shows myapp service running/stop/failed)
2:- Check recent logs.

journalctl -u myapp -n 50 # (shows error what the issue is, like config issue, port issue, permission issue)

3:-
systemctl is-enabled myapp # (this CMD enables server permanently; when the server is restart or boot the server server is running.)
4:-
systemctl daemon-reload
systemctl restart myapp # when apply any change, you need to restart service to apply changes

Scenario 2: High CPU Usage

Que:- Your manager reports that the application server is slow.
You SSH into the server. What commands would you run to identify
which process is using high CPU?

ans:-
1:-
run the # top (showing CPU/ram usage)
2:-

ps aux --sort=-%cpu | head -10 (show which process use heavy CPU)


Scenario 3: Finding Service Logs
Que:-A developer asks: "Where are the logs for the 'docker' service?"
The service is managed by systemd.
What commands would you use?
ans:-

systemctl status docker (frist check docker running or stop)

journalctl -u docker -n 50 (show last 50 error/issue log)

journalctl -u docker -f


Scenario 4: File Permissions Issue
Que:- A script at /home/user/backup.sh is not executing.
When you run it: ./backup.sh
You get: "Permission denied"

What commands would you use to fix this?

Ans:-

ls -l /home/user/backup.sh (show current permission if executable permission )

chmod +x /home/user/backup.sh (given executable permission)

./backuo.sh (run & check it)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant