GithubHelp home page GithubHelp logo

gfslogger's Introduction

gfslogger v1.0

This program subscribes to Mac OS X 10.4 (& up) fsevents and prints to standard
output all filesystem events it receives.

The fsevents api is the same used by Spotlight to receive file system changes
immediately as they occur without constant polling. It is currently private
and undocumented by Apple.

This program should work on Mac OS X 10.4 "Tiger" (& up) and it has only been
tested with the author's C compiler. YMMV.

There is one major caveat to be concerned with (from kernelthread.com):

The interface that fslogger uses is private to Apple. Currently, there is a
caveat regarding th  use of this interface by third parties (including
fslogger). While the change notification interfac  supports multiple clients, 
there is a single kernel buffer for holding events that are to be delivered to
one or more subscribers, with the primary subscriber being Spotlight. Now, 
the kernel must hold events until it has notified all subscribers that are 
interested in them. Since there is a single buffer, a slow subscriber can 
cause it to overflow. If this happens, events will be dropped for all 
subscribers, including Spotlight. Consequently, Spotlight may need to look 
at the entire volume to determine "what changed".

fslogger is meant to be a learning tool. If you use it, you must understand
the aforementioned caveat. If you cause heavy enough file system activity 
(what's "heavy" will vary greatly, depending on your system and its currently 
available resources), both fslogger and Spotlight may miss events, causing 
Spotlight to spend some extra time looking at your volume. Note that Spotlight 
will not reindex the entire volume — it will only look for the changes that 
it missed.

An example of a typically heavy file system activity (that may quite possibly 
cause events to b  dropped) is unpacking a giant tarball. Finally, if events 
are missed, fslogger will indicate that event (missing events is an event 
itself).

fsevents.h is licensed under the APSL and owned by Apple.
gfslogger.c is licensed under the GPL and owned by Me (Rian Hunter).

Rian Hunter
[email protected]

gfslogger's People

Contributors

rianhunter avatar

Stargazers

南知 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.