Hello. I have a server using FreeBSD 8.2, and recently I?ve noticed that /var is getting full But du ?hs /var shows me this: 14M /var/ How Can I know what is using var to free space? Thank you. OS info: FreeBSD edh.edh 8.2-RELEASE-p3 FreeBSD 8.2-RELEASE-p3 #0: Tue Sep 27 18:45:57 UTC 2011 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64
I forgot this: /dev/da0s1d 11G 9.9G 457M 96% /var From: Efra?n D?ctor Sent: Friday, April 27, 2012 10:14 AM To: freebsd-stable@freebsd.org Subject: /var getting full Hello. I have a server using FreeBSD 8.2, and recently I?ve noticed that /var is getting full But du ?hs /var shows me this: 14M /var/ How Can I know what is using var to free space? Thank you. OS info: FreeBSD edh.edh 8.2-RELEASE-p3 FreeBSD 8.2-RELEASE-p3 #0: Tue Sep 27 18:45:57 UTC 2011 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64
Type: sync Then: df -h Then: cd /var && du -hd 1 Post results. On 4/27/12 5:16 PM, Efra?n D?ctor wrote:> I forgot this: > > /dev/da0s1d 11G 9.9G 457M 96% /var > > From: Efra?n D?ctor > Sent: Friday, April 27, 2012 10:14 AM > To: freebsd-stable@freebsd.org > Subject: /var getting full > > Hello. I have a server using FreeBSD 8.2, and recently I?ve noticed that /var is getting full But du ?hs /var shows me this: > > 14M /var/ > > How Can I know what is using var to free space? > > Thank you. > > OS info: > FreeBSD edh.edh 8.2-RELEASE-p3 FreeBSD 8.2-RELEASE-p3 #0: Tue Sep 27 18:45:57 UTC 2011 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"
On Fri, Apr 27, 2012 at 4:19 PM, Damien Fleuriot <ml@my.gd> wrote:> Type: > sync > > > Then: > df -h > > Then: > cd /var && du -hd 1 > > > Post results. >As well as this, any unlinked files that have file handles open by running processes will not be accounted for in du, but will be counted in df. You could try restarting services that write to /var. Cheers Tom
Thank you all. I found out that a Java process was using all this space. I restarted it and voil? problem solved. Thanks. -----Mensaje original----- From: Tom Evans Sent: Friday, April 27, 2012 10:22 AM To: Damien Fleuriot Cc: freebsd-stable@freebsd.org Subject: Re: /var getting full On Fri, Apr 27, 2012 at 4:19 PM, Damien Fleuriot <ml@my.gd> wrote:> Type: > sync > > > Then: > df -h > > Then: > cd /var && du -hd 1 > > > Post results. >As well as this, any unlinked files that have file handles open by running processes will not be accounted for in du, but will be counted in df. You could try restarting services that write to /var. Cheers Tom _______________________________________________ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"
Hello! On Fri, Apr 27, 2012 at 10:14:27AM -0500, Efra?n D?ctor wrote:> Hello. I have a server using FreeBSD 8.2, and recently I?ve noticed that /var is getting full But du ?hs /var shows me this: > > 14M /var/ > > How Can I know what is using var to free space?fstat -f /var Maxim Dounin
On Fri, 2012-04-27 at 10:14 -0500, Efra?n D?ctor wrote:> Hello. I have a server using FreeBSD 8.2, and recently I?ve noticed that /var is getting full But du hs /var shows me this: > > 14M /var/ > > How Can I know what is using var to free space? > > Thank you. > > OS info: > FreeBSD edh.edh 8.2-RELEASE-p3 FreeBSD 8.2-RELEASE-p3 #0: Tue Sep 27 18:45:57 UTC 2011 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64I would speculate that some process has unlinked a file but still has it open so the space is still in use. Try procstat -af | grep /var and look especially for lines that have a huge number in the OFFSET column (although I'm not sure that's definitive -- the file descriptor could be positioned at an offset less than the file size). -- Ian
Am 27.04.2012 17:26, schrieb Efra?n D?ctor:> Thank you all. > > I found out that a Java process was using all this space. I restarted > it and voil? problem solved.Did you write this Java program? If so, you probably need a finally block: File f = ... InputStream in = null; try { in = new FileInputStream(in); //whatever you do here, such as create a Reader, you keep a reference to the InputStream }finally{ //A finally is called regardless of what happens in the try. For example, if there is an Exception thrown, the finally is run anyway. Code at the end of the try is not called when an exception is thrown. if( in != null ) { //you must wrap this in a try{}catch(IOException){}, otherwise the rest of your finally is not run if it throws an Exception try{ in.close(); }catch(IOException e) { logger.log(Level.SEVERE, Failed to close InputStream", e); } } }> > > Thanks. > -----Mensaje original----- From: Tom Evans > Sent: Friday, April 27, 2012 10:22 AM > To: Damien Fleuriot > Cc: freebsd-stable@freebsd.org > Subject: Re: /var getting full > > On Fri, Apr 27, 2012 at 4:19 PM, Damien Fleuriot <ml@my.gd> wrote: >> Type: >> sync >> >> >> Then: >> df -h >> >> Then: >> cd /var && du -hd 1 >> >> >> Post results. >> > > As well as this, any unlinked files that have file handles open by > running processes will not be accounted for in du, but will be counted > in df. You could try restarting services that write to /var. > > Cheers > > Tom > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"