Code Monkey home page Code Monkey logo

file_access_monitor's Introduction

Run demo:

jupyter notebook lineage_graph_with_py2neov3.ipynb

Using loggedfs to monitor file accesses.

  1. Install http://github.com/jmftrindade/rlog (Tested on linux Ubuntu 16.04)

  2. Install http://github.com/jmftrindade/loggedfs (Tested on linux; Mac OS X doesn't work because of OSX libfuse incompatibility)

  3. Run loggedfs, e.g., monitor all files under home directory:

LD_LIBRARY_PATH=/usr/local/lib loggedfs -c loggedfs.xml -l /var/tmp/$USER-home-fs.log ~

Output will be at /var/tmp/$USER-home-fs.log

  1. Disable loggedfs, e.g., assuming monitoring was configured to track home directory:
sudo umount -l ~
  1. Copy events log to this directory, in case you want to use that for the demo:
cp /var/tmp/$USER-home-fs.log loggedfs_events.log

To Load the notebook with SNAP temporal data set.

PYSPARK_PYTHON=python3 PYSPARK_DRIVER_PYTHON=jupyter PYSPARK_DRIVER_PYTHON_OPTS="notebook" pyspark --packages graphframes:graphframes:0.4.0-spark2.0-s_2.11

DEPRECATED:

Started out with a dynamic instrumentation module, which worked fine with (f)open and (f)close events, but for some reason (f)read and (f)write are not getting intercepted. Abandoned this in favor of custom fork of loggedfs FUSE lib.

file_access_monitor

Utility to monitor file accesses for any files in a set of directories.

Build

make

Instrument a specific binary

Watch for events on log file:

touch /tmp/file_accesses.log
tail -f /tmp/file_accesses.log &

Sample binary instrumentation

Linux:

LD_PRELOAD=./log_file_access.o ./test_workflows/copy_file_via_cp.sh

Mac OS X:

DYLD_FORCE_FLAT_NAMESPACE=1 DYLD_INSERT_LIBRARIES=./log_file_access.dylib ./test_workflows/copy_file_via_cp.sh

file_access_monitor's People

Contributors

jmftrindade avatar

Stargazers

 avatar

Watchers

 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.