>>>>> "Steve" == Steven Hartman <[email protected]> writes:
Steve> On Thu, 21 Mar 2002, Deb Kerstiens wrote:
>> I'm puzzled that "mv"ing the file results in having the logServer
>> continue to write to the file in the new location, though. Maybe there's
>> some system magic that keeps track of the file as long as it remains
>> open for writing??
Steve> That's proper unix behaviour. The iocLogServer process has the open
Steve> file handle for writing to the log file and so will continue to
Steve> write to that file even after it is mv'ed. Give the iocLogServer
Steve> process a 'kill -HUP' (or 'stop' and 'start' via the logServer.init
Steve> script included in base) after you mv the file.
and
>>>>> "Brian" == Brian McAllister <[email protected]> writes:
Brian> Not magic, just standard Unix-style file I/O. The file descriptor
Brian> points to an "inode", not a physical disk location. When you "mv"
Brian> the file, the contents of the inode are modified to point to the
Brian> new location, but it's still the same inode. The "mv" is invisible
Brian> to anyone who already has the file open.
but, just so no one gets confused, "mv" of a file from one file system to
another actually does a "cp". In that case, hmmm.... :-) I tried a test
shell loop
atlas ~ > while true;do
> echo here
> sleep 1
> done >test.log
, moved the file to a different file system after it started, and looked at
the result. The moved file did not change after the move. Any further
output from the shell loop disappeared and never showed on disk. So though
the shell had the file open, the inode no longer existed and the output was
tossed.
Jim
- References:
- Re: EPICS iocLog file size limitation Steven Hartman
- Navigate by Date:
- Prev:
RE: EPICS iocLog file size limitation Kevin Tsubota
- Next:
Re: EPICS iocLog file size limitation Steve Lewis
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
<2002>
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: EPICS iocLog file size limitation Steven Hartman
- Next:
Re: EPICS iocLog file size limitation Brian McAllister
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
<2002>
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|