<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://dikapediav2.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Lsof</id>
	<title>Lsof - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://dikapediav2.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Lsof"/>
	<link rel="alternate" type="text/html" href="https://dikapediav2.com/wiki/index.php?title=Lsof&amp;action=history"/>
	<updated>2026-04-26T09:26:44Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://dikapediav2.com/wiki/index.php?title=Lsof&amp;diff=114&amp;oldid=prev</id>
		<title>Ardika Sulistija: Created page with &quot;$ lsof | grep -i del         .         .   (Output cut short)         .          apache2 151110 www-data DEL REG 0,1 81229715 /dev/zero         apache2 151110 www-data DEL REG 0,1 74060991 /dev/zero         apache2 151110 www-data 8w REG 259,2 12017916902 512005 /var/log/apache2/access.log (deleted)         apache2 151110 www-data 9ur REG 259,2 0 5925 /tmp/.ZendSem.SLoNkY (deleted)         apache2 151112 www-data DEL REG 0,1 81229715 /dev/zero         apache2 151112 www-...&quot;</title>
		<link rel="alternate" type="text/html" href="https://dikapediav2.com/wiki/index.php?title=Lsof&amp;diff=114&amp;oldid=prev"/>
		<updated>2024-08-27T00:39:42Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;$ lsof | grep -i del         .         .   (Output cut short)         .          apache2 151110 www-data DEL REG 0,1 81229715 /dev/zero         apache2 151110 www-data DEL REG 0,1 74060991 /dev/zero         apache2 151110 www-data 8w REG 259,2 12017916902 512005 /var/log/apache2/access.log (deleted)         apache2 151110 www-data 9ur REG 259,2 0 5925 /tmp/.ZendSem.SLoNkY (deleted)         apache2 151112 www-data DEL REG 0,1 81229715 /dev/zero         apache2 151112 www-...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;$ lsof | grep -i del&lt;br /&gt;
        .&lt;br /&gt;
        .   (Output cut short)&lt;br /&gt;
        . &lt;br /&gt;
        apache2 151110 www-data DEL REG 0,1 81229715 /dev/zero&lt;br /&gt;
        apache2 151110 www-data DEL REG 0,1 74060991 /dev/zero&lt;br /&gt;
        apache2 151110 www-data 8w REG 259,2 12017916902 512005 /var/log/apache2/access.log (deleted)&lt;br /&gt;
        apache2 151110 www-data 9ur REG 259,2 0 5925 /tmp/.ZendSem.SLoNkY (deleted)&lt;br /&gt;
        apache2 151112 www-data DEL REG 0,1 81229715 /dev/zero&lt;br /&gt;
        apache2 151112 www-data DEL REG 0,1 74060991 /dev/zero&lt;br /&gt;
        apache2 151112 www-data 8w REG 259,2 12017916902 512005 /var/log/apache2/access.log (deleted)&lt;br /&gt;
        apache2 151112 www-data 9u REG 259,2 0 5925 /tmp/.ZendSem.SLoNkY (deleted)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Its possible a running process opened a file (likely a log file) and kept it locked. At some moment that file was deleted (maybe a wrong logrotate or something) but the process is still running, consequently the file descriptor is kept. You can run: lsof  | grep -i del. and check for processes with deleted files (I don’t remember if they will be flagged as deleted, DELETED, delete, etc…). if you find any, confirm if the path matches then we can make a decision (likely kill the process, restart the service that owns it, etc). yep, so the quick fix here would be running service httpd restart  (or service apache2 restart depending on the system).  something else deleted the files and didn’t let apache know. I would say that it were wrong logrotate rules, but it is just a guess. sometimes a full restart isn’t required, just a apache reload may release the file descriptors and free space. the reload keeps the connections established, so shouldn’t cause downtime (I never promised that though)&lt;br /&gt;
&lt;br /&gt;
* lsof +L1; Check if there are open files which have been deleted. Yeah these files still take up space but don&amp;#039;t show in directory. Yep.  Need to restart that process to make them go away for good. Needs better log rotating to avoid this issue. yeah when you rm a file, you just mark it for deletion. If its not open, it will delete instantly. But if a process still has the file open, it won’t be truly deleted until that process exits or releases the file.&lt;br /&gt;
&lt;br /&gt;
* Sometimes the OS holds onto a file even if its deleted. lsof +L1 (https://serverfault.com/questions/232525/df-in-linux-not-showing-correct-free-space-after-file-removal/232526).you can try to restart apache. they might need to look into their application on why its locking deleted files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====How to check what&amp;#039;s listening on a port====&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
 # lsof -i -P -n | grep LISTEN&lt;br /&gt;
 systemd-r  794 systemd-resolve   13u  IPv4  16800      0t0  TCP 127.0.0.53:53 (LISTEN)&lt;br /&gt;
 sshd      1024            root    3u  IPv4  19859      0t0  TCP *:22 (LISTEN)&lt;br /&gt;
 sshd      1024            root    4u  IPv6  19870      0t0  TCP *:22 (LISTEN)&lt;br /&gt;
 java      1223 aws-replication   66u  IPv6  28058      0t0  TCP *:1500 (LISTEN)&lt;br /&gt;
&lt;br /&gt;
(Alternate) You can also use netstat:&lt;br /&gt;
&lt;br /&gt;
 # sudo netstat -tulpn | grep LISTEN&lt;br /&gt;
 tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      794/systemd-resolve &lt;br /&gt;
 tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1024/sshd           &lt;br /&gt;
 tcp6       0      0 :::22                   :::*                    LISTEN      1024/sshd           &lt;br /&gt;
 tcp6       0      0 :::1500                 :::*                    LISTEN      1223/java&lt;/div&gt;</summary>
		<author><name>Ardika Sulistija</name></author>
	</entry>
</feed>