Re: [CentOS] df to get total disk usage on all filesystems?

2008-08-14 Thread MHR
On Wed, Aug 13, 2008 at 8:56 PM, Lunix1618 [EMAIL PROTECTED] wrote: Hi, This is work well on my laptop that running Fedora 9 with no LVM but on CentOS 5.2 with LVM it cann't calculate the LVM volume, below is output of my system : [EMAIL PROTECTED] ~]# df -kPl Filesystem

Re: [CentOS] df to get total disk usage on all filesystems?

2008-08-14 Thread Stephen Harris
On Thu, Aug 14, 2008 at 01:12:58AM -0700, MHR wrote: On Wed, Aug 13, 2008 at 8:56 PM, Lunix1618 [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] ~]# df -kPl Filesystem 1024-blocks Used Available Capacity Mounted on /dev/mapper/VolGroup00-LogVol00 274405432 18584656 241656808

Re: [CentOS] df to get total disk usage on all filesystems?

2008-08-14 Thread Lunix1618
Stephen Harris wrote: And, remember, that the output of df might have changed in between times you ran df and you ran the awk command; there's only 7Mbytes difference. Did someone delete a 7Mbyte file? Send email? Finish a print job? Or... could be plenty of reasons for the used amount to go

Re: [CentOS] df to get total disk usage on all filesystems?

2008-08-14 Thread Stephen Harris
On Thu, Aug 14, 2008 at 09:34:35PM +0700, Lunix1618 wrote: Stephen Harris wrote: 18167 Mb used But the whole system used only 18 MB ? That's not true. *blink* That's 18167 Mbytes reported there (or 18Gbytes). Which is correct. -- rgds Stephen

Re: [CentOS] df to get total disk usage on all filesystems?

2008-08-14 Thread Lunix1618
Stephen Harris wrote: On Thu, Aug 14, 2008 at 01:12:58AM -0700, MHR wrote: On Wed, Aug 13, 2008 at 8:56 PM, Lunix1618 [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] ~]# df -kPl Filesystem 1024-blocks Used Available Capacity Mounted on /dev/mapper/VolGroup00-LogVol00 274405432

Re: [CentOS] df to get total disk usage on all filesystems?

2008-08-14 Thread MHR
On Thu, Aug 14, 2008 at 3:50 AM, Stephen Harris [EMAIL PROTECTED] wrote: On Thu, Aug 14, 2008 at 01:12:58AM -0700, MHR wrote: On Wed, Aug 13, 2008 at 8:56 PM, Lunix1618 [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] ~]# df -kPl Filesystem 1024-blocks Used Available Capacity Mounted

Re: [CentOS] df to get total disk usage on all filesystems?

2008-08-14 Thread Nifty Cluster Mitch
On Thu, Aug 14, 2008 at 10:09:23AM -0700, MHR wrote: On Thu, Aug 14, 2008 at 3:50 AM, Stephen Harris [EMAIL PROTECTED] wrote: On Thu, Aug 14, 2008 at 01:12:58AM -0700, MHR wrote: On Wed, Aug 13, 2008 at 8:56 PM, Lunix1618 [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] ~]# df -kPl Filesystem

Re: [CentOS] df to get total disk usage on all filesystems?

2008-08-14 Thread MHR
On Thu, Aug 14, 2008 at 2:36 PM, Nifty Cluster Mitch [EMAIL PROTECTED] wrote: $ cat /tmp/checkspace #!/bin/bash df -Pkl /tmp/checkingdiskspce echo -e \nInput is: cat /tmp/checkingdiskspce echo -e \nAdding up the bits cat /tmp/checkingdiskspce | awk '/^\/dev\// { used += $3/1024 } END {

Re: [CentOS] df to get total disk usage on all filesystems?

2008-08-14 Thread Nifty Cluster Mitch
On Thu, Aug 14, 2008 at 02:45:43PM -0700, MHR wrote: On Thu, Aug 14, 2008 at 2:36 PM, Nifty Cluster Mitch [EMAIL PROTECTED] wrote: $ cat /tmp/checkspace #!/bin/bash df -Pkl /tmp/checkingdiskspce echo -e \nInput is: cat /tmp/checkingdiskspce echo -e \nAdding up the bits cat

Re: [CentOS] df to get total disk usage on all filesystems?

2008-08-14 Thread nate
Nifty Cluster Mitch wrote: I did notice in this discussion that no one looked at inode counts. A filesystem might be full for want of an inode I cannot recall if ext[23] will allocate additional inodes dynamically like xfs will. ext3 doesn't(at least not by default). I had a system fill

Re: [CentOS] df to get total disk usage on all filesystems?

2008-08-14 Thread Stephen Harris
On Thu, Aug 14, 2008 at 03:23:24PM -0700, Nifty Cluster Mitch wrote: On Thu, Aug 14, 2008 at 02:45:43PM -0700, MHR wrote: On Thu, Aug 14, 2008 at 2:36 PM, Nifty Cluster Mitch $ cat /tmp/checkspace #!/bin/bash df -Pkl /tmp/checkingdiskspce echo -e \nInput is: cat

Re: [CentOS] df to get total disk usage on all filesystems?

2008-08-13 Thread Lunix1618
Stephen Harris wrote: On Mon, Aug 11, 2008 at 12:07:09PM -0700, Aleksey Tsalolikhin wrote: value. I suggest using the -P switch to df, so you don't have to deal with multi-line output per filesystem. Ugh, hasn't RedHat fixed that? Sun have (for a long time) automatically done this

[CentOS] df to get total disk usage on all filesystems?

2008-08-11 Thread Sean Carolan
Is there a flag for the df command to get the total disk space used on all filesystems as one number? I have a server with a lot of mounted shares. I'm looking for a simple way to measure rate of data growth across all shares as one total value. ___

Re: [CentOS] df to get total disk usage on all filesystems?

2008-08-11 Thread Stephen Harris
Is there a flag for the df command to get the total disk space used on all filesystems as one number? I have a server with a lot of mounted shares. I'm looking for a simple way to measure rate of data growth across all shares as one total value. Not directly, but you can add up all the

Re: [CentOS] df to get total disk usage on all filesystems?

2008-08-11 Thread Aleksey Tsalolikhin
Dear Sean, No, there isn't. You'd have to parse the df output to get that value. I suggest using the -P switch to df, so you don't have to deal with multi-line output per filesystem. The following will return kilobytes of disk space used (third column in the df -kP output): df -kP |grep

Re: [CentOS] df to get total disk usage on all filesystems?

2008-08-11 Thread Sean Carolan
df -kl | awk '/^\/dev\// { avail += $3/1024 } END { printf(%d Mb used\n,avail)} ' Awesome, this is going into my bag of goodies. Thanks! ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos

Re: [CentOS] df to get total disk usage on all filesystems?

2008-08-11 Thread Stephen Harris
On Mon, Aug 11, 2008 at 12:07:09PM -0700, Aleksey Tsalolikhin wrote: value. I suggest using the -P switch to df, so you don't have to deal with multi-line output per filesystem. Ugh, hasn't RedHat fixed that? Sun have (for a long time) automatically done this if stdout is not a terminal.

Re: [CentOS] df to get total disk usage on all filesystems?

2008-08-11 Thread Dirk H. Schulz
As long as you only want the absolute amount of data (not the percentage of total file space that is used) you could use du -sh / on that server. --On 11. August 2008 14:00:09 -0500 Sean Carolan [EMAIL PROTECTED] wrote: Is there a flag for the df command to get the total disk space used on

Re: [CentOS] df to get total disk usage on all filesystems?

2008-08-11 Thread Spiro Harvey, Knossos Networks Ltd
Sean Carolan wrote: Is there a flag for the df command to get the total disk space used on all filesystems as one number? I have a server with a lot of mounted shares. I'm looking for a simple way to measure rate of data growth across all shares as one total value. You've had a few replies