0.0.2 |
|
---|---|
0.0.1 |
|
#60 in #watch
15KB
268 lines
pd
A command line tool to view
/ watch
process information
Install
Binary
Download the binary from the release page
Cargo
cargo install pd
# or
cargo install --git https://github.com/wyhaya/pd
Usage
Watch process information
# Watch specified process
pd -i PID
# Run a process and watch
pd -r 'xx xxx xx'
Output process details
pd -i PID -d
PID : 972
Name : docker-proxy
CWD : /
EXE : /usr/bin/docker-proxy
Command: /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 ...
Started: Sun Oct 11 21:01:36 2020 [2d 15h 11m 13s]
Status : Sleeping
Threads: 0
I/O :
Chars Read: 5.09 KB
Chars Written: 2 B
Read Syscalls: 18
Write syscalls: 1
Bytes Read: 0 B
Bytes Written: 0 B
Cancelled Write bytes: 0 B
Network: 0.0MB
CPU :
Usage : 0.00%
User : 0.08s
System: 0.18s
Memory :
Usage : 0 MiB [0.0%]
Real : 3.78 MB
Virtual: 608.18 MB
Output process environment variables
pd -i PID -e
LANG: C.UTF-8
PATH: /usr/local/sbin ...
NOTIFY_SOCKET: /run/systemd/notify
INVOCATION_ID: ...
JOURNAL_STREAM: 9:18759
TMPDIR: /var/lib/docker/tmp
Dependencies
~9–20MB
~281K SLoC