473,511 Members | 15,408 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Filemon-ish behavior by Python?

(For those who don't know what filemon is, it is a utility by System
Internals that hooks into something and watches every file-access
performed by the system (in this case, Win 2000), and outputs to the
GUI the files being accessed).

I like filemon, but I'd like it better if I could run it at the
command line, and have the option of piping the output all over the
place. Does anyone out there know of an existing utility that can do
this, or, barring that, can you point me to a good place to start on
making such a tool using Python? I'm not sure what I would have to
hook into to watch these operations on the disk.

TIA
-cjl
Jul 18 '05 #1
2 1345
(For those who don't know what filemon is, it is a utility by System
Internals that hooks into something and watches every file-access
performed by the system (in this case, Win 2000), and outputs to the
GUI the files being accessed).

I like filemon, but I'd like it better if I could run it at the
command line, and have the option of piping the output all over the
place. Does anyone out there know of an existing utility that can do
this, or, barring that, can you point me to a good place to start on
making such a tool using Python? I'm not sure what I would have to
hook into to watch these operations on the disk.


Unless you want to slow down your machine, you probably don't want to.
Your computer can likely handle a few hundred thousand disk requests
each second, which would result in a (relatively slow) Python callback
for each of them.

In terms of how you would get access to such information, I don't know.
You may want to ask the System Internals guys.

- Josiah
Jul 18 '05 #2
go****@chrislevis.com (Chris) writes:
I like filemon, but I'd like it better if I could run it at the
command line, and have the option of piping the output all over the
place. Does anyone out there know of an existing utility that can do
this, or, barring that, can you point me to a good place to start on
making such a tool using Python? I'm not sure what I would have to
hook into to watch these operations on the disk.


Given the level of "guts" that filemon is doing to hook into
filesystem access, and if you really want to use Python, I'd probably
suggest an approach where you continued to use the sysinternals
filemon device drivers (vxd/sys), and just replaced their GUI with
your own Python code.

You can get the source to filemon from the sysinternals site (or at
least you could the last time I downloaded it), and see how it works.

The key is dynamically loading and unloading the VXD, and then issuing
IOCtls to it to retrieve information. My bet is you could handle that
part of the interface with ctypes, although you'll have to work a bit
to match up the precise IOCtl structures used by the driver.

If you're not totally dead set on Python but just want better control
over the output (and if you've got MSVC), you might even consider just
modifying their GUI application to do what you want.

-- David
Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2557
by: cd | last post by:
Is there a specific process or permissions that must be granted to get a .NET (framework 1.4) Window Service to run properly on a Windows 2003 Server? I built a Windows Service to start two local...
18
20145
by: Conrad F | last post by:
Hello all, I am waiting for receipt of files in a directory. I use the FileSystemWatcher to detect when files arrive in said folder. I need to read the data from these files ASAP but the files...
10
3036
by: M K | last post by:
I get the message: 'Could not use ''; file already in use.' on my pages if I am working in the database. I used to be able work in the database (Access) and users use the site, but I tried to...
1
1472
by: Matt | last post by:
I am unalbe to get a website created with vwd 2005 running on IIS6.0 with ASP.NET version: 2.0.50727. I get a server application unavailable. I have ..htm websites that run. I checked the...
5
483
by: Joe | last post by:
I'm getting the following error when trying to call a page on a secure server. I'm not doing any impersonations or file access of any kind. The page is using PayPal and I'm wondering if PayPal has...
5
3612
by: snicks | last post by:
I'm trying to exec a program external to my ASP.NET app using the following code. The external app is a VB.NET application. Dim sPPTOut As String sPPTOut = MDEPDirStr + sID + ".ppt" Dim p As...
18
1727
by: dbahooker | last post by:
team i'm having a tough time getting these data readers to work correctly I'd just like to be able to centralize my GetDataReader functions; so i can pass a simple SQL statement and be passed...
4
9598
by: Paddy | last post by:
We have a recurring problem where a (long-running) service throws an exception while trying to access a file. The problem is that this is very rare (happens once every week and without warning) but...
0
1810
by: neerajkumar | last post by:
Below is the fragment of the filemon utility log.The result is showing DELETE . After that DKService(diskkeeper) is trying to access the same file.Since i am new to this filemon utility so i dont...
3
2088
by: Kays | last post by:
Hi everyone. I am new to this site, and so far I found it great! Kicks the pants off similar services, that's for sure.... Ok, so my question is this: My FILEMON (by SYSINTERNALS) refuses to...
0
7138
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7353
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7075
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5662
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5063
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4737
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3222
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3212
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1572
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.