pd 0.0.2

View process details

# pd

[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/wyhaya/pd/CI?style=flat-square)](https://github.com/wyhaya/pd/actions)
[![Crates.io](https://img.shields.io/crates/v/pd.svg?style=flat-square)](https://crates.io/crates/pd)
[![LICENSE](https://img.shields.io/crates/l/pd.svg?style=flat-square)](./LICENSE)

---

A command line tool to `view` / `watch` process information

## Install

#### Binary

[Download](https://github.com/wyhaya/pd/releases) the binary from the release page

#### Cargo

```bash
cargo install pd
# or
cargo install --git https://github.com/wyhaya/pd
```

## Usage

#### Watch process information

```bash
# Watch specified process
pd -i PID

# Run a process and watch
pd -r 'xx xxx xx'
```

#### Output process details

```bash
pd -i PID -d
```

```bash
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

```bash
pd -i PID -e
```

```bash
LANG: C.UTF-8
PATH: /usr/local/sbin ...
NOTIFY_SOCKET: /run/systemd/notify
INVOCATION_ID: ...
JOURNAL_STREAM: 9:18759
TMPDIR: /var/lib/docker/tmp
```