A command to check when you don't know enough to say that the server isn't doing anything.
Commands such as file creation fail when disk usage is Max or close.
You can check the disk usage with df -h
.
$ df -h
Filesystem Size Used Avail Capacity iused ifree %iused Mounted on
/dev/disk1s6 233Gi 10Gi 139Gi 7% 484247 2447617073 0% /
/dev/disk1s1 233Gi 79Gi 139Gi 37% 1215180 2446886140 0% /System/Volumes/Data
If Avail is close to 100%, it is better to delete the large file under the file written in Mounted on
.
What exactly is squeezing capacity in Mounted on
? Is confirmed with du -sh
.
If you want to see under /
, you can check how much is used for each directory under / with du -sh / *
.
Depending on the authority, you may not be able to see some of them, so it is recommended to use sudo with root authority.
$ du -sh ./*
26M ./Desktop
1.5M ./Documents
1.4G ./Downloads
Since it was late to do it with / *
, it is done with ./*
in the example.
If you have a heavy load process, CPU usage
or Load Avg
should be high.
Use the top
command for confirmation. If the load is high, check the process with the ps
command. If you can identify the process with a high load, kill the process with the kill
command or restart the target service with the systemctl command.
You can understand something from the above two points, so if you can't think about it at all, you may want to try it for the time being. If you still don't understand, check the log or read from the error.
If you haven't done anything wrong, the above command alone should tell you something. ..
Recommended Posts