Summary: | procps-3.2.5: `ps --sort cputime` does not sort properly | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Dmitri Pogosian <pogosyan> |
Component: | [OLD] Core system | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | RESOLVED UPSTREAM | ||
Severity: | normal | CC: | albert |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Dmitri Pogosian
2005-10-20 15:41:11 UTC
works fine for me with procps-: ps -ef --sort time UID PID PPID C STIME TTY TIME CMD root 1 0 0 Sep07 ? 00:00:01 init [3] root 2 1 0 Sep07 ? 00:00:03 [ksoftirqd/0] root 3 1 0 Sep07 ? 00:00:14 [events/0] root 4 1 0 Sep07 ? 00:00:00 [khelper] <snip> root 19199 26704 0 Sep15 tty1 00:44:47 e16 root 28170 1 0 Sep24 ? 00:00:00 SCREEN root 26610 28170 0 Sep24 pts/4 00:00:00 -/bin/bash nobody 6026 1 0 Oct08 ? 00:00:00 /sbin/rpc.statd root 21904 1 0 Oct17 ? 00:00:00 /usr/sbin/smbd -D root 16671 1 0 Oct17 ? 00:00:00 /usr/sbin/nmbd -D <snip> you didnt say what version of procps you're using or `emerge info` like the bug report page told you to though (procps-3.2.5 that is) My mistake, procps-3.2.5-r1, amd64, dual processor machine #ps -fu pogosyan --sort time pogosyan 9480 9457 0 Oct12 ? 00:00:00 /bin/sh pogosyan 9508 1 0 Oct12 ? 00:00:02 kdeinit Running... pogosyan 9511 1 0 Oct12 ? 00:00:07 dcopserver [kdeinit] --nosid pogosyan 9513 9508 0 Oct12 ? 00:00:00 klauncher [kdeinit] pogosyan 9516 1 0 Oct12 ? 00:01:45 kded [kdeinit] pogosyan 9527 1 0 Oct12 ? 00:00:00 kxkb [kdeinit] pogosyan 9537 1 0 Oct12 ? 00:00:00 kaccess [kdeinit] pogosyan 9538 9480 0 Oct12 ? 00:00:00 kwrapper ksmserver pogosyan 9540 1 0 Oct12 ? 00:00:00 ksmserver [kdeinit] pogosyan 9541 9508 0 Oct12 ? 00:00:13 kwin [kdeinit] -session pogosyan 9543 1 0 Oct12 ? 00:00:04 kdesktop [kdeinit] pogosyan 9545 1 0 Oct12 ? 00:00:24 kicker [kdeinit] pogosyan 9547 1 0 Oct12 ? 00:00:00 klipper [kdeinit] pogosyan 9550 9508 0 Oct12 ? 00:00:20 konsole [kdeinit] -session pogosyan 9561 1 0 Oct12 ? 00:00:01 korgac --miniicon korganizer pogosyan 9563 9508 0 Oct12 ? 00:23:27 konqueror [kdeinit] -session pogosyan 9567 9550 0 Oct12 pts/2 00:00:00 /bin/bash pogosyan 9766 1 0 Oct12 ? 00:00:01 kio_uiserver [kdeinit] pogosyan 17435 9550 0 Oct16 pts/1 00:00:00 /bin/bash pogosyan 18386 9508 0 Oct19 ? 00:00:03 konsole [kdeinit] pogosyan 18387 18386 0 Oct19 pts/5 00:00:00 /bin/bash Don't see it sorted in your output as well ! indeed, i was confusing time with start_time when it's really cputime yes, start_time sort works fine. What I was suprised to find today is that "ps --sort time" does not work on my FC2 machine (procps-3.2.3) nor even on my ancient RH8.something home desktop with procps-2.0.x either. So it seems not a recent release issue but a long broken functionality. Interestingly, 'top' does things right, so the 'sort time' is not that difficult to make work, it seems. This feature was never implemented. The sort function for that specifier is a do-nothing function called sr_nop. Perhaps ps should exit with an error message when this happens. (and I guess it would be nice to implement sorting for that item) known upstream issue |