问题
服务器的磁盘被占满,需要排查是什么文件占用的
解决
使用如下命令列出各个文件(夹)所占大小:
$ sudo -i
# df -h
# cd /
# du -shx *
du -h --max-depth=1 /data
# 磁盘空间占用与排序
du -h --max-depth=1 /data/logs/apps/|sort -hr
2026-04-24 13:59:37
服务器的磁盘被占满,需要排查是什么文件占用的
使用如下命令列出各个文件(夹)所占大小:
$ sudo -i
# df -h
# cd /
# du -shx *
du -h --max-depth=1 /data
# 磁盘空间占用与排序
du -h --max-depth=1 /data/logs/apps/|sort -hr
实时的显示各个进程的内存使用情况. Reported memory usage information includes %MEM (percent of physical memory used), VSZ (total amount of virtual memory used), and RSS (total amount of physical memory used). 你可以使用 “–sort”选项对进程进行排序,例如按RSS进行排序:
$ ps aux --sort -rss
一个快速查看内存使用情况的方法,它是对 /proc/meminfo 收集到的信息的一个概述
$ cat /proc/meminfo
$ free -h
©2026 老鼠扛刀满街找猫.
ICP证:浙ICP备17026237号-1
浙公网安备 33010402004062号
Powered by Jekyll,
theme by Scott Emmons
under Creative Commons Attribution