I came up with a really pretty output style for ps
But, the way i did it is very poorly done. I was wondering if anyone knows a better way to do it.
Command:
Code:
ps o user,pid,comm,args,pcpu,size,state -C bash -N -C xterm |egrep "$USER|USER"|sed "s/$USER //" | sed 's/USER //'
Output:
Code:
PID COMMAND COMMAND %CPU SZ S
4744 startx /bin/sh /usr/bin/startx 0.0 524 S
4760 xinit xinit /home/zymos/.xinitrc 0.0 240 S
4765 openbox openbox 0.0 5248 S
4769 connectingTest /bin/bash /usr/scripts/conn 0.0 524 S
4771 fbpanel fbpanel 0.0 1360 S
4772 conky conky 0.0 284 S
The goal is to have it output columns for
pid, command ,command w/ args, cpu, size, state
But only for the current user, and ignore command=bash|xterm
So any ideas,
ZyMOS
PS
You should try is any see how u like it, It much more pleasant and useful than 'ps x'
also if anyone knows how to put 'size' in human for that be cool too.....