| 注册
请输入搜索内容

热门搜索

Java Linux MySQL PHP JavaScript Hibernate jQuery Nginx
jopen
8年前发布

监控终端和进程的输出工具:ispy

ISPY是一个Python工具,用于监控终端和进程的输出。

Demo

ispywatching abashsession that lists some files and opensvim:

The same thing, usingstrace:

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 aboutptracefor myself. I haven't done anything more than smoke testing on a couple of operating systems.

This uses the same system call asstrace(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

项目主页:http://www.open-open.com/lib/view/home/1450793594276

 本文由用户 jopen 自行上传分享,仅供网友学习交流。所有权归原作者,若您的权利被侵害,请联系管理员。
 转载本站原创文章,请注明出处,并保留原始链接、图片水印。
 本站是一个以用户分享为主的开源技术平台,欢迎各类分享!
 本文地址:https://www.open-open.com/lib/view/open1450793594276.html
iSpy