On 08/11/10 23:38, Tim Spriggs wrote: > 2010/11/8 Pádraig Brady <[email protected]>: >> On 08/11/10 20:37, Tim Spriggs wrote: >>> Hello, >>> >>> I am running gentoo-prefix on OSX which builds coreutils. When I >>> compare the output of the system df to the standard GNU df I get: >>> >>> >>> $ /bin/df -h /data/hirise06 >>> Filesystem Size Used Avail Capacity Mounted on >>> hiserve2:/vol/hirise06 7.9Ti 430Gi 7.5Ti 6% /data/hirise06 >>> >>> $ df -h /data/hirise06 >>> Filesystem Size Used Avail Use% Mounted on >>> hiserve2:/vol/hirise06 >>> 2.0T 431G -523G - /data/hirise06 >>> >>> The 2.0T size looks suspicious to me. Maybe an integer is overflowing >>> somewhere? >> >> Well 2T is between 32 bit and 64 bit. >> If I had to guess I'd say df was using a 32 bit statfs >> that was returning 1024 blksize? >> >> Could you compare the system calls made by both versions of df. >> On GNU/Linux I can trace the statfs calls like: >> >> strace -v -e statfs,statfs64 df /data/hirise06 >> >> If the trace for the above gives no output >> for either command, then can you include the >> full trace output. >> >> thanks, >> Pádraig. >> >
It does look like the right functions are being called. If you could concentrate on the calls below (with the dtruss -t option according to google), you might notice some differences. > # dtruss -c -f /opt/prefix/bin/df /data/hirise06 > > > CALL COUNT > fstatfs64 1 > statfs64 1 > getfsstat64 2 > > and similarly: > > # dtruss -c -f /bin/df /data/hirise06 > > CALL COUNT > statfs64 1 > getfsstat64 2 Without an OSX box to work on, it's awkward. cheers, Pádraig.
