是否可以以编程方式找出什么过程正在通过网络锁定文件 [英] Is it possible to programatically find out what process is locking a file across a network

查看:49
本文介绍了是否可以以编程方式找出什么过程正在通过网络锁定文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows 2003服务器上有一个文件,该文件被在另一台Windows 2003服务器上运行的进程锁定.是否有可能找出哪个机器在哪个进程上锁定了该资源.我不介意我使用哪种语言.

I have a file on a Windows 2003 server which is locked by a process running on another Windows 2003 server. Is it possible to find out which process on which machine is locking this resource. I don't mind which language I use to do this.

推荐答案

http ://technet.microsoft.com/zh-CN/sysinternals/bb897552.aspx

PsFile

"net file"命令向您显示 其他计算机的文件列表 已在其上打开的系统上 您执行命令,但是它 截断长路径名并且不 让您查看有关的信息 远程系统. PsFile是一个 显示列表的命令行实用程序 系统上已打开文件的数量 远程,它还允许您 通过名称或关闭已打开的文件 通过文件标识符.

The "net file" command shows you a list of the files that other computers have opened on the system upon which you execute the command, however it truncates long path names and doesn't let you see that information for remote systems. PsFile is a command-line utility that shows a list of files on a system that are opened remotely, and it also allows you to close opened files either by name or by a file identifier.

...

工作方式

PsFile使用NET API,该API已记录在Platform SDK中.

PsFile uses the NET API, which is documented in the Platform SDK.

这篇关于是否可以以编程方式找出什么过程正在通过网络锁定文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆