查看磁盘使用情况
df -h
查看目录大小
du -sh *
查看某个进程
ps aux | grep php-fpm
监控某个日志文件
tail -f error.log
监控服务器
top
统计 access.log 文件访问次数最多的 ip 地址,并取前 10 条记录
cat access.log | awk '{print $1}' | sort | uniq -c | sort -k1nr | head -10
查看磁盘使用情况
df -h
查看目录大小
du -sh *
查看某个进程
ps aux | grep php-fpm
监控某个日志文件
tail -f error.log
监控服务器
top
统计 access.log 文件访问次数最多的 ip 地址,并取前 10 条记录
cat access.log | awk '{print $1}' | sort | uniq -c | sort -k1nr | head -10