Glenn Skinner
2009-Jan-31 00:54 UTC
[dtrace-discuss] resolved: file offset monitoring weirdness
Yesterday I sent out a plea that started: As part of tracking down an elusive problem, I wrote a DTrace script to monitor writes to stdout, which in my case is redirected to a file, so that file offsets are meaningful. ... and went on from there to describe how my DTrace script reported file offsets that started at 0x0, went to 0x100000 and then stuck at 0x100000. It turns out that I have egg on my face and need to wipe it off. I thought I''d redirected stdout to a file, but in fact I hadn''t; instead stdout was a pipe. Since pipes have a bounded capacity, the fact that offsets stopped increasing is (now) understandable. The pipe reached a limit and had to be drained some before more data could enter. (That''s assuming that file offsets reported for a pipe are meaningful at all; it''s a bit surprising that the plausibility of the output suggests that they are.) Thanks to everyone who responded. The responses did ultimately prompt me to re-examine the assumptions I''d been making about my test setup, which led to my figuring it out. -- Glenn Skinner