Re: effect of strip(1) on du(1)

2017-03-21 Thread Julian Elischer
On 3/3/17 8:31 am, Rodney W. Grimes wrote: On Fri, Mar 3, 2017 at 2:04 AM, Peter Jeremy wrote: On 2017-Mar-02 22:29:46 +0300, Subbsd wrote: During some interval after strip call, du will show 512B for any file. If execute du(1) after strip(1) without delay, this behavior is reproduced 100%:

Re: effect of strip(1) on du(1)

2017-03-03 Thread Alan Somers
On Fri, Mar 3, 2017 at 10:25 AM, Allan Jude wrote: > On March 3, 2017 9:11:30 AM EST, "Rodney W. Grimes" > wrote: >>-- Start of PGP signed section. >>[ Charset ISO-8859-1 unsupported, converting... ] >>> On 2017-Mar-02 22:19:10 -0800, "Rodney W. Grimes" >> wrote: >>> >> du(1) is using fts_read(3

Re: effect of strip(1) on du(1)

2017-03-03 Thread Allan Jude
On March 3, 2017 9:11:30 AM EST, "Rodney W. Grimes" wrote: >-- Start of PGP signed section. >[ Charset ISO-8859-1 unsupported, converting... ] >> On 2017-Mar-02 22:19:10 -0800, "Rodney W. Grimes" > wrote: >> >> du(1) is using fts_read(3), which is based on the stat(2) >information. >> >> The Open

Re: effect of strip(1) on du(1)

2017-03-03 Thread Alan Somers
On Fri, Mar 3, 2017 at 7:11 AM, Rodney W. Grimes wrote: > -- Start of PGP signed section. > [ Charset ISO-8859-1 unsupported, converting... ] >> On 2017-Mar-02 22:19:10 -0800, "Rodney W. Grimes" >> wrote: >> >> du(1) is using fts_read(3), which is based on the stat(2) information. >> >> The Open

Re: effect of strip(1) on du(1)

2017-03-03 Thread Rodney W. Grimes
-- Start of PGP signed section. [ Charset ISO-8859-1 unsupported, converting... ] > On 2017-Mar-02 22:19:10 -0800, "Rodney W. Grimes" > wrote: > >> du(1) is using fts_read(3), which is based on the stat(2) information. > >> The OpenGroup defines st_blocksize as "Number of blocks allocated for > >

Re: effect of strip(1) on du(1)

2017-03-03 Thread Rodney W. Grimes
> On Thu, Mar 2, 2017 at 6:12 PM, Ngie Cooper wrote: > > On Thu, Mar 2, 2017 at 4:31 PM, Rodney W. Grimes > > wrote: > > ... > >> Even if that is the case file system cache effects should NOT be > >> visible to a userland process. This is NOT as if your running > >> 2 different processing beati

Re: effect of strip(1) on du(1)

2017-03-03 Thread Rodney W. Grimes
[ Charset UTF-8 unsupported, converting... ] > On Thu, Mar 2, 2017 at 4:31 PM, Rodney W. Grimes > wrote: > ... > > Even if that is the case file system cache effects should NOT be > > visible to a userland process. This is NOT as if your running > > 2 different processing beating on a file. You

Re: effect of strip(1) on du(1)

2017-03-03 Thread Peter Jeremy
On 2017-Mar-02 22:19:10 -0800, "Rodney W. Grimes" wrote: >> du(1) is using fts_read(3), which is based on the stat(2) information. >> The OpenGroup defines st_blocksize as "Number of blocks allocated for >> this object." In the case of ZFS, a write(2) may return before any >> blocks are actually

Re: effect of strip(1) on du(1)

2017-03-03 Thread Alfred Perlstein
On 3/2/17 5:30 PM, Alan Somers wrote: On Thu, Mar 2, 2017 at 6:12 PM, Ngie Cooper wrote: On Thu, Mar 2, 2017 at 4:31 PM, Rodney W. Grimes wrote: ... Even if that is the case file system cache effects should NOT be visible to a userland process. This is NOT as if your running 2 different p

Re: effect of strip(1) on du(1)

2017-03-02 Thread Alan Somers
On Thu, Mar 2, 2017 at 6:12 PM, Ngie Cooper wrote: > On Thu, Mar 2, 2017 at 4:31 PM, Rodney W. Grimes > wrote: > ... >> Even if that is the case file system cache effects should NOT be >> visible to a userland process. This is NOT as if your running >> 2 different processing beating on a file.

Re: effect of strip(1) on du(1)

2017-03-02 Thread Ngie Cooper
On Thu, Mar 2, 2017 at 4:31 PM, Rodney W. Grimes wrote: ... > Even if that is the case file system cache effects should NOT be > visible to a userland process. This is NOT as if your running > 2 different processing beating on a file. Your test cases are > serialially syncronous shell invoked c

Re: effect of strip(1) on du(1)

2017-03-02 Thread Rodney W. Grimes
> On Fri, Mar 3, 2017 at 2:04 AM, Peter Jeremy wrote: > > On 2017-Mar-02 22:29:46 +0300, Subbsd wrote: > >>During some interval after strip call, du will show 512B for any file. > >>If execute du(1) after strip(1) without delay, this behavior is reproduced > >>100%: > > > > What filesystem are y

Re: effect of strip(1) on du(1)

2017-03-02 Thread Subbsd
On Fri, Mar 3, 2017 at 2:04 AM, Peter Jeremy wrote: > On 2017-Mar-02 22:29:46 +0300, Subbsd wrote: >>During some interval after strip call, du will show 512B for any file. >>If execute du(1) after strip(1) without delay, this behavior is reproduced >>100%: > > What filesystem are you using? str

Re: effect of strip(1) on du(1)

2017-03-02 Thread Peter Jeremy
On 2017-Mar-02 22:29:46 +0300, Subbsd wrote: >During some interval after strip call, du will show 512B for any file. >If execute du(1) after strip(1) without delay, this behavior is reproduced >100%: What filesystem are you using? strip(1) rewrites the target file and du(1) reports the number o

effect of strip(1) on du(1)

2017-03-02 Thread Subbsd
Hi, Not sure for FreeBSD < 12, but i found interesting behavior strip effect(1) on du(1) command: -- % strip /bin/pax && sleep 4 && du -sh /bin/pax 65K/bin/pax % strip /bin/pax && sleep 3 && du -sh /bin/pax 65K/bin/pax % strip /bin/pax && sleep 2 && du -sh /bin/pax 512B/bin/pax % s