c0defellas / enzo

core utilities
11 stars 2 forks source link

missing ps #10

Open i4ki opened 7 years ago

i4ki commented 7 years ago

What about the flags?

I hate the fact that ps require lots of flags to be useful:

λ> ps
  PID TTY          TIME CMD
 1721 pts/1    00:00:00 nash
 3042 pts/1    00:00:00 ps

POSIX ps without arguments list processes started by current user and current shell.... No one wants this as default.. Other problem is the lack of symmetry/consistency (ps -aux != ps aux, ps -e == ps -A, etc)

What do you guys think of make ps return useful info by default too? Plan9 ps works this way: http://man.cat-v.org/plan_9_2nd_ed/1/ps

Below are the infos I think are useful to be default:

Example:

λ> ps
user    pid     ppid    %cpu    %mem    vsz     rss     cmd
i4k     66666   666     13.5    20.0    53008   3000    -nashd- -d /tmp/nashd.sock

In addition, printing the pid namespace could be useful too, but it's a intricate logic to get this correct and few peoples are interested in it. Maybe add an option for that.

@lborguetti What is your opinion about good values for default? I know you're the master of ps options, I'm sure you have something to say.

katcipis commented 7 years ago

I always use ps -ef, because it is pratical. I agree that showing only the shell processes are useless as hell...never used like that and know no one that does :-)