Re: CMD.EXE and ">> logfile"
- From: Babu VT <babuvt@xxxxxxxxxxxxx>
- Date: Thu, 03 Aug 2006 19:14:41 +0530
Hi Peter,
Worth checking if you have any > instead of >> in any of your scripts.As you know > will overwrite the central.log file and *not* append..
Also what is the point in writing simultaneously which can result in garbled letters if possible to write! Only one application would need to write to a log at a time and then followed by other!
rgds
Babu
After serious thinking Peter Juuls wrote :
I use scheduled batch files do many automated tasks on my Win2000/Win2003 servers, like checking for available diskspace. All batch files write to a single logfile on the local disk, so I only need to check one logfile for problems. Batch files always append a new line to the bottom of the logfile, ex.
ECHO %DATE% %TIME% : Diskchecker says: Space is ok. >> central.log
PROBLEM: From time to time, the logfile is being deleted, for no obvious reason. It seems to happen only when two batch files simultanously append a record to the bottom of the logfile. CMD.EXE or some NTFS filesystem module should coordinate this process and ensure that both records are appended, instead of deleting the file, but apparently does not.
Q: How can I solve this? (I don't want to split up "central.log" into seperate logfiles)
Best regards
Peter Juuls
.
- Follow-Ups:
- Re: CMD.EXE and ">> logfile"
- From: Peter Juuls
- Re: CMD.EXE and ">> logfile"
- References:
- CMD.EXE and ">> logfile"
- From: Peter Juuls
- CMD.EXE and ">> logfile"
- Prev by Date: Re: remote machine execution
- Next by Date: Re: Audit script
- Previous by thread: Re: CMD.EXE and ">> logfile"
- Next by thread: Re: CMD.EXE and ">> logfile"
- Index(es):
Relevant Pages
|