Re: Disk Usage

2010-04-30 Thread ill...@gmail.com
On 23 April 2010 12:24, Jerry freebsd.u...@seibercom.net wrote:
 On Fri, 23 Apr 2010 12:06:14 -0400
 ill...@gmail.com ill...@gmail.com articulated:

 64bit executables are going to be larger,
 sometimes as much as 2x, but do you
 now have a bunch of (large)
 /boot/kernel/*.symbols
 files now?

 I have 1115 total files in that directory. It appears that half of them
 are *.symbols files.


I'm pretty sure that you don't actually need those for
day to day running (I assume they have something to
do with GDB).  They can pretty safely be rm(1)ed.

-- 
--
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Disk Usage

2010-04-23 Thread Lowell Gilbert
Jerry freebsd.u...@seibercom.net writes:

 I just did a fresh install of FreeBSD-8.0/amd64. Previously, I had
 FreeBSD-7.3/i386  installed. It appears the the size of / has
 increased dramatically.

 $ df -H
 Filesystem SizeUsed   Avail Capacity  Mounted on
 /dev/ad0s1a1.0G527M428M55%/
 devfs  1.0k1.0k  0B   100%/dev
 /dev/ad0s1d520M 18k478M 0%/tmp
 /dev/ad0s1e236G6.0G212G 3%/usr
 /dev/ad1s1d238G720M218G 0%/var

 When I attempted to build World and a new kernel after first installing
 8.0, I received an error that / was at 106% and the process stopped. I
 reinstalled 8.0 and increased the size to 1.0G and now everything
 appears to be working correctly.

 In my old installation, the root directory only used a minuscule amount
 of space. Why has it increased so dramatically in 8.0/amd64?

New modules, mostly.

-- 
Lowell Gilbert, embedded/networking software engineer, Boston area
http://be-well.ilk.org/~lowell/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Disk Usage

2010-04-23 Thread Jerry
On Fri, 23 Apr 2010 11:26:02 -0400
Lowell freebsd-questions-lo...@be-well.ilk.org articulated:

 Jerry freebsd.u...@seibercom.net writes:
 
  I just did a fresh install of FreeBSD-8.0/amd64. Previously, I had
  FreeBSD-7.3/i386  installed. It appears the the size of / has
  increased dramatically.
 
  $ df -H
  Filesystem SizeUsed   Avail Capacity  Mounted on
  /dev/ad0s1a1.0G527M428M55%/
  devfs  1.0k1.0k  0B   100%/dev
  /dev/ad0s1d520M 18k478M 0%/tmp
  /dev/ad0s1e236G6.0G212G 3%/usr
  /dev/ad1s1d238G720M218G 0%/var
 
  When I attempted to build World and a new kernel after first
  installing 8.0, I received an error that / was at 106% and the
  process stopped. I reinstalled 8.0 and increased the size to 1.0G
  and now everything appears to be working correctly.
 
  In my old installation, the root directory only used a minuscule
  amount of space. Why has it increased so dramatically in 8.0/amd64?
 
 New modules, mostly.

OK, in that case, the install utility should be updated to allocate a
larger share to the root directory. As I stated, I ran out of room
while doing an initial World/Kernel build. Perhaps a mention in the
documentation would also be beneficial.

Just my 2¢.

-- 
Jerry
freebsd.u...@seibercom.net

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the Reply-To header.
__

Leave no stone unturned.

Euripides


signature.asc
Description: PGP signature


Re: Disk Usage

2010-04-23 Thread ill...@gmail.com
On 22 April 2010 12:02, Jerry freebsd.u...@seibercom.net wrote:
 I just did a fresh install of FreeBSD-8.0/amd64. Previously, I had
 FreeBSD-7.3/i386  installed. It appears the the size of / has
 increased dramatically.

 $ df -H
 Filesystem     Size    Used   Avail Capacity  Mounted on
 /dev/ad0s1a    1.0G    527M    428M    55%    /
 devfs          1.0k    1.0k      0B   100%    /dev
 /dev/ad0s1d    520M     18k    478M     0%    /tmp
 /dev/ad0s1e    236G    6.0G    212G     3%    /usr
 /dev/ad1s1d    238G    720M    218G     0%    /var

 When I attempted to build World and a new kernel after first installing
 8.0, I received an error that / was at 106% and the process stopped. I
 reinstalled 8.0 and increased the size to 1.0G and now everything
 appears to be working correctly.

 In my old installation, the root directory only used a minuscule amount
 of space. Why has it increased so dramatically in 8.0/amd64?


64bit executables are going to be larger,
sometimes as much as 2x, but do you
now have a bunch of (large)
/boot/kernel/*.symbols
files now?

-- 
--
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Disk Usage

2010-04-23 Thread Jerry
On Fri, 23 Apr 2010 12:06:14 -0400
ill...@gmail.com ill...@gmail.com articulated:

 64bit executables are going to be larger,
 sometimes as much as 2x, but do you
 now have a bunch of (large)
 /boot/kernel/*.symbols
 files now?

I have 1115 total files in that directory. It appears that half of them
are *.symbols files.

-- 
Jerry
freebsd.u...@seibercom.net

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the Reply-To header.
__

The hardest thing in the world to understand is the income tax.

Albert Einstein


signature.asc
Description: PGP signature


Re: Disk Usage

2010-04-23 Thread Jerry
On Fri, 23 Apr 2010 11:18:57 -0500 (CDT)
Mark tingu...@casselton.net articulated:

 
 The command (as root) will show which directories in the root
 partition use the most space:
 
  # du -kx / | sort -n
 
 Sometime install will backup the boot kernel directory.
 Multiple /boot/kernel* directories can quickly eat up space.

/ $ sudo du -kx / | sort -n
1   /dev
2   /.snap
2   /boot/firmware
2   /boot/zfs
2   /cdrom
2   /etc/ntp
2   /etc/skel
2   /etc/ssl/demoCA/crl
2   /etc/zfs
2   /media
2   /mnt
2   /proc
2   /tmp
2   /usr
2   /var
4   /etc/devd
4   /etc/gnats
4   /etc/ppp
4   /etc/ssl/demoCA/certs
6   /etc/gss
6   /etc/periodic/monthly
6   /etc/ssl/demoCA/private
8   /etc/bluetooth
10  /etc/X11
10  /etc/ssl/demoCA/newcerts
14  /etc/periodic/weekly
14  /etc/ssl/apache-certs
16  /root/kernels
24  /boot/defaults
34  /root
36  /etc/pam.d
36  /etc/security
40  /etc/periodic/security
42  /etc/ssl/demoCA
54  /etc/defaults
56  /etc/periodic/daily
74  /etc/mtree
94  /etc/ssl
118 /etc/periodic
144 /etc/ssh
252 /etc/mail
336 /lib/geom
386 /etc/rc.d
1026/libexec
1152/bin
1888/etc
4416/rescue
5240/sbin
7586/lib
12884   /boot/modules
238354  /boot/kernel.old
240616  /boot/kernel
492826  /boot
514199  /


I am assuming that I can safely delete the contents of
/boot/kernel.old. It is not that I am in dire need of space but
rather I do not want to risk running out of space in root again. Next
time I will allocate at least 2G to root.

$ df -cih
Filesystem SizeUsed   Avail Capacity iused ifree %iused  Mounted on
/dev/ad0s1a989M502M408M55%2.9k  138k2%   /
devfs  1.0K1.0K  0B   100%   0 0  100%   /dev
/dev/ad0s1d496M 18K456M 0%  15   66k0%   /tmp
/dev/ad0s1e220G6.1G196G 3%371k   29M1%   /usr
/dev/ad1s1d222G737M203G 0% 28k   30M0%   /var
total  443G7.3G401G 2%402k   60M1% 

-- 
Jerry
freebsd.u...@seibercom.net

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the Reply-To header.
__

I'd rather have a bottle in front of me than a frontal lobotomy.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Disk Usage

2010-04-23 Thread Michael Powell
ill...@gmail.com wrote:

 On 22 April 2010 12:02, Jerry freebsd.u...@seibercom.net wrote:
 I just did a fresh install of FreeBSD-8.0/amd64. Previously, I had
 FreeBSD-7.3/i386  installed. It appears the the size of / has
 increased dramatically.

 $ df -H
 Filesystem SizeUsed   Avail Capacity  Mounted on
 /dev/ad0s1a1.0G527M428M55%/
 devfs  1.0k1.0k  0B   100%/dev
 /dev/ad0s1d520M 18k478M 0%/tmp
 /dev/ad0s1e236G6.0G212G 3%/usr
 /dev/ad1s1d238G720M218G 0%/var

 When I attempted to build World and a new kernel after first installing
 8.0, I received an error that / was at 106% and the process stopped. I
 reinstalled 8.0 and increased the size to 1.0G and now everything
 appears to be working correctly.

 In my old installation, the root directory only used a minuscule amount
 of space. Why has it increased so dramatically in 8.0/amd64?

 
 64bit executables are going to be larger,
 sometimes as much as 2x, but do you
 now have a bunch of (large)
 /boot/kernel/*.symbols
 files now?
 

You can comment out 'makeoptionsDEBUG=-g' from your kernel config file, 
along with all other debugging facilities and set  WITHOUT_PROFILE= true in 
src.conf. I also have STRIP= -s in my make.conf, but IIRC this should only 
apply to ports builds.

The downside to this is if you need to do some serious troubleshooting 
you're screwed. On production boxen I run Release versions, and only do 
security updates/patches or upgrade to the next Release. In the past using 
the most quiescent code has been good to me.

After two kernel builds/installs the huge GENERIC gets moved out of the way. 
My i386 box has 91MB of space used in / and the 64 bit boxen are typically 
about 93-95MB. I only have one i386 box left and it's crunched down kernel 
is 4.2MB, and my 64 bit ones average around 4.5MB.

This can be an effective strategy to mitigate a / being too small, but at 
the cost of reducing one's ability to get down and dirty troubleshooting 
code bugs.

-Mike


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Disk Usage

2010-04-22 Thread Jerry
I just did a fresh install of FreeBSD-8.0/amd64. Previously, I had
FreeBSD-7.3/i386  installed. It appears the the size of / has
increased dramatically.

$ df -H
Filesystem SizeUsed   Avail Capacity  Mounted on
/dev/ad0s1a1.0G527M428M55%/
devfs  1.0k1.0k  0B   100%/dev
/dev/ad0s1d520M 18k478M 0%/tmp
/dev/ad0s1e236G6.0G212G 3%/usr
/dev/ad1s1d238G720M218G 0%/var

When I attempted to build World and a new kernel after first installing
8.0, I received an error that / was at 106% and the process stopped. I
reinstalled 8.0 and increased the size to 1.0G and now everything
appears to be working correctly.

In my old installation, the root directory only used a minuscule amount
of space. Why has it increased so dramatically in 8.0/amd64?

-- 
Jerry
freebsd.u...@seibercom.net

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the Reply-To header.
__

Never count your chickens before they rip your lips off.


signature.asc
Description: PGP signature


discrepancies in disk usage between df and du

2010-02-12 Thread Fernan Aguero
Hi,

I have a box (7.2-STABLE, amd64) that is currently showing some disk
usage problems. It all started with apache generating huge logs from
one of the mod_perl applications that is undergoing testing. So the
/var partition was getting full.

We removed all logs that were causing the problem, but even though du
shows some 700 Mb of usage, df shows that the disk is full (-1.5 Gb):

[fer...@omega ~] sudo du -hc -d1 /var/
Password:
2.0K/var/.snap
423M/var/account
6.0K/var/at
2.0K/var/audit
 18K/var/backups
4.0K/var/crash
6.0K/var/cron
 53M/var/db
2.0K/var/empty
2.0K/var/heimdal
219M/var/log
 14M/var/mail
4.0K/var/msgs
 48K/var/named
2.0K/var/preserve
 44K/var/run
2.0K/var/rwho
 16K/var/spool
 76K/var/tmp
 24K/var/yp
2.0K/var/games
710M/var/
710Mtotal

[fer...@omega ~] df -h
FilesystemSizeUsed   Avail Capacity  Mounted on
/dev/mirror/gm0s1f 18G 18G   -1.5G   109%/var

I've been googling around, and I understand why df and du might be
reporting disk usage differently. However, I can't solve this issue
and reclaim unused disk space ... applications (apache, mod_perl) are
prevented to write to /var and this is causing us problems.

We've already tried rebooting the box, restarting the syslog,
newsyslog daemons, to no avail. df keeps showing 100% disk usage
(-1.5 Gb of remaining disk space) in all cases. We've even rebooted
the box with all apache instances turned off in rc.conf ... i.e.
without any but the most basic services running (sshd) ...

This box is essentially a web server, no other services are being run.

Any suggestions as to what to try next?

Thanks in advance,

-- 
fernan
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: discrepancies in disk usage between df and du

2010-02-12 Thread Paul Schmehl
You have a file locking problem.  du shows disk in use, but df shows disk 
committed.  Use lsof to identify the file that has disk space reserved but 
no longer exists.  man (8) lsof


--On February 12, 2010 5:39:44 PM -0300 Fernan Aguero 
fernan.agu...@gmail.com wrote:



Hi,

I have a box (7.2-STABLE, amd64) that is currently showing some disk
usage problems. It all started with apache generating huge logs from
one of the mod_perl applications that is undergoing testing. So the
/var partition was getting full.

We removed all logs that were causing the problem, but even though du
shows some 700 Mb of usage, df shows that the disk is full (-1.5 Gb):

[fer...@omega ~] sudo du -hc -d1 /var/
Password:
2.0K/var/.snap
423M/var/account
6.0K/var/at
2.0K/var/audit
 18K/var/backups
4.0K/var/crash
6.0K/var/cron
 53M/var/db
2.0K/var/empty
2.0K/var/heimdal
219M/var/log
 14M/var/mail
4.0K/var/msgs
 48K/var/named
2.0K/var/preserve
 44K/var/run
2.0K/var/rwho
 16K/var/spool
 76K/var/tmp
 24K/var/yp
2.0K/var/games
710M/var/
710Mtotal

[fer...@omega ~] df -h
FilesystemSizeUsed   Avail Capacity  Mounted on
/dev/mirror/gm0s1f 18G 18G   -1.5G   109%/var

I've been googling around, and I understand why df and du might be
reporting disk usage differently. However, I can't solve this issue
and reclaim unused disk space ... applications (apache, mod_perl) are
prevented to write to /var and this is causing us problems.

We've already tried rebooting the box, restarting the syslog,
newsyslog daemons, to no avail. df keeps showing 100% disk usage
(-1.5 Gb of remaining disk space) in all cases. We've even rebooted
the box with all apache instances turned off in rc.conf ... i.e.
without any but the most basic services running (sshd) ...

This box is essentially a web server, no other services are being run.

Any suggestions as to what to try next?

Thanks in advance,




Paul Schmehl, If it isn't already
obvious, my opinions are my own
and not those of my employer.
**
WARNING: Check the headers before replying

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: discrepancies in disk usage between df and du

2010-02-12 Thread Fernan Aguero
On Fri, Feb 12, 2010 at 8:53 PM, Paul Schmehl pschmehl_li...@tx.rr.com wrote:
 You have a file locking problem.  du shows disk in use, but df shows disk
 committed.  Use lsof to identify the file that has disk space reserved but
 no longer exists.  man (8) lsof

Thanks Paul for the suggestion. I've tried both lsof and fstat, and
can't really see anything wrong in the output ...

1. Can't install lsof from ports, apparently

===   Registering installation for lsof-4.83C,4
/var: write failed, filesystem is full
cp: /var/db/pkg/lsof-4.83C,4/+MTREE_DIRS: No space left on device
*** Error code 1

I say 'apparently' because in spite of the error message, /var/db/pkg
gets written anyway:

omega# ls -l /var/db/pkg/lsof-4.83C,4/
total 6
-rw-r--r--  1 root  wheel57 Feb 13 01:22 +COMMENT
-rw-r--r--  1 root  wheel  1435 Feb 13 01:22 +CONTENTS
-rw-r--r--  1 root  wheel   386 Feb 13 01:22 +DESC
-rw-r--r--  1 root  wheel 0 Feb 13 01:22 +MTREE_DIRS

And lsof is installed at /usr/local/sbin/lsof, as expected.

2. Let's see what lsof shows:

omega# lsof +D /var/
COMMANDPID  USER   FD   TYPE DEVICE SIZE/OFFNODE NAME
devd   464  root4u  unix 0xff0005d03b40  0t0
/var/run/devd.pipe
devd   464  root5w  VREG   0,943   47122
/var/run/devd.pid
sendmail   804  root  cwd   VDIR   0,94  512 1295363
/var/spool/mqueue
sendmail   804  root5w  VREG   0,94   78   47115
/var/run/sendmail.pid
sendmail   808 smmsp  cwd   VDIR   0,94  512 1295366
/var/spool/clientmqueue
sendmail   808 smmsp4w  VREG   0,940 1295368
/var/spool/clientmqueue/sm-client.pid
cron   814  root  cwd   VDIR   0,94  512   23552 /var/cron
cron   814  root3w  VREG   0,943   47117
/var/run/cron.pid
csh   6741 paula  cwd   VDIR   0,94 4096  117760 /var/log
syslogd  70526  root3w  VREG   0,945   47111
/var/run/syslog.pid
syslogd  70526  root4u  unix 0xff0024a00b40  0t0
/var/run/log
syslogd  70526  root5u  unix 0xff0013ee9870  0t0
/var/run/logpriv
syslogd  70526  root   11w  VREG   0,9451176  117901
/var/log/messages
syslogd  70526  root   12w  VREG   0,94   60  117771
/var/log/security
syslogd  70526  root   13w  VREG   0,9486008  117780
/var/log/auth.log
syslogd  70526  root   14w  VREG   0,94 2036  117877
/var/log/maillog
syslogd  70526  root   15w  VREG   0,94   60  117767
/var/log/lpd-errs
syslogd  70526  root   16w  VREG   0,94   60  117773
/var/log/xferlog
syslogd  70526  root   17w  VREG   0,9434783  117859
/var/log/cron
syslogd  70526  root   18w  VREG   0,94   93  117766
/var/log/debug.log
syslogd  70526  root   19w  VREG   0,94   60  117772
/var/log/slip.log
syslogd  70526  root   20w  VREG   0,94   60  117770
/var/log/ppp.log

3. fstat comes built-in,

omega# fstat -f /var/
USER CMD  PID   FD MOUNT  INUM MODE SZ|DV R/W
root syslogd705263 /var  47111 -rw---   5  w
root syslogd70526   11 /var 117901 -rw-r--r--   51176  w
root syslogd70526   12 /var 117771 -rw---  60  w
root syslogd70526   13 /var 117780 -rw---   86008  w
root syslogd70526   14 /var 117877 -rw-r-2036  w
root syslogd70526   15 /var 117767 -rw-r--r--  60  w
root syslogd70526   16 /var 117773 -rw---  60  w
root syslogd70526   17 /var 117859 -rw---   34783  w
root syslogd70526   18 /var 117766 -rw---  93  w
root syslogd70526   19 /var 117772 -rw-r-  60  w
root syslogd70526   20 /var 117770 -rw-r-  60  w
paulacsh 6741   wd /var 117760 drwxr-xr-x4096  r
root cron 814   wd /var  23552 drwxr-x--- 512  r
root cron 8143 /var  47117 -rw---   3  w
smmspsendmail 808   wd /var 1295366 drwxrwx--- 512  r
smmspsendmail 8084 /var 1295368 -rw---   0  w
root sendmail 804   wd /var 1295363 drwxr-xr-x 512  r
root sendmail 8045 /var  47115 -rw---  78  w
root devd 4645 /var  47122 -rw---   3  w

I can see nothing here ...

4. But still, disk is full ... or is it?

omega# df -h
FilesystemSizeUsed   Avail Capacity  Mounted on
/dev/mirror/gm0s1f 18G 18G   -1.5G   109%/var

Thanks for any further advice,

--
fernan


 --On February 12, 2010 5:39:44 PM -0300 Fernan Aguero
 fernan.agu...@gmail.com wrote:

 Hi,

 I have a box (7.2-STABLE, amd64) that is currently showing some disk
 usage problems. It all started with apache generating huge logs from
 one of the mod_perl applications

Re: Disk usage analysis

2009-04-22 Thread Gary Kline
On Wed, Apr 22, 2009 at 07:52:38AM +0200, Polytropon wrote:
 On Tue, 21 Apr 2009 20:08:18 -0700, Christopher Chambers 
 ccha...@interchange.ubc.ca wrote:
  Is there an easy way to analyze disk usage to determine which files and
  folders are taking up the most space?
 
 See man du. Just for terminology: In UNIX (so in FreeBSD), there
 are no folders. Folders are made of paper and reside in a cabinet. :-)
 
 These are called directories.
 
 You don't call files sheets of paper either, do you? :-)

YES!! I'm probably too up-tight about the use of folder,
but it just seems like waay too much stupiding-down of the
std Unix terminology.  ([I thought I was the only one].  And yes,
there are things of greater gravitas to be ticked off about!)

gary

 
[ ... ]
 
 
 -- 
 Polytropon
 From Magdeburg, Germany
 Happy FreeBSD user since 4.0
 Andra moi ennepe, Mousa, ...
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org

-- 
 Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix
http://jottings.thought.org   http://transfinite.thought.org
The 2.41a release of Jottings: http://jottings.thought.org/index.php

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Disk usage analysis

2009-04-22 Thread Wojciech Puchar


These are called directories.

You don't call files sheets of paper either, do you? :-)


YES!! I'm probably too up-tight about the use of folder,
but it just seems like waay too much stupiding-down of the
std Unix terminology.  ([I thought I was the only one].  And yes,
there are things of greater gravitas to be ticked off about!)

it's just stupid to pursue windoze/maclame naming where names are ALREADY 
present!

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Disk usage analysis

2009-04-22 Thread Peter Boosten



On 22 apr 2009, at 10:01, Wojciech Puchar woj...@wojtek.tensor.gdynia.pl 







it's just stupid to pursue windoze/maclame naming


It's just stupid to start another flame war about the superiority of  
one or another OS.


Peter




___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Disk usage analysis

2009-04-22 Thread Mikel King


On Apr 21, 2009, at 11:24 PM, Robert Huff wrote:



Christopher Chambers writes:


Is there an easy way to analyze disk usage to determine which
files and folders are taking up the most space?


If this isn't a FAQ, then search the mailing list archives.
This question, or something leading to it like out of disk space,
comes up regularly.


Robert Huff



I used to run durep on my shared servers. The package seems a bit out  
of date and I have often considered adopting it as a pet project to  
rewrite/update, but time, time and time always seem to be an issue.  
You can read more about the application. It generates a comprehensive  
report that can be automatically emailed, or viewed via the web.


http://www.hibernaculum.net/durep/

Cheers,
Mikel King
CEO, Olivent Technologies
Senior Editor, Daemon News
Columnist, BSD Magazine
6 Alpine Court
Medford, NY 11763
http://www.olivent.com
http://www.daemonnews.org
http://www.bsdmag.org
skype: mikel.king
+--+
Follow me if you dare...
http://twitter.com/mikelking
+--+






___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Disk usage analysis

2009-04-22 Thread Jerry McAllister
On Tue, Apr 21, 2009 at 08:08:18PM -0700, Christopher Chambers wrote:

 Is there an easy way to analyze disk usage to determine which files and
 folders are taking up the most space?

Check out the du(1) command.

Go in to a file system and type du -sk *   or  maybe  du -sh * 
(I prefer the former because then all numbers have the same value)

Once you determine some directory that seems out of line, go in to that
directory and do it again.

jerry


 
 -- 
 Christopher Chambers ccha...@interchange.ubc.ca
 
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Disk usage analysis

2009-04-22 Thread Mikel King




On Apr 22, 2009, at 3:05 PM, andrew clarke wrote:

On Wed 2009-04-22 10:46:14 UTC-0400, Mikel King (mikel.k...@olivent.com 
) wrote:



I used to run durep on my shared servers.


durep seems to have no concept of security :-)  So how did you go  
about

restricting unwanted people from viewing its output?

Regards
Andrew


When we ran it initially we used .htaccess, then rolled it into a php  
app.


m

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Disk usage analysis

2009-04-22 Thread Mikel King


On Apr 22, 2009, at 3:13 PM, andrew clarke wrote:

On Thu 2009-04-23 05:05:25 UTC+1000, andrew clarke  
(m...@ozzmosis.com) wrote:


durep seems to have no concept of security :-)  So how did you go  
about

restricting unwanted people from viewing its output?


I'm referring to the CGI version of durep here, of course.



We didn't run the CGI version. Only used it as a scheduled task, to  
generate the report once or twice per day. 


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Disk usage analysis

2009-04-22 Thread andrew clarke
On Thu 2009-04-23 05:05:25 UTC+1000, andrew clarke (m...@ozzmosis.com) wrote:

 durep seems to have no concept of security :-)  So how did you go about
 restricting unwanted people from viewing its output?

I'm referring to the CGI version of durep here, of course.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Disk usage analysis

2009-04-22 Thread andrew clarke
On Wed 2009-04-22 10:46:14 UTC-0400, Mikel King (mikel.k...@olivent.com) wrote:

 I used to run durep on my shared servers.

durep seems to have no concept of security :-)  So how did you go about
restricting unwanted people from viewing its output?

Regards
Andrew
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Disk usage analysis

2009-04-21 Thread Christopher Chambers
Is there an easy way to analyze disk usage to determine which files and
folders are taking up the most space?


-- 
Christopher Chambers ccha...@interchange.ubc.ca

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Disk usage analysis

2009-04-21 Thread Robert Huff

Christopher Chambers writes:

  Is there an easy way to analyze disk usage to determine which
  files and folders are taking up the most space?

If this isn't a FAQ, then search the mailing list archives.
This question, or something leading to it like out of disk space,
comes up regularly.


Robert Huff

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Disk usage analysis

2009-04-21 Thread Adam Vande More

Christopher Chambers wrote:

Is there an easy way to analyze disk usage to determine which files and
folders are taking up the most space?


  

du -hd 1 | sort -n

http://www.freebsd.org/cgi/man.cgi?query=duapropos=0sektion=0manpath=FreeBSD+7.1-RELEASE+and+Portsformat=html
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Disk usage analysis

2009-04-21 Thread Tim Judd
On Tue, Apr 21, 2009 at 9:21 PM, Adam Vande More amvandem...@gmail.comwrote:

 Christopher Chambers wrote:

 Is there an easy way to analyze disk usage to determine which files and
 folders are taking up the most space?




 du -hd 1 | sort -n


du -kd 1 | sort -rn


Shows in ENV{BLOCKSIZE} the biggest directories first.  Bound to be / always
in this situation.  :D
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Disk usage analysis

2009-04-21 Thread Polytropon
On Tue, 21 Apr 2009 20:08:18 -0700, Christopher Chambers 
ccha...@interchange.ubc.ca wrote:
 Is there an easy way to analyze disk usage to determine which files and
 folders are taking up the most space?

See man du. Just for terminology: In UNIX (so in FreeBSD), there
are no folders. Folders are made of paper and reside in a cabinet. :-)

These are called directories.

You don't call files sheets of paper either, do you? :-)

For a GUI solution, check out file browsers. Most of them have the
ability to calculate the disk space occupation of a certain
directory or subtree. For example, in the Midnight Commander,
use PF9, Command, Show directory sizes.


-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: disk usage statistics

2009-04-11 Thread Michal

Wojciech Puchar wrote:

Could you suggest me how can I get my disk usage statistics in terms of
percentage of the possible disk activity (like in gstat) or megabytes
per second (like in iostat), please?


systat

then type
:vmstat



I need something not interactive, command that prints what it knows and 
quits. I want to use it's output in a script.


Michal.
--
But all endings are also beginnings. We just don't know it at the 
time. -Mitch Albom

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


disk usage statistics

2009-04-10 Thread Michal

Hello.

Could you suggest me how can I get my disk usage statistics in terms of
percentage of the possible disk activity (like in gstat) or megabytes
per second (like in iostat), please?

I need something that gives actual usage statistics, not any averages.
And something that prints what I want and quits (not like gstat in
default mode). It have to be available for unprivileged user and I don't
want to use any temporally files in the process.

The closest I can get is (last column of):
iostat -c 2 -d ad0 | tail -n 1

Problem is that it takes two seconds, which is not acceptable for me
because I want it's output to be printed in status bar beside date and 
time. I'm using wmii window manager.


Any suggestions and hints are very welcome.
Michal
--
Never interrupt your enemy when he is making a mistake. -Napoleon 
Bonaparte

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: disk usage statistics

2009-04-10 Thread Wojciech Puchar

Hello.

Could you suggest me how can I get my disk usage statistics in terms of
percentage of the possible disk activity (like in gstat) or megabytes
per second (like in iostat), please?


systat

then type
:vmstat

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: disk usage statistics

2009-04-10 Thread Bill Moran
Michal m...@infosec.pl wrote:
 
 Could you suggest me how can I get my disk usage statistics in terms of
 percentage of the possible disk activity (like in gstat) or megabytes
 per second (like in iostat), please?
 
 I need something that gives actual usage statistics, not any averages.
 And something that prints what I want and quits (not like gstat in
 default mode). It have to be available for unprivileged user and I don't
 want to use any temporally files in the process.
 
 The closest I can get is (last column of):
 iostat -c 2 -d ad0 | tail -n 1
 
 Problem is that it takes two seconds, which is not acceptable for me
 because I want it's output to be printed in status bar beside date and 
 time. I'm using wmii window manager.
 
 Any suggestions and hints are very welcome.

snmp?  There's a command line client for net-snmp, and there are a
variety of disk activity MIBs.

-- 
Bill Moran
http://www.potentialtech.com
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: differences of disk usage between du and quota binaries

2009-02-07 Thread Nicolas Letellier
On Fri, 6 Feb 2009 20:12:56 +
RW rwmailli...@googlemail.com wrote:

 On Fri, 6 Feb 2009 20:13:17 +0100
 Nicolas Letellier nico...@nicoelro.net wrote:
 
  Hello.
  
  I use FreeBSD 6.3. I set quota to my fs.
  But, when I print disk usage with du -sh, I have:
  
 ..
  
  Why this difference? (633M against 648264)
 
 
 Try dividing 648264 by 1024.

Ok.

Thanks a lot for your response.

Regards.

-- 
 -Nicolas.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


differences of disk usage between du and quota binaries

2009-02-06 Thread Nicolas Letellier
Hello.

I use FreeBSD 6.3. I set quota to my fs.
But, when I print disk usage with du -sh, I have:

r...@domain sites $  du -sh folder
633Mfolder

But, when I print disk usage with quota -u user, I have:

isk quotas for user user (uid 2002):
 Filesystem   usage   quota   limit   grace   files   quota   limit   grace
   /var  648264  70  702963   0   0


Why this difference? (633M against 648264)

Regards,

-- 
 -Nicolas.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: differences of disk usage between du and quota binaries

2009-02-06 Thread Glen Barber
On Fri, Feb 6, 2009 at 2:13 PM, Nicolas Letellier nico...@nicoelro.net wrote:
 Hello.

 I use FreeBSD 6.3. I set quota to my fs.
 But, when I print disk usage with du -sh, I have:

 r...@domain sites $  du -sh folder
 633Mfolder

 But, when I print disk usage with quota -u user, I have:

 isk quotas for user user (uid 2002):
 Filesystem   usage   quota   limit   grace   files   quota   limit   grace
   /var  648264  70  702963   0   0


 Why this difference? (633M against 648264)


Because 633Mb is 648264 (roughly) bytes.  (648264 / 1024)

Regards,

-- 
Glen Barber
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: differences of disk usage between du and quota binaries

2009-02-06 Thread Glen Barber
On Fri, Feb 6, 2009 at 2:33 PM, Glen Barber glen.j.bar...@gmail.com wrote:
 On Fri, Feb 6, 2009 at 2:13 PM, Nicolas Letellier nico...@nicoelro.net 
 wrote:
 Hello.

 I use FreeBSD 6.3. I set quota to my fs.
 But, when I print disk usage with du -sh, I have:

 r...@domain sites $  du -sh folder
 633Mfolder

 But, when I print disk usage with quota -u user, I have:

 isk quotas for user user (uid 2002):
 Filesystem   usage   quota   limit   grace   files   quota   limit   
 grace
   /var  648264  70  702963   0   0


 Why this difference? (633M against 648264)


 Because 633Mb is 648264 (roughly) bytes.  (648264 / 1024)

 Regards,

Well, I never really answered the 'why' part of your question -- the
'-h' flag prints 'human readable' output -- ie, in MB instead of
bytes.

-- 
Glen Barber
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: differences of disk usage between du and quota binaries

2009-02-06 Thread RW
On Fri, 6 Feb 2009 20:13:17 +0100
Nicolas Letellier nico...@nicoelro.net wrote:

 Hello.
 
 I use FreeBSD 6.3. I set quota to my fs.
 But, when I print disk usage with du -sh, I have:
 
..
 
 Why this difference? (633M against 648264)


Try dividing 648264 by 1024.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Large discrepancy in reported disk usage on USR partition

2008-10-31 Thread Mel
On Friday 31 October 2008 02:20:39 Brendan Hart wrote:

  Is it possible that nfs directory got written to /usr at some point in

 time?

  You would only notice this with du if the nfs directory is unmounted.
  Unmount it and ls -al /usr/mountpoint should only give you an empty dir

 Bingo!! That is exactly the problem. An NFS mount was hiding a 17G local
 dir which had an old copy of the entire NFS mounted dir. I guess it must
 have been written incorrectly to this standby server by RSYNC before the
 NFS mount was put in place. I will add an exclusion to rsync to make sure
 it does not happen again even if the NFS dir is not mounted.

I used to nfs mount /usr/ports and run a cron job on the local machine. I made 
a file on the local machine:
echo 'This is a mountpoint'  /usr/ports/KEEP_ME_EMPTY

The script would:
if [ -e /usr/ports/KEEP_ME_EMPTY ]; then
do_nfs_mount();
if [ -e /usr/ports/KEEP_ME_EMPTY ]; then
give_up_or_wait();
fi
fi

Of course it's fragile, but it works for not so critical issues.


-- 
Mel

Problem with today's modular software: they start with the modules
and never get to the software part.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Large discrepancy in reported disk usage on USR partition

2008-10-30 Thread Mel
On Thursday 30 October 2008 01:42:32 Brendan Hart wrote:
 Hi,

 I have inherited some servers running various releases of FreeBSD and I am
 having some trouble with the /usr partition on one of these boxen.

 The problem is that there appears to be far more space used on the USR
 partition than there are actual files on the partition. The utility df -h
 reports 25GB used (i.e. nearly the whole partition), but du -x /usr
 reports only 7.6GB of files.

 I have reviewed the FAQ, particularly item 9.24 The du and df commands
 show different amounts of disk space available. What is going on?.
 However, the suggested cause of the discrepancy (large files already
 unlinked but still held open by active processes), does not appear to be
 true in this case as problem is present even after rebooting into single
 user mode.

 #: uname -a
 FreeBSD ibisweb4spare.strategicecommerce.com.au 6.1-RELEASE FreeBSD
 6.1-RELEASE #0: Sun May  7 04:42:56 UTC 2006
 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/SMP  i386

 #: df -h
 Filesystem  SizeUsed   Avail Capacity  Mounted on
 /dev/aacd0s1a   496M163M 293M36%/
 devfs   1.0K1.0K 0B  100%   /dev
 /dev/aacd0s1e   496M15M  441M3% /tmp
 /dev/aacd0s1f28G25G  1.2G96%/usr
 /dev/aacd0s1d   1.9G429M 1.3G24%/var

Is this output untruncated? Is df really df or an alias to 'df -t nonfs'?

 #: du -x -h /usr
 2.0K/usr/.snap
  24M/usr/bin
   
   snip
   
 584M/usr/ports
 140K/usr/lost+found
 7.6G/usr

Is it possible that nfs directory got written to /usr at some point in time? 
You would only notice this with du if the nfs directory is unmounted.

Unmount it and ls -al /usr/mountpoint should only give you an empty dir.
-- 
Mel

Problem with today's modular software: they start with the modules
and never get to the software part.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: Large discrepancy in reported disk usage on USR partition

2008-10-30 Thread Brendan Hart
 I took a look at using the smart tools as you suggested, but have now 
 found that the disk in question is a RAID1 set on a DELL PERC 3/Di 
 controller and smartctl does not appear to be the correct tool to 
 access the SMART data for the individual disks.  After a little 
 research, I have found the aaccli tool and used it to get the following
information:

 Sadly, that controller does not show you SMART attributes.  This is one of
 the biggest problems with the majority (but not all) of hardware RAID 
 controllers -- they give you no access to disk-level things like SMART.
 FreeBSD has support for such (using CAM's pass(4)), but the driver has
 to support/use it, *and* the card firmware has to support it.  At present,
 Areca, 3Ware, and Promise controllers support such; HighPoint might, but 
 I haven't confirmed it.  Adaptec does not.

 What you showed tells me nothing about SMART, other than the remote
possibility 
 its basing some of its decisions on the general SMART health status, 
 which means jack squat.  I can explain why this is if need be, but it's
 not related to the problem you're having.

Thanks for this additional information. I hadn't understood that there was
far more information behind the simple SMART ok/not ok reported by the PERC
controller.

 Either way, this is just one of many reasons to avoid hardware RAID
controllers if given the choice.

I have seen some mentions of using gvinum and/or gmirror to achieve the
goals of protection from Single Point Of Failure with a single disk, which I
believe is the reason that most people, myself included, have specified
Hardware RAID in their servers. Is this what you mean by avoiding Hardware
Raid? 


 I hope these are SCSI disks you're showing here, otherwise I'm not sure
how the 
 controller is able to get the primary defect count of a SATA or SAS disk.
So, 
 assuming the numbers shown are accurate, then yes, I don't think there's
any 
 disk-level problem.

Yes, they are SCSI disks. Not particularly relevant to this topic, but
interesting: I would have thought that SAS would make the same information
available as SCSI does, as it is a serial bus evolution of SCSI. Is this
thinking incorrect?

 I understand at this point you're running around with your arms in the
air, 
 but you've already confirmed one thing: none of your other systems exhibit

 this problem.  If this is a production environment, step back a moment and

 ask yourself: just how much time is this worth?  It might be better to
just 
 newfs the filesystem and be done with it, especially if this is a
one-time-never-seen-before thing.

 I will wait and see if any other list member has any suggestions for 
 me to try, but I am now leaning toward scrubbing the system. Oh well.

 When you say scrubbing, are you referring to actually formatting/wiping
the system, or are you referring to disk scrubbing?

I meant reformatting and reinstalling, as a way to escape the issue without
spending too much more time on it. I would of course like to understand the
problem so as to know what to avoid in the future, but as you make the point
above, time is money and it is rapidly approaching the point where it isn't
worth any more effort.

Thanks for all your help.

Best Regards,
Brendan Hart

 

__ Information from ESET NOD32 Antivirus, version of virus signature
database 3571 (20081030) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Large discrepancy in reported disk usage on USR partition

2008-10-30 Thread Jeremy Chadwick
On Fri, Oct 31, 2008 at 11:15:15AM +1030, Brendan Hart wrote:
  What you showed tells me nothing about SMART, other than the remote 
  possibility 
  its basing some of its decisions on the general SMART health status, 
  which means jack squat.  I can explain why this is if need be, but it's
  not related to the problem you're having.
 
 Thanks for this additional information. I hadn't understood that there was
 far more information behind the simple SMART ok/not ok reported by the PERC
 controller.

Here's an example of some attributes:

ID# ATTRIBUTE_NAME  FLAG VALUE WORST THRESH TYPE  UPDATED  
WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate 0x000f   200   200   051Pre-fail  Always   
-   0
  3 Spin_Up_Time0x0003   178   175   021Pre-fail  Always   
-   6066
  4 Start_Stop_Count0x0032   100   100   000Old_age   Always   
-   50
  5 Reallocated_Sector_Ct   0x0033   200   200   140Pre-fail  Always   
-   0
  7 Seek_Error_Rate 0x000e   200   200   051Old_age   Always   
-   0
  9 Power_On_Hours  0x0032   085   085   000Old_age   Always   
-   11429
 10 Spin_Retry_Count0x0012   100   253   051Old_age   Always   
-   0
 11 Calibration_Retry_Count 0x0012   100   253   051Old_age   Always   
-   0
 12 Power_Cycle_Count   0x0032   100   100   000Old_age   Always   
-   48
192 Power-Off_Retract_Count 0x0032   200   200   000Old_age   Always   
-   33
193 Load_Cycle_Count0x0032   200   200   000Old_age   Always   
-   50
194 Temperature_Celsius 0x0022   117   100   000Old_age   Always   
-   33
196 Reallocated_Event_Count 0x0032   200   200   000Old_age   Always   
-   0
197 Current_Pending_Sector  0x0012   200   200   000Old_age   Always   
-   0
198 Offline_Uncorrectable   0x0010   200   200   000Old_age   Offline  
-   0
199 UDMA_CRC_Error_Count0x003e   200   200   000Old_age   Always   
-   0
200 Multi_Zone_Error_Rate   0x0008   200   200   051Old_age   Offline  
-   0

You probably now understand why having access to this information is
useful.  :-)  It's very disappointing that so many RAID controllers
don't provide a way to get at this information; the ones which do I am
very thankful for!

  Either way, this is just one of many reasons to avoid hardware RAID
 controllers if given the choice.
 
 I have seen some mentions of using gvinum and/or gmirror to achieve the
 goals of protection from Single Point Of Failure with a single disk, which I
 believe is the reason that most people, myself included, have specified
 Hardware RAID in their servers. Is this what you mean by avoiding Hardware
 Raid? 

More or less.  Hardware RAID has some advantages (I can dig up a mail of
mine long ago outlining what the advantages were), but a lot of the time
the controller acts as more of a hindrance than a benefit.  I personally
feel the negatives outweigh the positives, but each person has different
needs and requirements.  There are some controllers which work very well
and provide great degrees of insights (at a disk level) under FreeBSD,
and those are often what I recommend if someone wants to go that route.

I make it sound like I'm the authoritative voice for what a person
should or should not buy -- I'm not.  I predominantly rely on Intel ICHx
on-board controllers with SATA disks, because ICHx works quite well
under FreeBSD (especially with AHCI).

I personally have no experience with gmirror or gvinum, but I do have
experience with ZFS.  (I'll have a little more experience with gmirror
once I have the time to test some reported problems with gmirror and
high interrupt counts when a disk is hot-swapped).

  I hope these are SCSI disks you're showing here, otherwise I'm not sure how 
  the 
  controller is able to get the primary defect count of a SATA or SAS disk.  
  So, 
  assuming the numbers shown are accurate, then yes, I don't think there's 
  any 
  disk-level problem.

 Yes, they are SCSI disks. Not particularly relevant to this topic, but
 interesting: I would have thought that SAS would make the same information
 available as SCSI does, as it is a serial bus evolution of SCSI. Is this
 thinking incorrect?

I don't have any experience with SAS, so I can't comment on what
features are available on SAS.

Specifically with regards to SMART: historically, SCSI does not provide
the amount of granularity/detail with attributes as ATA/SATA does.  I do
not consider this a negative against SCSI (in case, I very much like
SCSI).  SAS might provide these details, but I don't know, as I don't
have any SAS disks.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making 

RE: Large discrepancy in reported disk usage on USR partition

2008-10-30 Thread Brendan Hart
 #: df -h
 Filesystem  SizeUsed   Avail Capacity  Mounted on
 /dev/aacd0s1a   496M163M 293M36%/
 devfs   1.0K1.0K 0B  100%   /dev
 /dev/aacd0s1e   496M15M  441M3% /tmp
 /dev/aacd0s1f28G25G  1.2G96%/usr
 /dev/aacd0s1d   1.9G429M 1.3G24%/var

 Is this output untruncated? Is df really df or an alias to 'df -t nonfs'?

Yes, it really is the untruncated output of df -h. I also tried the df -t
nonfs and it gives exactly the same output as df. What are you expecting
that is not present in the output ?

 Is it possible that nfs directory got written to /usr at some point in
time? 
 You would only notice this with du if the nfs directory is unmounted.
 Unmount it and ls -al /usr/mountpoint should only give you an empty dir

Bingo!! That is exactly the problem. An NFS mount was hiding a 17G local dir
which had an old copy of the entire NFS mounted dir. I guess it must have
been written incorrectly to this standby server by RSYNC before the NFS
mount was put in place. I will add an exclusion to rsync to make sure it
does not happen again even if the NFS dir is not mounted.

Thank you for your help, you have saved me much time rebuilding this server.

Best Regards,
Brendan Hart

-
Brendan Hart, Development Manager
Strategic Ecommerce Division
Securepay Pty Ltd
Phone: 08-8274-4000
Fax: 08-8274-1400 
 

__ Information from ESET NOD32 Antivirus, version of virus signature
database 3571 (20081030) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Large discrepancy in reported disk usage on USR partition

2008-10-30 Thread Jeremy Chadwick
On Fri, Oct 31, 2008 at 11:50:39AM +1030, Brendan Hart wrote:
  #: df -h
  Filesystem  SizeUsed   Avail Capacity  Mounted on
  /dev/aacd0s1a   496M163M 293M36%/
  devfs   1.0K1.0K 0B  100%   /dev
  /dev/aacd0s1e   496M15M  441M3% /tmp
  /dev/aacd0s1f28G25G  1.2G96%/usr
  /dev/aacd0s1d   1.9G429M 1.3G24%/var
 
  Is this output untruncated? Is df really df or an alias to 'df -t nonfs'?
 
 Yes, it really is the untruncated output of df -h. I also tried the df -t
 nonfs and it gives exactly the same output as df. What are you expecting
 that is not present in the output ?
 
  Is it possible that nfs directory got written to /usr at some point in
 time? 
  You would only notice this with du if the nfs directory is unmounted.
  Unmount it and ls -al /usr/mountpoint should only give you an empty dir
 
 Bingo!! That is exactly the problem. An NFS mount was hiding a 17G local dir
 which had an old copy of the entire NFS mounted dir. I guess it must have
 been written incorrectly to this standby server by RSYNC before the NFS
 mount was put in place. I will add an exclusion to rsync to make sure it
 does not happen again even if the NFS dir is not mounted.
 
 Thank you for your help, you have saved me much time rebuilding this server.

Can either of you outline what exactly happened here?  I'm trying to
figure out how an NFS mount was hiding a 17G local dir, when there's
no NFS mounts shown in the above df output.  This is purely an ignorant
question on my part, but I'm not able to piece together what happened.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Large discrepancy in reported disk usage on USR partition

2008-10-30 Thread Kevin Kinsey

Jeremy Chadwick wrote:

On Fri, Oct 31, 2008 at 11:50:39AM +1030, Brendan Hart wrote:

#: df -h
Filesystem  SizeUsed   Avail Capacity  Mounted on
/dev/aacd0s1a   496M163M 293M36%/
devfs   1.0K1.0K 0B  100%   /dev
/dev/aacd0s1e   496M15M  441M3% /tmp
/dev/aacd0s1f28G25G  1.2G96%/usr
/dev/aacd0s1d   1.9G429M 1.3G24%/var

Is this output untruncated? Is df really df or an alias to 'df -t nonfs'?

Yes, it really is the untruncated output of df -h. I also tried the df -t
nonfs and it gives exactly the same output as df. What are you expecting
that is not present in the output ?


I would have to assume he's looking for an NFS mount ;-)


Is it possible that nfs directory got written to /usr at some point in
time? 

You would only notice this with du if the nfs directory is unmounted.
Unmount it and ls -al /usr/mountpoint should only give you an empty dir



Bingo!! That is exactly the problem. An NFS mount was hiding a 17G local dir
which had an old copy of the entire NFS mounted dir. I guess it must have
been written incorrectly to this standby server by RSYNC before the NFS
mount was put in place. I will add an exclusion to rsync to make sure it
does not happen again even if the NFS dir is not mounted.

Thank you for your help, you have saved me much time rebuilding this server.


Can either of you outline what exactly happened here?  I'm trying to
figure out how an NFS mount was hiding a 17G local dir, when there's
no NFS mounts shown in the above df output.  This is purely an ignorant
question on my part, but I'm not able to piece together what happened.


Well, it would appear that perhaps Mel also guessed right about df
being aliased?  Just my guess, but, as you mention, no nfs mounts
appear.  I may be mistaken, but I think it's also possible to get
into this sort of situation by mounting a local partition on a 
non-empty mountpoint---at least, it happened to me recently.


Kevin Kinsey
--
A triangle which has an angle of 135 degrees is called an obscene
triangle.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: Large discrepancy in reported disk usage on USR partition

2008-10-30 Thread Brendan Hart
Now that you mention it, it *is* strange that the NFS mount was not listed
by the df function.

Try again after a fresh reboot:

#: df -h
Filesystem SizeUsed   Avail Capacity  Mounted on
/dev/aacd0s1a  496M176M280M39%/
devfs  1.0K1.0K  0B   100%/dev
/dev/aacd0s1e  496M 15M441M 3%/tmp
/dev/aacd0s1f   28G4.8G 21G19%/usr
/dev/aacd0s1d  1.9G430M1.3G24%/var
server2:/storage/blah/foo/data/397G103G262G28%
/usr/home/development/mount/foobar

I guess I must have missed the final line when copying the output when I
first posted to the mailing list. And then when I replied Mel, I had already
nmounted the NFS dir when attempting the suggested fix, so it did not show
when I ran df again to double-check, and I did not realize what had
happened.

I apologise for any confusion caused.

Best Regards,
Brendan Hart

-
Brendan Hart, Development Manager
Strategic Ecommerce Division
Securepay Pty Ltd
Phone: 08-8274-4000
Fax: 08-8274-1400 


-Original Message-
From: Jeremy Chadwick [mailto:[EMAIL PROTECTED] 
Sent: Friday, 31 October 2008 12:02 PM
To: Brendan Hart
Cc: 'Mel'; freebsd-questions@freebsd.org
Subject: Re: Large discrepancy in reported disk usage on USR partition

On Fri, Oct 31, 2008 at 11:50:39AM +1030, Brendan Hart wrote:
  #: df -h
  Filesystem  SizeUsed   Avail Capacity  Mounted on
  /dev/aacd0s1a   496M163M 293M36%/
  devfs   1.0K1.0K 0B  100%   /dev
  /dev/aacd0s1e   496M15M  441M3% /tmp
  /dev/aacd0s1f28G25G  1.2G96%/usr
  /dev/aacd0s1d   1.9G429M 1.3G24%/var
 
  Is this output untruncated? Is df really df or an alias to 'df -t
nonfs'?
 
 Yes, it really is the untruncated output of df -h. I also tried the 
 df -t nonfs and it gives exactly the same output as df. What are 
 you expecting that is not present in the output ?
 
  Is it possible that nfs directory got written to /usr at some point 
  in
 time? 
  You would only notice this with du if the nfs directory is unmounted.
  Unmount it and ls -al /usr/mountpoint should only give you an empty 
  dir
 
 Bingo!! That is exactly the problem. An NFS mount was hiding a 17G 
 local dir which had an old copy of the entire NFS mounted dir. I guess 
 it must have been written incorrectly to this standby server by RSYNC 
 before the NFS mount was put in place. I will add an exclusion to 
 rsync to make sure it does not happen again even if the NFS dir is not
mounted.
 
 Thank you for your help, you have saved me much time rebuilding this
server.

Can either of you outline what exactly happened here?  I'm trying to figure
out how an NFS mount was hiding a 17G local dir, when there's no NFS
mounts shown in the above df output.  This is purely an ignorant question on
my part, but I'm not able to piece together what happened.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |



__ Information from ESET NOD32 Antivirus, version of virus signature
database 3571 (20081030) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

 

__ Information from ESET NOD32 Antivirus, version of virus signature
database 3571 (20081030) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Large discrepancy in reported disk usage on USR partition

2008-10-29 Thread Brendan Hart
Hi,

I have inherited some servers running various releases of FreeBSD and I am
having some trouble with the /usr partition on one of these boxen.

The problem is that there appears to be far more space used on the USR
partition than there are actual files on the partition. The utility df -h
reports 25GB used (i.e. nearly the whole partition), but du -x /usr
reports only 7.6GB of files.

I have reviewed the FAQ, particularly item 9.24 The du and df commands show
different amounts of disk space available. What is going on?. However, the
suggested cause of the discrepancy (large files already unlinked but still
held open by active processes), does not appear to be true in this case as
problem is present even after rebooting into single user mode.

#: uname -a
FreeBSD ibisweb4spare.strategicecommerce.com.au 6.1-RELEASE FreeBSD
6.1-RELEASE #0: Sun May  7 04:42:56 UTC 2006
[EMAIL PROTECTED]:/usr/obj/usr/src/sys/SMP  i386

#: df -h
Filesystem  SizeUsed   Avail Capacity  Mounted on
/dev/aacd0s1a   496M163M 293M36%/
devfs   1.0K1.0K 0B  100%   /dev
/dev/aacd0s1e   496M15M  441M3% /tmp
/dev/aacd0s1f28G25G  1.2G96%/usr
/dev/aacd0s1d   1.9G429M 1.3G24%/var

#: du -x -h /usr
2.0K/usr/.snap
 24M/usr/bin
  
  snip
  
584M/usr/ports
140K/usr/lost+found
7.6G/usr


The server is used as a standby machine and a nightly cronjob which uses
RSYNC to make a copy of the /usr partition from a live server. Depending on
how recently the logs have been culled, the Live server has approximately
7-10GB of data on the /usr partition, so I would expect the same size of
data on the standby server.

This may be irrelevant, but the server also has an external data directory
with 11GB mounted via NFS as a directory under the USR partition.

Next, I began to suspect some sort of disk corruption (echoes of the old
days of MSDOS lost cluster chains) and I have attempted to find disk issues
by running fsck, but no issues were reported and the issue was not remedied.
I also tried running fsck in single user mode, again, no improvement.

Can anyone suggest what I can try next?

Best Regards,
Brendan Hart

-
Brendan Hart, Development Manager
Strategic Ecommerce Division
Securepay Pty Ltd
Phone: 08-8274-4000
Fax: 08-8274-1400 

 

__ Information from ESET NOD32 Antivirus, version of virus signature
database 3567 (20081029) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Large discrepancy in reported disk usage on USR partition

2008-10-29 Thread Jeremy Chadwick
On Thu, Oct 30, 2008 at 11:12:32AM +1030, Brendan Hart wrote:
 I have inherited some servers running various releases of FreeBSD and I am
 having some trouble with the /usr partition on one of these boxen.
 
 The problem is that there appears to be far more space used on the USR
 partition than there are actual files on the partition. The utility df -h
 reports 25GB used (i.e. nearly the whole partition), but du -x /usr
 reports only 7.6GB of files.

Have you tried playing with tunefs(8), -m flag?

I can't reproduce this behaviour on any of our systems.

icarus# df -k /usr
Filesystem   1024-blocksUsed Avail Capacity  Mounted on
/dev/ad12s1f   167879968 1973344 152476228 1%/usr
icarus# du -sx /usr
1973344 /usr

eos# df -k /usr
Filesystem  1024-blocksUsedAvail Capacity  Mounted on
/dev/ad0s1f32494668 2261670 27633426 8%/usr
eos# du -sx /usr
2261670 /usr

anubis# df -k /usr
Filesystem  1024-blocksUsedAvail Capacity  Mounted on
/dev/ad4s1f80010344 1809620 71799898 2%/usr
anubis# du -sx /usr
1809620 /usr

horus# df -k /usr
Filesystem  1024-blocksUsedAvail Capacity  Mounted on
/dev/ad4s1f32494668 1608458 28286638 5%/usr
horus# du -sx /usr
1608458 /usr

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: Large discrepancy in reported disk usage on USR partition

2008-10-29 Thread Brendan Hart
Hi,

The space reserved as minfree does not appear to have been changed from the
default setting of 8%. Is your suggestion that I should change it to a
larger value? I don't understand how modifying it now could fix the
situation, but I could be missing something.

The output of tunefs -p /usr is as follows:

#: tunefs -p /usr
tunefs: ACLs: (-a) disabled
tunefs: MAC multilabel: (-l)   disabled
tunefs: soft updates: (-n) enabled
tunefs: maximum blocks per file in a cylinder group: (-e)  2048
tunefs: average file size: (-f)16384
tunefs: average number of files in a directory: (-s)   64
tunefs: minimum percentage of free space: (-m) 8%
tunefs: optimization preference: (-o)  time
tunefs: volume label: (-L)

I have not observed the problem on any of the other ~dozen FreeBSD servers
in our data centre. 

Could the missing space be an indication of hardware disk issues i.e.
physical blocks marked as bad? 

Is it possible on UFS2 for disk space to be allocated but hidden somehow?
(although I have been running the commands such as du -x as superuser)
Similarly, is it possible on UFS2 for disk space to be allocated in lost
cluster chains ?

Best Regards,
Brendan Hart

-Original Message-
From: Jeremy Chadwick [mailto:[EMAIL PROTECTED] 
Sent: Thursday, 30 October 2008 11:50 AM
To: Brendan Hart
Cc: freebsd-questions@freebsd.org
Subject: Re: Large discrepancy in reported disk usage on USR partition

On Thu, Oct 30, 2008 at 11:12:32AM +1030, Brendan Hart wrote:
 I have inherited some servers running various releases of FreeBSD and I am
 having some trouble with the /usr partition on one of these boxen.
 
 The problem is that there appears to be far more space used on the USR
 partition than there are actual files on the partition. The utility df
-h
 reports 25GB used (i.e. nearly the whole partition), but du -x /usr
 reports only 7.6GB of files.

Have you tried playing with tunefs(8), -m flag?

I can't reproduce this behaviour on any of our systems.

icarus# df -k /usr
Filesystem   1024-blocksUsed Avail Capacity  Mounted on
/dev/ad12s1f   167879968 1973344 152476228 1%/usr
icarus# du -sx /usr
1973344 /usr

eos# df -k /usr
Filesystem  1024-blocksUsedAvail Capacity  Mounted on
/dev/ad0s1f32494668 2261670 27633426 8%/usr
eos# du -sx /usr
2261670 /usr

anubis# df -k /usr
Filesystem  1024-blocksUsedAvail Capacity  Mounted on
/dev/ad4s1f80010344 1809620 71799898 2%/usr
anubis# du -sx /usr
1809620 /usr

horus# df -k /usr
Filesystem  1024-blocksUsedAvail Capacity  Mounted on
/dev/ad4s1f32494668 1608458 28286638 5%/usr
horus# du -sx /usr
1608458 /usr

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |



__ Information from ESET NOD32 Antivirus, version of virus signature
database 3567 (20081029) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

 

__ Information from ESET NOD32 Antivirus, version of virus signature
database 3567 (20081029) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Large discrepancy in reported disk usage on USR partition

2008-10-29 Thread Jeremy Chadwick
On Thu, Oct 30, 2008 at 12:11:58PM +1030, Brendan Hart wrote:
 The space reserved as minfree does not appear to have been changed from the
 default setting of 8%.

Okay, then that's likely not the problem.

 Is your suggestion that I should change it to a larger value?

That would just make your problem worse.  :-)

 I don't understand how modifying it now could fix the situation, but I
 could be missing something.

Well, the feature I described isn't what's causing your problem, but to
clarify: if you change the percentage, it applies immediately.  I read
I don't understand how modifying it now could fix ... to mean isn't
this option applied during newfs?

 I have not observed the problem on any of the other ~dozen FreeBSD servers
 in our data centre. 

Unless someone more clueful chimes in with better hints, the obvious
choice here is going to be recreate the filesystem.  I'd tell you
something like try using ffsinfo(8)?, but I've never used the tool,
so very little of the output will make sense to me.

 Could the missing space be an indication of hardware disk issues i.e.
 physical blocks marked as bad? 

The simple answer is no, bad blocks would not cause what you're seeing.
smartctl -a /dev/disk will help you determine if there's evidence the
disk is in bad shape.  I can help you with reading SMART stats if need
be.

Since you booted single-user and presumably ran fsck -f /usr, and
nothing came back, I'm left to believe this isn't filesystem corruption.

 Is it possible on UFS2 for disk space to be allocated but hidden somehow?
 (although I have been running the commands such as du -x as superuser)

That's exactly what the above tunefs parameter describes.

 Similarly, is it possible on UFS2 for disk space to be allocated in lost
 cluster chains ?

I don't know what this means.  Someone more clueful will have to answer.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: Large discrepancy in reported disk usage on USR partition

2008-10-29 Thread Brendan Hart
On Thu 30/10/2008 12:25 PM, Jeremy Chadwick wrote:
 Could the missing space be an indication of hardware disk issues i.e.
 physical blocks marked as bad? 

The simple answer is no, bad blocks would not cause what you're seeing.
smartctl -a /dev/disk will help you determine if there's evidence the disk
is in bad shape.  I can help you with reading SMART stats if need be.

I took a look at using the smart tools as you suggested, but have now found
that the disk in question is a RAID1 set on a DELL PERC 3/Di controller and
smartctl does not appear to be the correct tool to access the SMART data for
the individual disks. After a little research, I have found the aaccli tool
and used it to get the following information:

AAC0 disk show smart
Executing: disk show smart
SmartMethod of Enable
Capable  Informational Exception  Performance  Error
B:ID:L  Device   Exceptions(MRIE)  ControlEnabled  Count
--  ---    -  ---  --
0:00:0 Y6 Y   N 0
0:01:0 Y6 Y   N 0

AAC0 disk show defects 00
Executing: disk show defects (ID=0)
Number of PRIMARY defects on drive: 285
Number of GROWN defects on drive: 0

AAC0 disk show defects 01
Executing: disk show defects (ID=1)
Number of PRIMARY defects on drive: 193
Number of GROWN defects on drive: 0


This output doesn't seem to indicate existing physical issues on the disks. 

 Since you booted single-user and presumably ran fsck -f /usr, and nothing
came back, I'm left to believe this isn't filesystem corruption.

Yes, this is the command I tried when I went into the data centre yesterday,
and yes, nothing came back. 

I have done some additional digging and noticed that there is a /usr/.snap
folder present. ls -al shows no content however. Some quick searching
shows this could possibly be part of a UFS snapshot... I wonder if partition
snapshots might be the cause of my major disk space loss. Some old message
group posts suggest that UFS snapshots were dangerously flakey on Release
6.1, so I would hope that my predecessors were not using them however...  Do
you know anything about snapshots, and how I could see what/if any/ space is
used by snapshots?

I also took a look to see if the issue could be something like running out
of inodes, But this does't seem to be the case:

#: df -ih /usr
Filesystem   SizeUsed   Avail Capacity iused   ifree %iused  Mounted
on
/dev/aacd0s1f 28G 25G1.1G96%  708181 3107241   19%   /usr


BTW Jeremy, thanks for your help thus far.

I will wait and see if any other list member has any suggestions for me to
try, but I am now leaning toward scrubbing the system. Oh well.

Best Regards,
Brendan Hart

-
Brendan Hart, Development Manager
Strategic Ecommerce Division
Securepay Pty Ltd
Phone: 08-8274-4000
Fax: 08-8274-1400 
 

__ Information from ESET NOD32 Antivirus, version of virus signature
database 3568 (20081030) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Large discrepancy in reported disk usage on USR partition

2008-10-29 Thread Jeremy Chadwick
On Thu, Oct 30, 2008 at 02:04:36PM +1030, Brendan Hart wrote:
 On Thu 30/10/2008 12:25 PM, Jeremy Chadwick wrote:
  Could the missing space be an indication of hardware disk issues i.e.
  physical blocks marked as bad? 
 
 The simple answer is no, bad blocks would not cause what you're seeing.
 smartctl -a /dev/disk will help you determine if there's evidence the disk
 is in bad shape.  I can help you with reading SMART stats if need be.
 
 I took a look at using the smart tools as you suggested, but have now found
 that the disk in question is a RAID1 set on a DELL PERC 3/Di controller and
 smartctl does not appear to be the correct tool to access the SMART data for
 the individual disks.  After a little research, I have found the aaccli tool
 and used it to get the following information:

Sadly, that controller does not show you SMART attributes.  This is one
of the biggest problems with the majority (but not all) of hardware RAID
controllers -- they give you no access to disk-level things like SMART.
FreeBSD has support for such (using CAM's pass(4)), but the driver has
to support/use it, *and* the card firmware has to support it.  At
present, Areca, 3Ware, and Promise controllers support such; HighPoint
might, but I haven't confirmed it.  Adaptec does not.

What you showed tells me nothing about SMART, other than the remote
possibility its basing some of its decisions on the general SMART
health status, which means jack squat.  I can explain why this is if
need be, but it's not related to the problem you're having.

Either way, this is just one of many reasons to avoid hardware RAID
controllers if given the choice.

 AAC0 disk show defects 00
 Executing: disk show defects (ID=0)
 Number of PRIMARY defects on drive: 285
 Number of GROWN defects on drive: 0
 
 AAC0 disk show defects 01
 Executing: disk show defects (ID=1)
 Number of PRIMARY defects on drive: 193
 Number of GROWN defects on drive: 0
 
 This output doesn't seem to indicate existing physical issues on the disks. 

I hope these are SCSI disks you're showing here, otherwise I'm not sure
how the controller is able to get the primary defect count of a SATA or
SAS disk.  So, assuming the numbers shown are accurate, then yes, I
don't think there's any disk-level problem.

 I have done some additional digging and noticed that there is a /usr/.snap
 folder present. ls -al shows no content however. Some quick searching
 shows this could possibly be part of a UFS snapshot...

Correct; the .snap directory is used for UFS2 snapshots and
mksnap_ffs(8) (which is also the program dump -L uses).

 I wonder if partition snapshots might be the cause of my major disk
 space loss.

Your /usr/.snap directory is empty; there are no snapshots.  That said,
are you actually making filesystem snapshots using dump or mksnap_ffs?
If not, then you're barking up the wrong tree.  :-)

 I also took a look to see if the issue could be something like running out
 of inodes, But this does't seem to be the case:
 
 #: df -ih /usr
 Filesystem   SizeUsed   Avail Capacity iused   ifree %iused  Mounted
 on
 /dev/aacd0s1f 28G 25G1.1G96%  708181 3107241   19%   /usr

inodes != disk space, but I'm pretty sure you know that.

I understand at this point you're running around with your arms in the
air, but you've already confirmed one thing: none of your other systems
exhibit this problem.  If this is a production environment, step back a
moment and ask yourself: just how much time is this worth?  It might
be better to just newfs the filesystem and be done with it, especially
if this is a one-time-never-seen-before thing.

 I will wait and see if any other list member has any suggestions for me to
 try, but I am now leaning toward scrubbing the system. Oh well.

When you say scrubbing, are you referring to actually formatting/wiping
the system, or are you referring to disk scrubbing?

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: SQUID 2.6 disk usage didn't grow HELP

2007-11-02 Thread Tek Bahadur Limbu

Hi Narek,


Narek Gharibyan wrote:

I set squid 2.6 transparent proxy with default settings on P4 2000 RAM 512/
80GB HDD. I change only


Which exact 2.6 version of Squid are you using? Which FreeBSD version 
are you running on your machine?





 


cache_mem 128 MB

 


cache_dir ufs /usr/local/squid/cache 40960 16 256

 


Squid works normally and do caching. It takes 300Mb RAM, and about 3GB HDD
space, but it DOESN'T use more space. Squid works about 15 days without any
restart and it use only 3GB space and the cache size didn't grow. Is it
normal? I want to use more HDD cache Please advice


That's strange. Can you post the full output of squidclient mgr:info 
and squidclient mgr:storedir ?





 


Thank you in advance



Thanking you...

 


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]






--

With best regards and good wishes,

Yours sincerely,

Tek Bahadur Limbu

System Administrator

(TAG/TDG Group)
Jwl Systems Department

Worldlink Communications Pvt. Ltd.

Jawalakhel, Nepal

http://www.wlink.com.np

http://teklimbu.wordpress.com
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


SQUID 2.6 disk usage didn't grow HELP

2007-10-15 Thread Narek Gharibyan
I set squid 2.6 transparent proxy with default settings on P4 2000 RAM 512/
80GB HDD. I change only

 

cache_mem 128 MB

 

cache_dir ufs /usr/local/squid/cache 40960 16 256

 

Squid works normally and do caching. It takes 300Mb RAM, and about 3GB HDD
space, but it DOESN'T use more space. Squid works about 15 days without any
restart and it use only 3GB space and the cache size didn't grow. Is it
normal? I want to use more HDD cache Please advice

 

Thank you in advance

 

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


What is my disk usage?

2007-08-08 Thread Janos Dohanics

du is acting strange on my system:

# du /usr/X11R6
4   /usr/X11R6/share/locale
8   /usr/X11R6/share
12  /usr/X11R6

# du -h /usr/X11R6
2.0K/usr/X11R6/share/locale
4.0K/usr/X11R6/share
6.0K/usr/X11R6

# du -k /usr/X11R6
2   /usr/X11R6/share/locale
4   /usr/X11R6/share
6   /usr/X11R6

This seems to be happening only after I have sudo'd myself. du reports
consistent numbers if I run it as myself or if I su first.

This is a  FreeBSD 6.2-STABLE system with snapshots enabled.

Any ideas?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: What is my disk usage?

2007-08-08 Thread Eric Crist

On Aug 8, 2007, at 11:21 AMAug 8, 2007, Janos Dohanics wrote:



du is acting strange on my system:

# du /usr/X11R6
4   /usr/X11R6/share/locale
8   /usr/X11R6/share
12  /usr/X11R6

# du -h /usr/X11R6
2.0K/usr/X11R6/share/locale
4.0K/usr/X11R6/share
6.0K/usr/X11R6

# du -k /usr/X11R6
2   /usr/X11R6/share/locale
4   /usr/X11R6/share
6   /usr/X11R6

This seems to be happening only after I have sudo'd myself. du reports
consistent numbers if I run it as myself or if I su first.

This is a  FreeBSD 6.2-STABLE system with snapshots enabled.



I don't get it, what's wrong?  Things look normal to me...

Eric Crist
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: What is my disk usage?

2007-08-08 Thread Chuck Swiger

On Aug 8, 2007, at 9:21 AM, Janos Dohanics wrote:

du is acting strange on my system:

# du /usr/X11R6
4   /usr/X11R6/share/locale
8   /usr/X11R6/share
12  /usr/X11R6

# du -h /usr/X11R6
2.0K/usr/X11R6/share/locale
4.0K/usr/X11R6/share
6.0K/usr/X11R6

# du -k /usr/X11R6
2   /usr/X11R6/share/locale
4   /usr/X11R6/share
6   /usr/X11R6

This seems to be happening only after I have sudo'd myself. du reports
consistent numbers if I run it as myself or if I su first.

This is a  FreeBSD 6.2-STABLE system with snapshots enabled.

Any ideas?


Presumably the accounts which have consistent results have something  
like:


setenv  BLOCKSIZE K

...or:

export BLOCKSIZE=K

...configured in their shell.

--
-Chuck

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: What is my disk usage?

2007-08-08 Thread Janos Dohanics

On 8/8/2007, Chuck Swiger [EMAIL PROTECTED] wrote:

On Aug 8, 2007, at 9:21 AM, Janos Dohanics wrote:
 du is acting strange on my system:

 # du /usr/X11R6
 4   /usr/X11R6/share/locale
 8   /usr/X11R6/share
 12  /usr/X11R6

 # du -h /usr/X11R6
 2.0K/usr/X11R6/share/locale
 4.0K/usr/X11R6/share
 6.0K/usr/X11R6

 # du -k /usr/X11R6
 2   /usr/X11R6/share/locale
 4   /usr/X11R6/share
 6   /usr/X11R6

 This seems to be happening only after I have sudo'd myself. du reports
 consistent numbers if I run it as myself or if I su first.

 This is a  FreeBSD 6.2-STABLE system with snapshots enabled.

 Any ideas?

Presumably the accounts which have consistent results have something
like:

 setenv  BLOCKSIZE K

...or:

 export BLOCKSIZE=K

...configured in their shell.

--
-Chuck

Well, this is all I have in .bash_profile:

$ cat .bash_profile
PS1=[EMAIL PROTECTED] \w]\\$ 
export EDITOR=vim

The issue is that du reports twice as much disk usage as du -h or du -k,
and I have no clue why...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: What is my disk usage?

2007-08-08 Thread [EMAIL PROTECTED]
On 08/08/2007, Janos Dohanics [EMAIL PROTECTED] wrote:

 On 8/8/2007, Chuck Swiger [EMAIL PROTECTED] wrote:

 On Aug 8, 2007, at 9:21 AM, Janos Dohanics wrote:
  du is acting strange on my system:
 
  # du /usr/X11R6
  4   /usr/X11R6/share/locale
  8   /usr/X11R6/share
  12  /usr/X11R6
 
  # du -h /usr/X11R6
  2.0K/usr/X11R6/share/locale
  4.0K/usr/X11R6/share
  6.0K/usr/X11R6
 
  # du -k /usr/X11R6
  2   /usr/X11R6/share/locale
  4   /usr/X11R6/share
  6   /usr/X11R6
 
  This seems to be happening only after I have sudo'd myself. du reports
  consistent numbers if I run it as myself or if I su first.
 
  This is a  FreeBSD 6.2-STABLE system with snapshots enabled.
 
  Any ideas?
 
 Presumably the accounts which have consistent results have something
 like:
 
  setenv  BLOCKSIZE K
 
 ...or:
 
  export BLOCKSIZE=K
 
 ...configured in their shell.
 
 --
 -Chuck

 Well, this is all I have in .bash_profile:

 $ cat .bash_profile
 PS1=[EMAIL PROTECTED] \w]\\$ 
 export EDITOR=vim

 The issue is that du reports twice as much disk usage as du -h or du -k,
 and I have no clue why...

Chuck is right:  the twice as much is du
reporting in the default 512 byte blocks.
You probably have the BLOCKSIZE=K set
in either ~/.profile or /etc/profile.

If you recently upgraded sudo, you should
take note that env_reset is now the default.
You can return to the old behaviour by adding
a line like:
Defaults !env_reset
to your sudoers file.  It might be more secure
to not do this with a Defaults line, though.

man 5 sudoers for more information.

-- 
--
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: What is my disk usage?

2007-08-08 Thread Janos Dohanics

On 8/8/2007, Don Hinton [EMAIL PROTECTED] wrote:

Janos Dohanics writes:
 
  On 8/8/2007, Chuck Swiger [EMAIL PROTECTED] wrote:
 
  On Aug 8, 2007, at 9:21 AM, Janos Dohanics wrote:
   du is acting strange on my system:
  
   # du /usr/X11R6
   4   /usr/X11R6/share/locale
   8   /usr/X11R6/share
   12  /usr/X11R6
  
   # du -h /usr/X11R6
   2.0K/usr/X11R6/share/locale
   4.0K/usr/X11R6/share
   6.0K/usr/X11R6
  
   # du -k /usr/X11R6
   2   /usr/X11R6/share/locale
   4   /usr/X11R6/share
   6   /usr/X11R6
  
   This seems to be happening only after I have sudo'd myself. du reports
   consistent numbers if I run it as myself or if I su first.
  
   This is a  FreeBSD 6.2-STABLE system with snapshots enabled.
  
   Any ideas?
  
  Presumably the accounts which have consistent results have something
  like:
  
   setenv  BLOCKSIZE K
  
  ...or:
  
   export BLOCKSIZE=K
  
  ...configured in their shell.
  
  --
  -Chuck
 
  Well, this is all I have in .bash_profile:
 
  $ cat .bash_profile
  PS1=[EMAIL PROTECTED] \w]\\$ 
  export EDITOR=vim
 
  The issue is that du reports twice as much disk usage as du -h or du -k,
  and I have no clue why...

$ echo $BLOCKSIZE
K
$ mkdir test
$ du test
2   test
$ du -k test
2   test
$ du -h test
2,0Ktest
$ unset BLOCKSIZE
$ du test
4   test

 BLOCKSIZE  If the environment variable BLOCKSIZE is set, and the -k
option is not specified, the block counts will be displayed in
units of that size block.  If BLOCKSIZE is not set, and the -k
option is not specified, the block counts will be displayed in
512-byte blocks.

hth...
don

Thank you... sorry for the noise.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Mystery of increasing disk usage

2007-08-03 Thread Jamie Penman-Smithson
I'm having big problems trying to pin down the cause of spiralling
disk usage on a partition.

du -sh shows that /usr is using 5.9 GB:
$ du -shL /usr
5.9G/usr

However, df shows:

Filesystem SizeUsed   Avail Capacity  Mounted on
/dev/ad4s1f 47G 43G131M   100%/usr
[...]

It seems to be eating 3 MB roughly every 4-5 minutes. However,
repeated uses of du don't show any increased usage. It only appears in
df.

defiant:/usr$ du -cksmxL * | sort -rn
6042total
3015home
965 obj
777 local
770 jail
376 share
36  lib
32  X11R6
28  bin
19  libexec
15  sbin
15  include
1   tmp
1   ports
1   openssl
1   libdata
1   games
1   compat

My first thought is that the du binary is compromised, but I thought
that I may be missing something blindingly obvious.

Thanks,

-- 
-Jamie L. Penman-Smithson [EMAIL PROTECTED]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Mystery of increasing disk usage

2007-08-03 Thread Bill Moran
Jamie Penman-Smithson [EMAIL PROTECTED] wrote:

 I'm having big problems trying to pin down the cause of spiralling
 disk usage on a partition.
 
 du -sh shows that /usr is using 5.9 GB:
 $ du -shL /usr
 5.9G/usr
 
 However, df shows:
 
 Filesystem SizeUsed   Avail Capacity  Mounted on
 /dev/ad4s1f 47G 43G131M   100%/usr
 [...]
 
 It seems to be eating 3 MB roughly every 4-5 minutes. However,
 repeated uses of du don't show any increased usage. It only appears in
 df.
 
 defiant:/usr$ du -cksmxL * | sort -rn
 6042total
 3015home
 965 obj
 777 local
 770 jail
 376 share
 36  lib
 32  X11R6
 28  bin
 19  libexec
 15  sbin
 15  include
 1   tmp
 1   ports
 1   openssl
 1   libdata
 1   games
 1   compat
 
 My first thought is that the du binary is compromised, but I thought
 that I may be missing something blindingly obvious.

If I remember correctly, the most common reason for this is files that
have been deleted, but have not had all references to them closed (i.e.
file descriptors).

For example, program creates a temporary file, then deletes it but does
not _close_ it.  This means the filesystem can't free up the used blocks
yet.  There's no directory entry, so du doesn't see the usage.

One way to tell would be to reboot the system.  If it comes up with
du and df agreeing, then this problem is occurring somewhere.  The
trickier step may be to figure out what program is causing it.

-- 
Bill Moran
http://www.potentialtech.com
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Mystery of increasing disk usage

2007-08-03 Thread Peter Boosten
Bill Moran wrote:
 
 If I remember correctly, the most common reason for this is files that
 have been deleted, but have not had all references to them closed (i.e.
 file descriptors).
 
You remember correctly: I've seen this happening with Apache logfiles
that had been deleted but Apache didn't know about that...

Peter
-- 
http://www.boosten.org
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Mystery of increasing disk usage

2007-08-03 Thread Peter Boosten


Peter Boosten wrote:
 Bill Moran wrote:
 If I remember correctly, the most common reason for this is files that
 have been deleted, but have not had all references to them closed (i.e.
 file descriptors).

 You remember correctly: I've seen this happening with Apache logfiles
 that had been deleted but Apache didn't know about that...
 

A solution might be searching with fstat or lsof...

Peter
-- 
http://www.boosten.org
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


hard disk usage monitoring

2007-02-15 Thread Peter
I am looking for a tool to allow a windows XP client to monitor the disk 
usage (basically the % used over time, how much space is left, etc) on 
a FreeBSD file server.  I will have samba and webmin installed already.
I've looked at some webmin modules but they seem very archaic.

PM
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: hard disk usage monitoring

2007-02-15 Thread Drew Sanford

Peter wrote:
I am looking for a tool to allow a windows XP client to monitor the disk 
usage (basically the % used over time, how much space is left, etc) on 
a FreeBSD file server.  I will have samba and webmin installed already.

I've looked at some webmin modules but they seem very archaic.

PM
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


You might consider something like MRTG, or some other software that 
would run on the windows machine to interact with SNMP on the FreeBSD box.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: hard disk usage monitoring

2007-02-15 Thread Derek Ragona

You can use bigsister and monitor the remote and local diskusage.

-Derek


At 01:22 PM 2/15/2007, Peter wrote:

I am looking for a tool to allow a windows XP client to monitor the disk
usage (basically the % used over time, how much space is left, etc) on
a FreeBSD file server.  I will have samba and webmin installed already.
I've looked at some webmin modules but they seem very archaic.

PM
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


/usr/disk usage

2005-12-08 Thread Grant Peel

Hi all,

Recently installed 6.0 on a new server. Never had a problem with a /usr FS 
at 2.0 Gig before, but this one seems to be filling up fast. make clean 
already done on ports, what else am I missing here?


DOnt really want to delete source, but what else can be removed?

s1# du -h -d1
2.0K./.snap
24M./bin
13M./include
31M./lib
92K./libdata
15M./libexec
248M./local
13M./sbin
183M./share
411M./src
335M./ports
126M./compat
2.0K./games
2.0K./obj
23M./X11R6
1.4G.
s1#

Thanks all,

-GRant


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: /usr/disk usage

2005-12-08 Thread Kris Kennaway
On Thu, Dec 08, 2005 at 11:41:00AM -0500, Grant Peel wrote:
 Hi all,
 
 Recently installed 6.0 on a new server. Never had a problem with a /usr FS 
 at 2.0 Gig before, but this one seems to be filling up fast. make clean 
 already done on ports, what else am I missing here?
 
 DOnt really want to delete source, but what else can be removed?
 
 s1# du -h -d1
 2.0K./.snap
 24M./bin
 13M./include
 31M./lib
 92K./libdata
 15M./libexec
 248M./local
 13M./sbin
 183M./share
 411M./src
 335M./ports
 126M./compat
 2.0K./games
 2.0K./obj
 23M./X11R6
 1.4G.

That all seems about normal to me.  All you can do is

* Add more space
* Install fewer ports
* Delete src or ports

Kris


pgpRXrJ7U2atn.pgp
Description: PGP signature


Re: /usr/disk usage

2005-12-08 Thread Svein Halvor Halvorsen
On 12/8/05, Grant Peel [EMAIL PROTECTED] wrote:
 Recently installed 6.0 on a new server. Never had a problem with a /usr FS
 at 2.0 Gig before, but this one seems to be filling up fast. make clean
 already done on ports, what else am I missing here?

 DOnt really want to delete source, but what else can be removed?
:
 335M./ports

You can delete files under /usr/ports/distfiles/
If you need to recompile a port sometime it will be downloaded again.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Gathering statistics on disk usage

2005-10-15 Thread Josh Paetzel
I am trying to set up mrtg to graph disk usage.  I've tried using the 
output of iostat to provide me with usage in MB/s.  The problem with 
this is that moving data from disk to disk on the system causes the 
usage to jump to around 30MB/s.  Even with mrtg configured to draw 
the graphs logarithmically they basically blow up and the normal 
transfers are not really visable.  systat -vm gives statistics on 
disk usage  with a percent busy field.  This stat would be easier to 
graph and I would like to use it.  My problem is that I can't seem to 
extract the output of systat properly.  I've tried doing systat -vm | 
tail -n -1 and that doesn't work.  I've also tried systat -vm  
somefile.txt and that doesn't work.  There doesn't seem to be a way 
to get systat to run once and then quit either.

Can anyone think of a way to either capture systat's output or 
recommend a utility that will give me a % busy output?  I've tried 
iostat without success.
 
-- 
Thanks,

Josh Paetzel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Gathering statistics on disk usage

2005-10-15 Thread Dan Nelson
In the last episode (Oct 15), Josh Paetzel said:
 I am trying to set up mrtg to graph disk usage.  I've tried using the
 output of iostat to provide me with usage in MB/s.  The problem with
 this is that moving data from disk to disk on the system causes the
 usage to jump to around 30MB/s.  Even with mrtg configured to draw
 the graphs logarithmically they basically blow up and the normal
 transfers are not really visable.  systat -vm gives statistics on
 disk usage with a percent busy field.  This stat would be easier to
 graph and I would like to use it.  My problem is that I can't seem to
 extract the output of systat properly.  I've tried doing systat -vm |
 tail -n -1 and that doesn't work.  I've also tried systat -vm 
 somefile.txt and that doesn't work.  There doesn't seem to be a way
 to get systat to run once and then quit either.
 
 Can anyone think of a way to either capture systat's output or
 recommend a utility that will give me a % busy output?  I've tried
 iostat without success.

If you apply the patch at
http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/68840, you will be able
to get %busy stats out of iostat.

You can also try installing net-snmp and polling the diskIOLA5 value
for the disk, but on my system at least, the values don't seem to make
sense (I have seen numbers from -2546 to 3000).

-- 
Dan Nelson
[EMAIL PROTECTED]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Gathering statistics on disk usage

2005-10-15 Thread Josh Paetzel
 If you apply the patch at
 http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/68840, you will be
 able to get %busy stats out of iostat.


Thanks for your quick reply.  Unfortunately your patch does not apply 
cleanly to a 4.11-STABLE box.  I can supply iostat.c.rej if you want 
it.  I also tried it on a 5.4-RELENG-p7 box and it failed there as 
well.

-- 
Thanks,

Josh Paetzel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Gathering statistics on disk usage

2005-10-15 Thread Dan Nelson
In the last episode (Oct 15), Josh Paetzel said:
  If you apply the patch at
  http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/68840, you will be
  able to get %busy stats out of iostat.
 
 Thanks for your quick reply.  Unfortunately your patch does not apply
 cleanly to a 4.11-STABLE box.  I can supply iostat.c.rej if you want
 it.  I also tried it on a 5.4-RELENG-p7 box and it failed there as
 well.

It definitely should have applied cleanly on 5.4.  I just tested it.
Try downloading the Raw PR link at the bottom of the page; that will
remove any html-escaping.  The patch won't work on 4.x because the
devstat interface got overhauled between 4.x and 5.x.

-- 
Dan Nelson
[EMAIL PROTECTED]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Gathering statistics on disk usage

2005-10-15 Thread Josh Paetzel
 It definitely should have applied cleanly on 5.4.  I just tested
 it. Try downloading the Raw PR link at the bottom of the page;
 that will remove any html-escaping.  The patch won't work on 4.x
 because the devstat interface got overhauled between 4.x and 5.x.

All right, I get the point hat for this one.  You're right, it works 
fine on 5.4 for me now.

-- 
Thanks,

Josh Paetzel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Monitor Disk Usage (Unusual Load Avgs)

2004-08-13 Thread Steven Adams
Hi,

Server specs

Dual p4 xeon 2.4 (4virtual cpus)
1gig ecc ram
5x 36gig 10k rpm scsi on a ami megaraid

I only host a few web sites on this server which at the most peak hour of
times there is only about 6-7%cpu usage. For some reason my load avg's will
jump from 0.05 to 0.98 even to 1.50 when the cpu is only using 3%.

I am thinking something is using the hard drive as I have load avg peaks of
6.0-7.0.

I want to find out what is causing this as im curious to why they get so
high. 

Does anyone know how to find out what running processes are using the
harddrive or something like that??

Also how do I check if DMA mode is enabled, I know there is a hdparm in
linux but I cant find anything like that for freebsd..

Thanks for you help
Steve


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Monitor Disk Usage (Unusual Load Avgs)

2004-08-13 Thread Kevin D. Kinsey, DaleCo, S.P.
Steven Adams wrote:
Hi,
Server specs
Dual p4 xeon 2.4 (4virtual cpus)
1gig ecc ram
5x 36gig 10k rpm scsi on a ami megaraid
I only host a few web sites on this server which at the most peak hour of
times there is only about 6-7%cpu usage. For some reason my load avg's will
jump from 0.05 to 0.98 even to 1.50 when the cpu is only using 3%.
I am thinking something is using the hard drive as I have load avg peaks of
6.0-7.0.
I want to find out what is causing this as im curious to why they get so
high. 

Does anyone know how to find out what running processes are using the
harddrive or something like that??
Also how do I check if DMA mode is enabled, I know there is a hdparm in
linux but I cant find anything like that for freebsd..
Thanks for you help
Steve
 

As for that last, I'm sure there are probably several
ways, but I'm a simpleton.  Why not:
% dmesg | grep DMA
atapci0: SiS 962/963 UDMA133 controller port 0x4000-0x400f,0x374-0x377,
  0x170-0x177,0x3f4-0x3f7,0x1f0-0x1f7 at device 2.5 on pci0
ad0: 38166MB ST340014A [77545/16/63] at ata0-master UDMA100
Hrmm, I need to see if my disk'll go faster ... ;-)
Kevin Kinsey
PS  Incidentally, what's up with this?
% finger [EMAIL PROTECTED]
[freebsd.org]
finger: drift: no such user
I'm leaving that address in, just in case something's
not quite right with finger(1)*, but whassup if it's
*correct*??
(*which is entirely possible, I suppose)
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Monitor Disk Usage (Unusual Load Avgs)

2004-08-13 Thread token
Steve,

  There's the obligatory 'ps -ax' to see what's running. You can also
run 'top' to get a constantly updated display of processes.   Some
other stuff you may want to look around with is 'systat' .  Just
running the command doesn't show a whole lot but with various options
and such you can pull some useful info, check the man page.  Something
else is 'lsof' which lists open files and such, can help you get an
idea of what's open and running.
You can also run 'man -k stat' and find lots of other goodies.  

To find out what DMA mode is running, check your dmesg.   
'dmesg | grep DMA'

While I can't provide a specific answer to your questions I've pointed
out some things that may help you find what you're looking for.   Let
us know what you find.

--chip

On Fri, 13 Aug 2004 23:00:19 +1000, Steven Adams [EMAIL PROTECTED] wrote:
 Hi,
 
 Server specs
 
 Dual p4 xeon 2.4 (4virtual cpus)
 1gig ecc ram
 5x 36gig 10k rpm scsi on a ami megaraid
 
 I only host a few web sites on this server which at the most peak hour of
 times there is only about 6-7%cpu usage. For some reason my load avg's will
 jump from 0.05 to 0.98 even to 1.50 when the cpu is only using 3%.
 
 I am thinking something is using the hard drive as I have load avg peaks of
 6.0-7.0.
 
 I want to find out what is causing this as im curious to why they get so
 high.
 
 Does anyone know how to find out what running processes are using the
 harddrive or something like that??
 
 Also how do I check if DMA mode is enabled, I know there is a hdparm in
 linux but I cant find anything like that for freebsd..
 
 Thanks for you help
 Steve
 
 ___
 [EMAIL PROTECTED] mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Checking Partition/User disk usage?

2004-06-05 Thread Matthew Seaman
On Fri, Jun 04, 2004 at 08:18:32PM -0700, Charlie La Mothe wrote:
 This is a pretty simple question, I'm just looking for tools that report
 back disk or user disk usage.
 
  
 
 I remember these commands, but I can't remember what they are called

df(1)
du(1)
repquota(1)

Obviously you'll need to have set up quotas before that last command
will do anything.

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.   26 The Paddocks
  Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey Marlow
Tel: +44 1628 476614  Bucks., SL7 1TH UK


pgprg4FZiVtQE.pgp
Description: PGP signature


Checking Partition/User disk usage?

2004-06-04 Thread Charlie La Mothe
This is a pretty simple question, I'm just looking for tools that report
back disk or user disk usage.

 

I remember these commands, but I can't remember what they are called

 

 

Thanks, charlie

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Disk Usage

2004-05-05 Thread anubis
On Wed, 5 May 2004 10:38 am, Lowell Gilbert wrote:
 Michael Conlen [EMAIL PROTECTED] writes:
  Any ideas what would cause the df -k and du -k discrepancy?

 FAQ entry:
The du and df commands show different amounts of disk space
 available. What is going on?
 http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/disks.html#DU-
VS-DF ___


Ahh the all encompasing Freebsd documentation.  Im sure the meaning of 
life is hidden in there somewhere...
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Disk Usage

2004-05-04 Thread Michael Conlen
I have a NFS server running FreeBSD-4.9-RELEASE. It's run fine for 
several months with five FreeBSD 4.9 systems mounting it's filesystems. 
Suddenly something started using disk space at the rate of 10 GB/hour 
on one of the filesystems (which has exported directories). The catch 
is that a du -k shows a total usage for that file system of much less 
than df -k. du -k essentially shows the disk usage before the available 
space started to disappear! Normally I'd presume someone's hiding files 
under a mount point when I see this but nothings mounted on a directory 
in this filesystem. Upon reboot the space is not used anymore, df -k 
and du -k report similar values.

Quite simply odd. Some other details... ...this has happened twice in 
one day, and the rate of ghost disk usage is constant and identical 
in both graphs. The file server is used to serve files to clustered web 
servers. There's considerable write activity to the NFS server all the 
time (40-60Mbit/sec) and moderate read access (~10Mbit/sec).

Any ideas what would cause the df -k and du -k discrepancy?

--
Michael Conlen
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Disk Usage

2004-05-04 Thread Jay Moore
On Tuesday 04 May 2004 05:49 pm, Michael Conlen wrote:

 Any ideas what would cause the df -k and du -k discrepancy?

maybe fu-k ?  :)
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Disk Usage

2004-05-04 Thread Erik Trulsson
On Tue, May 04, 2004 at 06:49:38PM -0400, Michael Conlen wrote:
 I have a NFS server running FreeBSD-4.9-RELEASE. It's run fine for 
 several months with five FreeBSD 4.9 systems mounting it's filesystems. 
 Suddenly something started using disk space at the rate of 10 GB/hour 
 on one of the filesystems (which has exported directories). The catch 
 is that a du -k shows a total usage for that file system of much less 
 than df -k. du -k essentially shows the disk usage before the available 
 space started to disappear! Normally I'd presume someone's hiding files 
 under a mount point when I see this but nothings mounted on a directory 
 in this filesystem. Upon reboot the space is not used anymore, df -k 
 and du -k report similar values.
 
 Quite simply odd. Some other details... ...this has happened twice in 
 one day, and the rate of ghost disk usage is constant and identical 
 in both graphs. The file server is used to serve files to clustered web 
 servers. There's considerable write activity to the NFS server all the 
 time (40-60Mbit/sec) and moderate read access (~10Mbit/sec).
 
 Any ideas what would cause the df -k and du -k discrepancy?


That sounds like some program keeps one or more files open and writes
to it while the directory entry for the file has been removed. 
(Probably some log file which is kept open, but it might be something
else.)
Space used by a file is not marked as free until all directory entries
referring to the file has been removed AND no program has the file
open.
This is the normal cause for df/du discrepancies that you describe.


-- 
Insert your favourite quote here.
Erik Trulsson
[EMAIL PROTECTED]
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Disk Usage

2004-05-04 Thread Lowell Gilbert
Michael Conlen [EMAIL PROTECTED] writes:

 Any ideas what would cause the df -k and du -k discrepancy?

FAQ entry:
   The du and df commands show different amounts of disk space available. What is 
going on?
   http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/disks.html#DU-VS-DF
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]