473,586 Members | 2,546 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 1349
(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****@chrislev is.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
2573
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 programs (Putty and Pageant) located on a Win 2003 Server. The service installs but doesn't start the Putty / Pageant programs properly when using...
18
20166
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 are created and detected before writing completes and so I cannot read them until the file handle used in their creation has been released. This...
10
3052
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 install Remote Debugging tools from VStudio 2k3 and since then it has been messed up. Please, this is very important for us to fix. We are having...
1
1475
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 event log: Failed to execute request because the App-Domain could not be created. Error: 0x80070005 Access is denied. Event ID: 1088
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 something to do with this. We had to register an api certificate on the server using WinHttpCertCfg. Maybe this is doing something? Access denied...
5
3618
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 New System.Diagnostics.Process 'p.Start(MDEPDirStr & "macrun.exe", sPPTOut) p.Start("C:\WINDOWS\SYSTEM32\CALC.EXE")...
18
1732
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 back a valid DataReader object. I've been slaving with this all day long. I've been trying 'new' and not new and just slaving over this; im...
4
9608
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 does happen time to time. We are trying ways to find which other process is holding on to the file or even if any other thread from our process is...
0
1816
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 know how to interpret the log. Moreover this is the same problem as the Permission denied (errno =13) in windows.I tried to check for any other process...
3
2091
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 capture file events. I am not a Windows professional, so what I have to say next is pure conjecture. Could it be that my kernel level debugging is...
0
7915
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8204
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8339
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7965
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8220
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6617
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5712
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5392
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
1452
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.