Log analysis
The log is the evidence, it contains the cause of the issue. "Looking for the problem through the log, predicting the issue and looking for the log" is the most common way to solve the issue.
Linux
You can get logs from these methods:
-
Logs directory: /data/logs/appname
-
System logs
# get service logs
systemctl status service_name
journalctl -u service_name
# get error logs
journalctl -p err
# get Linux core logs
journalctl -k
# get the bash bin logs
journalctl /usr/bin/bash
# get the logs of user by ID
journalctl UID=33 --since today -
Docker logs
docker logs appname
Windows
Get the logs from Event Viewer of Windows Server