summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorAaron Ball <nullspoon@oper.io>2022-10-13 18:30:38 -0600
committerAaron Ball <nullspoon@oper.io>2022-10-13 18:32:43 -0600
commit304ddad0a6d501189367ebdfc863eb7f542fbbc8 (patch)
treefced507dc01753e54ffbab7f064d4f840d5dc995 /README.md
downloadpsre-304ddad0a6d501189367ebdfc863eb7f542fbbc8.tar.gz
psre-304ddad0a6d501189367ebdfc863eb7f542fbbc8.tar.xz
Initial commit of first working version
This supports the -c,--cmdline option as well as extended regexes (hardcoded to case sensitive at this time). A help text is included with a README and this is licensed under the GPLv3 license.
Diffstat (limited to 'README.md')
-rw-r--r--README.md18
1 files changed, 18 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..17e4d76
--- /dev/null
+++ b/README.md
@@ -0,0 +1,18 @@
+# PSRE README
+
+Psre is short for **Process Snapshot Regex**. Essentially it is a simple
+interface to quickly find PIDs of processes based on a regex match on the
+`cmdline` in `/proc`. The normal operation is to run `ps` with any number of
+flags, piped to any number of stream processors to extract matching process
+IDs.
+
+With `psre`, the command can be for example, `psre 'reg.*ex'`, to list all
+processes with `reg` followed anywhere by `ex`. If the user wants to print a
+list of the commands with the processes, the `-c,--cmdline` option can be
+passed and the cmdline value will be printed next to the pid following a tab
+character for easier splitting.
+
+**Note** that when using `-c,--cmdline`, the original cmdline files in `/proc`
+null-byte delimit the arguments of a command, leaving it only partially
+printable. `psre` replaces those null bytes with the ascii space char (`0x20`
+or `32 dec`) so the full cmdline is printable.

Generated by cgit