473,403 Members | 2,366 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

monitoring the filesystem for changes

hello,
i have designed a desktop search utility in python and a file system
monitoring using readdirectorychangesw from win32api but for eg. it
has a high cpu utilization (using a 2GHz processor).
a solution ntfs change journal proposed here works only for ntfs
partitions
is there another low (processor) cost alternative that works on fat32
partitions as well.
Rohit

Jun 2 '07 #1
4 3569
i have designed a desktop search utility in python and a file system
monitoring using readdirectorychangesw from win32api but for eg. it
has a high cpu utilization (using a 2GHz processor).
I don't think so. I just build a service to monitor a directory
changes using readdirectorychangesw, the cpu usage is not above 1.9%
for this service(my computer's cpu is 1.7GHz). if you still think 1.9%
is high cpu utilization, I think you can use the c to implements this
function, the cpu usage seems none for this application(I tried c dll
solution first).
Wish this help to you.

Wang Wei

Jun 3 '07 #2
hello
well in my implementation of readdirectorychangesw i am using
threading that is multiple programs run simultaneously each program
monitoring one drive for changes.
is their a way around this...one program for all drives?
thanks
rohit

Jun 3 '07 #3
rohit wrote:
hello
well in my implementation of readdirectorychangesw i am using
threading that is multiple programs run simultaneously each program
monitoring one drive for changes.
is their a way around this...one program for all drives?
thanks
You could use the ReadDirectoryChangesW in overlapped
mode. I've never tried it, so I don't know how
robust it would be. Why is it a problem to have
"multiple programs" running? And is that simply
multiple threads, or multiple processes?

TJG
Jun 3 '07 #4
You could use the ReadDirectoryChangesW in overlapped
mode. I've never tried it, so I don't know how
robust it would be. Why is it a problem to have
"multiple programs" running? And is that simply
multiple threads, or multiple processes?
I used overlapped in my program, it runs about 1 week, seems no
problems now.
FILE_LIST_DIRECTORY = 0x0001
hDir = None

def __init__(self, directory):
self.hDir = win32file.CreateFile (
directory,
self.FILE_LIST_DIRECTORY,
win32con.FILE_SHARE_READ | win32con.FILE_SHARE_WRITE,
None,
win32con.OPEN_EXISTING,
win32con.FILE_FLAG_BACKUP_SEMANTICS|
win32con.FILE_FLAG_OVERLAPPED,
None
)
but I didn't try use multiple program do the same action. I think only
one thread to do directory monitor is enough. other thread and process
can communicate with it use thread or process communication.

Wang Wei
Jun 4 '07 #5

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

Similar topics

4
by: johnm | last post by:
Hello, We currently are running a CRM application that uses DB/2 7.2 for the data repository. We will be upgrading to 8.2 later this year....maybe....time and resources permitting. The...
0
by: Jeff Reed | last post by:
I am experiencing the the problem outlined the below. Unfortunately, I am using WinXP and I not sure if I can apply the solution due to lack of security control Any feed back would be apreciated ...
1
by: Edward Yang | last post by:
I setup web.config with impersonation="true". On our local server the project works great. I did the same procedures on our staging server, but it failed with an impossible error: Server Error in...
2
by: Greg Allen | last post by:
I know this has been discussed before, and have found some documentation about it on the web. But nothing has fixed my problem. I am running the 1.1 .NET framework, SP1. I have a web...
9
by: Tim D | last post by:
Hi, I originally posted this as a reply to a rather old thread in dotnet.framework.general and didn't get any response. I thought it might be more relevant here; anyone got any ideas? My...
2
by: Jeff Davis | last post by:
I have virtual hosted users on a server and some of them have a postgresql database. I'm concerned about the outside possibility that a user could create an infinite loop and fill up the partition...
5
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
by: rohit | last post by:
hi, i am designing a desktop search engine using python. i am having a query , is there a package available that contains functions for retrieving the files being edited , created,deleted in the...
3
by: rohit | last post by:
hi i want to detect all file change operations(rename,delete,create....) on ALL THE DRIVES of the hard disk using the method ReadDirectoryChanges API , i.e program no. 3 in the webpage...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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,...
0
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...
0
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...

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.