Age | Commit message (Collapse) | Author | |
---|---|---|---|
2015-12-05 | Add start of top infrastructure to ps, null terminate some stridx() searches, | Rob Landley | |
move slot[] documentation into C code, add PR %VSZ VIRT RES SHR | |||
2015-11-29 | Implement ps --sort. | Rob Landley | |
2015-11-29 | Add basic sort logic. | Rob Landley | |
2015-11-28 | Split out string_field() from show_ps(). | Rob Landley | |
2015-11-28 | Save string offsets rather than recalculating them each time, and use struct | Rob Landley | |
instead of carving up toybuf by hand. This makes breaking out the field conversion logic into its own function less expensive. | |||
2015-11-26 | Split do_ps() into get_ps() and show_ps() as a start on implementing --sort. | Rob Landley | |
Change readfileat() to pass back length of read. | |||
2015-11-09 | Cleanup pass: inline find_tty_name(), bounds check fscanf(), use libc | Rob Landley | |
functions to read major()/minor(), fix printf format warnings in error msg. | |||
2015-11-09 | Make ps try harder to find a name for a tty. | Elliott Hughes | |
2015-11-09 | On Android, ps' default output should match toolbox. | Elliott Hughes | |
2015-11-09 | Add ps -n. | Elliott Hughes | |
Both Android and GNU interpret -n to mean "show numeric users and groups", despite what POSIX says. | |||
2015-11-09 | Add ps -o CMDLINE. | Elliott Hughes | |
This is equivalent to Android's historical "NAME" column, showing the first element of /proc/pid/cmdline. | |||
2015-11-02 | Add -P as short option for --ppid. | Rob Landley | |
(The help infrastructure can collate and alphebetize short options, long options haven't got a standardized help text format. Not a hard requirement to have a short opt, but it's nice.) | |||
2015-11-02 | Fix the ps -o CMD vs COMM distinction. | Elliott Hughes | |
"comm" is the command name without arguments, and "cmd" the command line including arguments. Confusingly, "command" is a synonym for the *latter*, not the former. This implementation of "comm" matches the GNU ps behavior where the names are truncated, but Android historically used the full name from /proc/pid/cmdline instead, so this patch isn't sufficient to let us match the Android behavior. | |||
2015-11-02 | Make ps -o error reporting intelligible. | Elliott Hughes | |
I actually thought ps was segfaulting, and it wasn't until I was in gdb that I even noticed there was an error message at all, and even then I had to read the source to work out what it was trying to tell me. Before: $ ps -o user,pid,ppid,vsize,rss,nice,wchan,addr,unknown,stat,cmd ps: -o 'user,pid,ppid,vsize,rss,nice,wchan,addr,unknown,stat,cmd'@41 USER PID PPID VSZ RSS NI WCHAN ADDR$ After: $ ps -o user,pid,ppid,vsize,rss,nice,wchan,addr,unknown,stat,cmd ps: bad -o field 'user,pid,ppid,vsize,rss,nice,wchan,addr,unknown,stat,cmd' ^ | |||
2015-11-02 | Add ps -Z. | Elliott Hughes | |
As with ls, it doesn't seem like -Z should be guarded behind LSM availability. On a non-SELinux system, the label is always "unconfined". | |||
2015-11-02 | Add ps --ppid. | Elliott Hughes | |
Used by Android. | |||
2015-10-28 | Promote ps to posix. | Rob Landley | |