Git Product home page Git Product logo

ispy's Introduction

ispy

ispy is a python tool for monitoring the output of terminals and processes.

Demo

ispy watching a bash session that lists some files and opens vim:

ispy demo

The same thing, using strace:

strace watching writes demo

Installation

pip install ispy

Alternatively, if you aren't a Python person or don't want to install it (since it must be run as root), you can download a fully packaged pex file and run without installing:

wget https://github.com/dellis23/ispy/blob/master/bin/pex/ispy.pex?raw=true -O ispy; chmod +x ispy

Usage

# ispy <pid_to_watch>

Use Cases

  • Watching someone else's terminal
  • Watching the output of a backgrounded process

Notes

Not intended for production!

It's probably buggy.

This was mainly an exercise in learning about ptrace for myself. I haven't done anything more than smoke testing on a couple of operating systems.

This uses the same system call as strace (ptrace), which is heavy-handed and has a performance impact. It is not recommended to use in production or against mission-critical applications. It's also written in Python, so it's even slower.

Supported OSs

This has been tested as working on:

  • Ubuntu
  • CentOS

This has been tested as not working on:

  • OSX

Thanks

Thanks to the creator and maintainers of python-ptrace; this project depends on it.

ispy's People

Contributors

dellis23 avatar dmelancon avatar

Watchers

 avatar  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.