about summary refs log tree commit diff
path: root/px.sh
diff options
context:
space:
mode:
Diffstat (limited to 'px.sh')
-rw-r--r--px.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/px.sh b/px.sh
new file mode 100644
index 0000000..f389a0b
--- /dev/null
+++ b/px.sh
@@ -0,0 +1,7 @@
+px() {
+  ps wwp ${$(pgrep -d, "${(j:|:)@}"):?no matches} \
+         -o pid,user:6,%cpu,%mem,vsz:10,rss:10,bsdstart,etime:12,bsdtime,args |
+    sed '1s/     \(VSZ\|RSS\)/\1/g' |
+    numfmt --header --field 5,6 --from-unit=1024 --to=iec --format "%5f"
+}
+