3 releases

0.1.2 Feb 20, 2021
0.1.1 Feb 2, 2021
0.1.0 Feb 1, 2021

#125 in Command-line interface

Download history 24/week @ 2021-02-15 15/week @ 2021-02-22 5/week @ 2021-03-01 2/week @ 2021-03-08 6/week @ 2021-03-15 15/week @ 2021-03-22 17/week @ 2021-03-29 18/week @ 2021-04-05 20/week @ 2021-04-12 19/week @ 2021-04-19 11/week @ 2021-04-26 12/week @ 2021-05-03 7/week @ 2021-05-10 9/week @ 2021-05-17 14/week @ 2021-05-24 9/week @ 2021-05-31

56 downloads per month
Used in 7 crates (via inwelling)

MIT/Apache

51KB
1K SLoC

Project goal

The pals project aims at providing a binary utility and a Rust library to generate a running Processes' Arguments LiSt the portable way.

Application interface

See API doc for more.

Binary utility

The pals command will dump running processes' name, pid, arguments and the sub processes to form a JSON array of elements which are process trees.

A process is a JSON object composed of:

  1. cmd: Process name.

  2. pid: Process id.

  3. args: JSON array of splitted arguments, aka argv. It's optional.

  4. subs: JSON array of sub processes. It's optional.

Example of output

[{cmd: "alpha", pid:105, args:[ "alpha" ], subs:[
  {cmd: "beta", pid:107, args:[ "beta", "--help" ]},
  {cmd: "gamma", pid:106 }]},
 {cmd: "lorum", pid:102, subs:[
  {cmd: "ipsumipsum", pid:104, args:[ "ipsumipsumipsum", "--name-too-long" ]}]}]

Thanks to identing, the JSON output is even human readable.

Supported platform

Supporting on Windows, Linux and FreeBSD are tested. Furthermore, pals works on any platform that supports ps command, for example, macOS. However, ps is NOT required on all supported platforms.

Caveat

On some platforms, process names may be truncted to fit in the maximum length.

License

Under Apache License 2.0 or MIT License, at your will.

Dependencies

~285–590KB
~12K SLoC