https://github.com/port-zero/lwt
look who's talking. simple socket monitoring.
https://github.com/port-zero/lwt
monitoring python socket
Last synced: 5 months ago
JSON representation
look who's talking. simple socket monitoring.
- Host: GitHub
- URL: https://github.com/port-zero/lwt
- Owner: port-zero
- License: mit
- Created: 2016-12-28T16:48:01.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-12-28T19:52:54.000Z (over 9 years ago)
- Last Synced: 2026-01-03T10:00:14.961Z (5 months ago)
- Topics: monitoring, python, socket
- Language: Python
- Size: 2.93 KB
- Stars: 3
- Watchers: 9
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# lwt
`lwt` is a simple tool that, given a whitelist of process IDs and/or
process names, will print out any process and its ID that has an
open socket but is not in either whitelist. It is a thin, simple
wrapper around `lsof` without dependencies.
`lwt` stands for **l**ook **w**ho's **t**alking.
## Installation
The package is on PYPI, so you can install it easily if you have
pip installed:
```
pip install lwt
```
## Usage
From the help text of `lwt`:
```
usage: lwt [-h] [--pids PIDS] [--names NAMES] [--monitor]
[--monitor-time MONITOR_TIME]
Get processes with open sockets but no permission to use them
optional arguments:
-h, --help show this help message and exit
--pids PIDS, -p PIDS the PID file
--names NAMES, -n NAMES
the process name file
--monitor, -m continuously monitor the system
--monitor-time MONITOR_TIME, -t MONITOR_TIME
the number of seconds to wait between monitor runs
(can be fraction)
```
`lwt` needs either a PID file or a process name file (or both).
Monitor mode will continuously run the inspection, waiting an interval
of `MONITOR_TIME` seconds (monitor time can be a floating point number
or integer and will default to 1).
Have fun!