473,795 Members | 2,887 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

service for file monitoring

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 file system.

thanks

Apr 20 '07 #1
5 2003
En Fri, 20 Apr 2007 17:06:51 -0300, rohit <ro***********@ gmail.com>
escribió:
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 file system.
For windows you can use the techniques described here:
http://tgolden.sc.sabren.com/python/...r_changes.html

--
Gabriel Genellina
Apr 20 '07 #2
On Apr 21, 1:36 am, "Gabriel Genellina" <gagsl-...@yahoo.com.a r>
wrote:
En Fri, 20 Apr 2007 17:06:51 -0300, rohit <rohitsethi...@ gmail.com>
escribió:
For windows you can use the techniques described here:http://tgolden.sc.sabren.com/python/...h_directory_fo...

--
Gabriel Genellina
hi,
well i tried reading that but that way i'll have to make the program
monitor each and every directory.
when a file is created or deleted or filename modified , a call must
be made to the os kernel .
isn't there any way i can utilize that with any api or package
functions so that i can monitor the whole filesystem but at lesser
expense of cpu n memory

regards

Apr 20 '07 #3

Hi,

On Apr/20/2007, Gabriel Genellina wrote:
En Fri, 20 Apr 2007 17:06:51 -0300, rohit <ro***********@ gmail.com>
escribió:
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 file system.

For windows you can use the techniques described here:
http://tgolden.sc.sabren.com/python/...r_changes.html
for linux, python-pyinotify. works very well!

--
Carles Pina i Estany GPG id: 0x8CBDAE64
http://pinux.info Manresa - Barcelona
Apr 20 '07 #4
well i tried reading that but that way i'll have to make the program
monitor each and every directory.
when a file is created or deleted or filename modified , a call must
be made to the os kernel .
isn't there any way i can utilize that with any api or package
functions so that i can monitor the whole filesystem but at lesser
expense of cpu n memory
On Windows W2k+, you can use the USN journal:

http://msdn2.microsoft.com/en-us/library/aa364586.aspx

You may have to use ctypes or write an extension module to access that
journal.

Regards,
Martin
Apr 21 '07 #5
use WMI event monitoring objWMIService.E xecNotification Query

http://msdn2.microsoft.com/en-us/library/aa393864.aspx

, then pass the event and the file starting the event to your
application via the command line, what I tend to do (so I keep one
monitor running that starts applications at event occurrence)

drawback but also a strength, the application cannot know for sure
that the event has actually happened - this is a possible strength
because then you can have other applications that redefine the
occasion of the event on a file just by starting your application for
handling that event and passing it a file asserted as having been the
object receiving the event (probably too loosely coupled for lots of
people or scenarios though, if this can be a security problem for your
application have to protect against it etc. )

if you absolutely need monitoring and application tightly coupled then
use Python and WMI to do it, using the same method.

http://tgolden.sc.sabren.com/python/wmi.html
Cheers,
Bryan Rasmussen

On 4/21/07, "Martin v. Löwis" <ma****@v.loewi s.dewrote:
well i tried reading that but that way i'll have to make the program
monitor each and every directory.
when a file is created or deleted or filename modified , a call must
be made to the os kernel .
isn't there any way i can utilize that with any api or package
functions so that i can monitor the whole filesystem but at lesser
expense of cpu n memory

On Windows W2k+, you can use the USN journal:

http://msdn2.microsoft.com/en-us/library/aa364586.aspx

You may have to use ctypes or write an extension module to access that
journal.

Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
Apr 22 '07 #6

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

Similar topics

5
1640
by: Wally | last post by:
Hi Hi need to monitoring my windows service written in VB NET. How can my monitor application "feel" that my service has made something? Is the only way a polling (for example on a Db table)? Can't service generate events into monitor application? Where can I retrieve examples about monitoring windows services? Thank in advance and... sorry for my english, but I'm Italian! :-)
3
2326
by: JSheble | last post by:
I have a windows service that in the OnStart it creates a thread and runs a loop forever and ever, assuming the service is running. The loop stops during the OnStop event, and everything works exactly as expected. I also have an application that monitors that service using the ServiceController component, and allows me to start & stop the service as needed, as well as poll for it's current status. Still everything thus far works and...
0
1668
by: Seth | last post by:
For some reason my service works fine except that it will create the file in my c drive, but will not write to the file. Sorry if this is a duplicate post, i have found some that ask the same question - but noone seems to answer. Do i need to do anything specific to write to a text file from a windows service, much appreciated.
3
2620
by: Chris Dunaway | last post by:
I am writing a Windows Service that reads and processes files on a set schedule. I want to create a second app that can monitor the Windows service. The Windows service will write trace messages at certain points while executing. The monitoring app I want to write will be very simple, just picking up these traces and displaying them to show progress of the service. My question is what is the best method of communication between the...
9
6022
by: Rotzooi | last post by:
Hi, I have a VB.NET Service application that's running fine under the Local System account. But for configuration purposes I don't want to be dependent on modifying the registry manually or using an seperate application (like I do now). I want to implement a system tray icon when someone logs on to the console. I've tried several samples but I can't get the icon to the system tray. I know there are some issues because the logged on...
8
2676
by: Rob R. Ainscough | last post by:
I have a VS 2005 Windows Service with a Installer project as part of my solution. The Service installs fine but I can't seem to make either of these work: 1. Have the service start after install 2. Have the service interact with the SysTray In my ProjectInstaller.vb Private Sub ServiceInstaller1_AfterInstall(ByVal sender As
1
1897
by: zdk | last post by:
Now I've critical problem with my system and the limitation of Windows Task Schedule,so I need to code a windows service that can monitoring/watching files in directory if new file or file changed exists this service will automatically FTP to another machine,and if no file&& no changed it still watching when changing/new exists. The question is How to create the program like this as Windows Service? What API name could be used in...
0
1269
by: archana | last post by:
Hi all, I want to developed plug-in architecture in windows service. What i want is to develop one windows service which will monitor some folders and as soon as it gets any file on folder it will call function from dll. Dll should be plug into windows service at runtime. Means support i want to add some new functionality i will just create dll and copy that dll into this windows service location. This windows
9
1620
by: Ryan Liu | last post by:
Hi, I use C# wrote an Client/Server application. In production environment, will be 130 clients (Windows XP) connect to a Server (Windows 2000/2003 Server) thought TCP/IP socket in a local 100M LAN. "Server" is running as a Windows service. The is one thread running for one clinet in the server. Sometime the user tells me the Sever will be slow after it runs for 1-2 days.
0
9519
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10215
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10165
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
10001
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5437
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4113
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 we have to send another system
2
3727
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2920
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.