Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/theden/ps-tools
Various *nix process tools
https://github.com/theden/ps-tools
pid process signals unix-signals
Last synced: 9 days ago
JSON representation
Various *nix process tools
- Host: GitHub
- URL: https://github.com/theden/ps-tools
- Owner: TheDen
- Created: 2022-07-14T08:39:30.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-07-16T17:49:00.000Z (over 2 years ago)
- Last Synced: 2024-05-30T01:18:33.027Z (7 months ago)
- Topics: pid, process, signals, unix-signals
- Language: Python
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ps-tools
Various \*nix process tools.
# signals.py
Tool to test out [IPC signals](https://en.wikipedia.org/wiki/Signal_(IPC)). Program will capture signals and print out the received signal.
For example,
```bash
$ ./signals.py
Interpreter: /opt/homebrew/opt/[email protected]/bin/python3.9Keyboard combinations for signal inputs:
CTRL + c (^C) for SIGINT
CTRL + \ (^\) for SIGQUIT
CTRL + z (^z) for SIGTSTPTo kill this process, in another shell run: kill -9 74974
List of signals:
1: SIGHUP
2: SIGINT
3: SIGQUIT
4: SIGILL
5: SIGTRAP
6: SIGABRT
7: SIGEMT
8: SIGFPE
9: SIGKILL
10 SIGBUS
11 SIGSEGV
12 SIGSYS
13 SIGPIPE
14 SIGALRM
15 SIGTERM
16 SIGURG
17 SIGSTOP
18 SIGTSTP
19 SIGCONT
20 SIGCHLD
21 SIGTTIN
22 SIGTTOU
23 SIGIO
24 SIGXCPU
25 SIGXFSZ
26 SIGVTALRM
27 SIGPROF
28 SIGWINCH
29 SIGINFO
30 SIGUSR1
31 SIGUSR2
```Note that `SIGSTOP` and `SIGKILL` cannot be captured
# pid_watch.py
Tool to watch processes until they die. Takes one or more PIDs as arguments, and will exit when the processes end.
```bash
$ ./pid_watch.py -h
usage: pid_watch.py [-h] Process ID [Process ID ...]Watch process IDs
positional arguments:
Process ID Process IDsoptional arguments:
-h, --help show this help message and exit
```For example,
```bash
$ ./pid_watch.py 94352 95133
watching PID: 94352
watching PID: 95133
PID ended: 94352
PID ended: 95133
```