File handle is not released, disk usage problems

Background: receive zabbix monitor, a machine disk alarm offline

Login server, view the directory at the root path size

Now occupied by the size of the discovery has been inconsistent use of space, thought might lead to a file handle is not released

View file handles still in use: lsof | grep -i deleted

 

 The above is marked red to capture before executing the command issue analysis, suspicious.

Directly kill the process: kill 14867

Check disk space again:

 Disk space has been released, the problem is solved.

The next check can be cleared by emptying the file descriptor file, so you can respond to a situation to deal with some of the services are running:

# Clear fd
> /proc/${pid}/fd/${id}
# Direct call or truncate command
truncate -s 0 /proc/${pid}/fd/${id} 

Guess you like

Origin www.cnblogs.com/imcati/p/11994986.html