[Tutor] intercepting and recored I/O function calls
Jojo Mwebaze
jojo.mwebaze at gmail.com
Thu Sep 16 09:51:04 CEST 2010
On Wed, Sep 15, 2010 at 11:37 PM, Alan Gauld <alan.gauld at btinternet.com>wrote:
>
> "Jojo Mwebaze" <jojo.mwebaze at gmail.com> wrote
>
>
> I would like to intercept and record I/O function calls to a file.. (later
>> to a database) with probably the names of the files that have been
>> created,
>> accessed / deleted in my program. I have not done something like this
>> before.. Some Guidance is highly appreciated
>>
>
> Are you talking about I/O calls in your own app? If so thats fairly
> straightforward to do. OTOH If you are talking about capturing all
> I/O calls that's a lot harder.... and if it's a multi-user OS will need
> administrator privileges.
>
I could begin with tracing I/O calls in my App.. if its sufficient enough i
may not need i/o calls for the OS.
>
> But this is extremely dependant on the Operating System - you will
> basically
> have to intercept the system calls. So, which OS are you using?
> And how familiar are you with its API?
>
I am using centos, however i don't even have admin privileges. Which API
are you referring to?
Al;so, While you can probably do this in Python but its likely to have
> a serious impact on the OS performance, it will slow down the performamce
> quite noticeably. I'd normally recommend using C for something like this.
>
> HTH,
>
> --
> Alan Gauld
> Author of the Learn to Program web site
> http://www.alan-g.me.uk/
>
>
> _______________________________________________
> Tutor maillist - Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20100916/e9e3aace/attachment.html>
More information about the Tutor
mailing list