How to identify the process(es) which are locking files on servers

filesystemsprocesswindows-server-2003

I'm currently investigating a problem with my company's build server; roughly 1/10 of the builds fail due to a file being locked. It's a Windows 2003 virtual server running on top of VMWare. The server is not alone in the issue, with other servers experiencing similar problems, but it's the most pronounced as the build system accesses vastly more files more frequently than most others.

Attempts to identify the process locking the files have failed; by the time we run a program like Process Explorer, there are no locks present on the files in question.

I've tried running Process Monitor, but there's such a volume of information over the thousands of files used by the build system and it's not easy to identify what specifically has locked a file at the time the error occurs.

Are there any tools or techniques that we can use to identify the process locking these files?

Best Answer

You are right on in thinking processmon is the answer. It now contains the functionality of the old filemon tool. The key is to set a filter targeting the files in question to reduce the overwhelming noise. Here's an example of usage:

http://www.iislogs.com/articles/processmonitorw3wp/

Related Topic