Troubleshooting Tips: Linux & Windows Server
By Azizol Hafizi ยท May 2025 ยท 5 min read
Setelah 15+ tahun bekerja dalam bidang system engineering, aku dah hadapi pelbagai isu server โ dari yang simple sampai yang boleh buat rambut beruban. Dalam post ni, aku kongsikan tips troubleshooting yang selalu aku guna untuk Linux dan Windows Server.
๐ง Linux Troubleshooting
1. Check disk usage bila server slow
Selalu check disk penuh ke tak โ ni antara punca paling common server jadi slow atau service crash.
# Check overall disk usage
df -h
# Check folder mana yang besar
du -sh /* 2>/dev/null | sort -rh | head -10
2. Check service yang crash
Bila service tiba-tiba mati, terus check status dan log dia.
# Check status service
systemctl status nginx
# Tengok log terkini
journalctl -u nginx -n 50 --no-pager
3. CPU & Memory tinggi
Nak tahu process mana yang makan resource paling banyak.
# Real-time process monitor
top
# Lebih detail dengan htop
htop
# Sort by memory usage
ps aux --sort=-%mem | head -10
4. Network connection issue
Check port yang open dan connection yang active.
# Check port yang listening
ss -tulnp
# Test connectivity
ping -c 4 google.com
# Trace route
traceroute google.com
๐ช Windows Server Troubleshooting
1. Check Event Log untuk error
Event Viewer adalah kawan baik kau bila ada masalah kat Windows Server.
# Bukak Event Viewer via PowerShell
eventvwr.msc
# Get last 20 system errors via PowerShell
Get-EventLog -LogName System -EntryType Error -Newest 20
2. Check disk space
Sama macam Linux, disk penuh boleh sebabkan pelbagai masalah.
# Check semua drive
Get-PSDrive -PSProvider FileSystem
# Free up space โ clear temp files
cleanmgr /sagerun:1
3. Service tidak start
Check dan restart service yang bermasalah via PowerShell.
# Check status service
Get-Service -Name "wuauserv"
# Restart service
Restart-Service -Name "wuauserv"
4. Network troubleshooting
Tips basic untuk diagnose network issue kat Windows Server.
# Check IP config
ipconfig /all
# Flush DNS cache
ipconfig /flushdns
# Check open ports
netstat -ano | findstr LISTENING
๐ก Pro tip: Selalu document setiap isu dan cara kau solve โ lama-lama kau akan ada runbook sendiri yang sangat berguna bila isu sama berulang. Troubleshooting bukan saja pasal fix masalah, tapi pasal faham kenapa ia berlaku.