0 Members and 1 Guest are viewing this topic.
# first see the actual outputdf --total -P -T --exclude-type=aufs --exclude-type=devfs --exclude-type=devtmpfs \--exclude-type=fdescfs --exclude-type=iso9660 --exclude-type=linprocfs --exclude-type=procfs \--exclude-type=squashfs --exclude-type=sysfs --exclude-type=tmpfs --exclude-type=unionfs# then add the partition used blocks directly df -P -T --exclude-type=aufs --exclude-type=devfs --exclude-type=devtmpfs \ --exclude-type=fdescfs --exclude-type=iso9660 --exclude-type=linprocfs --exclude-type=procfs \ --exclude-type=squashfs --exclude-type=sysfs --exclude-type=tmpfs --exclude-type=unionfs | \ awk 'BEGIN {total=0} {total = total + $4 }END {print total}' result: 614562236# then do it --total, using only --total outputdf --total -P -T --exclude-type=aufs --exclude-type=devfs --exclude-type=devtmpfs \--exclude-type=fdescfs --exclude-type=iso9660 --exclude-type=linprocfs --exclude-type=procfs \--exclude-type=squashfs --exclude-type=sysfs --exclude-type=tmpfs --exclude-type=unionfs | \awk 'BEGIN {total=0} /^total/ {total = total + $4 }END {print total}'result:614562228# then do it with --total but just counting the disk blocks and ignoring the total df --total -P -T --exclude-type=aufs --exclude-type=devfs --exclude-type=devtmpfs \ --exclude-type=fdescfs --exclude-type=iso9660 --exclude-type=linprocfs \ --exclude-type=procfs --exclude-type=squashfs --exclude-type=sysfs --exclude-type=tmpfs \ --exclude-type=unionfs | awk 'BEGIN {total=0} !/total/ {total = total + $4 }END {print total}'result:614562208
don@imerabox:~$ df --total -P -T --exclude-type=aufs --exclude-type=devfs --exclude-type=devtmpfs \> --exclude-type=fdescfs --exclude-type=iso9660 --exclude-type=linprocfs --exclude-type=procfs \> --exclude-type=squashfs --exclude-type=sysfs --exclude-type=tmpfs --exclude-type=unionfsFilesystem Type 1024-blocks Used Available Capacity Mounted on/dev/sda1 ext4 19478204 14356724 4109000 78% //dev/sdb1 ext4 57562364 53080 57492900 1% /mnt/REVODATA/dev/sda2 ext4 37954208 31853332 6084492 84% /mnt/SDA2/dev/sde1 ext2 506724 165606 314955 35% /boot/dev/sdc btrfs 1953525168 996694656 953952792 52% /mnt/DATAtotal - 2069026668 1043123398 1021954139 51% -don@imerabox:~$ df -P -T --exclude-type=aufs --exclude-type=devfs --exclude-type=devtmpfs \> --exclude-type=fdescfs --exclude-type=iso9660 --exclude-type=linprocfs --exclude-type=procfs \> --exclude-type=squashfs --exclude-type=sysfs --exclude-type=tmpfs --exclude-type=unionfs | \> awk 'BEGIN {total=0} {total = total + $4 }END {print total}'1043123394don@imerabox:~$ df --total -P -T --exclude-type=aufs --exclude-type=devfs --exclude-type=devtmpfs \> --exclude-type=fdescfs --exclude-type=iso9660 --exclude-type=linprocfs --exclude-type=procfs \> --exclude-type=squashfs --exclude-type=sysfs --exclude-type=tmpfs --exclude-type=unionfs | \> awk 'BEGIN {total=0} /^total/ {total = total + $4 }END {print total}'1043123402don@imerabox:~$ df --total -P -T --exclude-type=aufs --exclude-type=devfs --exclude-type=devtmpfs \> --exclude-type=fdescfs --exclude-type=iso9660 --exclude-type=linprocfs \> --exclude-type=procfs --exclude-type=squashfs --exclude-type=sysfs --exclude-type=tmpfs \> --exclude-type=unionfs | awk 'BEGIN {total=0} !/total/ {total = total + $4 }END {print total}'1043123398
root@imerabox:/home/don# btrfs fi show /mnt/DATALabel: none uuid: 9025bea6-b615-470a-8759-df1b13f63b52 Total devices 2 FS bytes used 948.87GiB devid 1 size 931.51GiB used 804.03GiB path /dev/sdc devid 2 size 931.51GiB used 804.01GiB path /dev/sddBtrfs v3.14.1
btrfs fi df /mnt/DATA
Data, RAID0: total=1.56TiB, used=947.21GiBData, single: total=8.00MiB, used=6.28MiBSystem, RAID1: total=8.00MiB, used=116.00KiBSystem, single: total=4.00MiB, used=0.00Metadata, RAID1: total=3.00GiB, used=1.65GiBMetadata, single: total=8.00MiB, used=0.00unknown, single: total=512.00MiB, used=0.00
root@imerabox:/# fdisk -luDisk /dev/sdc: 1000.2 GB, 1000204886016 bytes255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x00000000Disk /dev/sdc doesn't contain a valid partition table
root@imerabox:~# btrfs fi showLabel: none uuid: 9025bea6-b615-470a-8759-df1b13f63b52 Total devices 2 FS bytes used 948.87GiB devid 1 size 931.51GiB used 804.03GiB path /dev/sdc devid 2 size 931.51GiB used 804.01GiB path /dev/sddBtrfs v3.14.1root@imerabox:~# btrfs fi show --mountedLabel: none uuid: 9025bea6-b615-470a-8759-df1b13f63b52 Total devices 2 FS bytes used 948.87GiB devid 1 size 931.51GiB used 804.03GiB path /dev/sdc devid 2 size 931.51GiB used 804.01GiB path /dev/sddBtrfs v3.14.1
root@imerabox:~# umount /dev/sdcroot@imerabox:~# btrfs fi show --mountedBtrfs v3.14.1root@imerabox:~#
don@imerabox:~$ inxi -v3System: Host: imerabox Kernel: 3.15-rc3-siduction-amd64 x86_64 (64 bit gcc: 4.9.0) Desktop: KDE 4.12.4 (Qt 4.8.6) Distro: aptosid 2011-02 Ἡμέρα - kde-lite - (201107131633) Machine: Mobo: ASUSTeK model: P6X58D-E v: Rev 1.xx Bios: American Megatrends v: 0803 date: 08/06/2012CPU: Quad core Intel Core i7 CPU 950 (-HT-MCP-) cache: 8192 KB flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 25176 Clock Speeds: 1: 3145 MHz 2: 3145 MHz 3: 3145 MHz 4: 3145 MHz 5: 3145 MHz 6: 3145 MHz 7: 3145 MHz 8: 3145 MHzGraphics: Card: NVIDIA GF100 [GeForce GTX 480] bus-ID: 05:00.0 Display Server: X.Org 1.15.1 driver: nvidia Resolution: 1920x1200@59.9hz GLX Renderer: GeForce GTX 480/PCIe/SSE2 GLX Version: 4.4.0 NVIDIA 337.12 Direct Rendering: YesNetwork: Card: Marvell 88E8056 PCI-E Gigabit Ethernet Controller driver: sky2 v: 1.30 port: d800 bus-ID: 06:00.0 IF: eth0 state: up speed: 100 Mbps duplex: full mac: 20:cf:30:5c:41:1dDrives: HDD Total Size: 2136.5GB (51.1% used) ID-1: model: OCZ ID-2: model: OCZ ID-3: model: WDC_WD1002FAEX ID-4: model: KINGSTON_SS100S2 ID-5: model: WDC_WD1002FAEXInfo: Processes: 322 Uptime: 23 min Memory: 1797.7/5965.6MB Init: systemd runlevel: 5 Gcc sys: 4.8.2 Client: Shell (bash 4.3.111) inxi: 2.1.23