diff options
author | Leah Neukirchen <leah@vuxu.org> | 2020-03-21 23:41:23 +0100 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2020-03-21 23:41:23 +0100 |
commit | 381a0917c48ce419ececd3ed560bf42fb8422d07 (patch) | |
tree | 3cf76569d4366883cff3656a8deb2438d1c27305 /px.sh | |
download | px-381a0917c48ce419ececd3ed560bf42fb8422d07.tar.gz px-381a0917c48ce419ececd3ed560bf42fb8422d07.tar.xz px-381a0917c48ce419ececd3ed560bf42fb8422d07.zip |
initial commit of px
Diffstat (limited to 'px.sh')
-rw-r--r-- | px.sh | 7 |
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" +} + |