]> granicus.if.org Git - procps-ng/commitdiff
ps: enable sort by etimes
authorCraig Small <csmall@enc.com.au>
Thu, 6 Aug 2015 12:08:13 +0000 (22:08 +1000)
committerCraig Small <csmall@enc.com.au>
Thu, 6 Aug 2015 12:08:13 +0000 (22:08 +1000)
ps has two columns showing the same data which is elapsed time, just
the format is changed:
 etimes - elapsed time in seconds
 etime  - elapsed time in DD-hh:mm:ss

ps used to only sort by etime but not etimes, by making etimes
and alias of etime for sorting both flags work.

References:
 https://bugs.debian.org/794619

Signed-off-by: Craig Small <csmall@enc.com.au>
NEWS
ps/output.c

diff --git a/NEWS b/NEWS
index d47f40d2e3ea0155eed74404459711e21dec6bde..47c1c3df456f99f1b064ce5de9c7fa9289a9e8f5 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,7 @@ procps-ng-NEXT
   * pgrep: don't crash with -a -w flags. Merge 33, Debian #768190
   * skill: command line with signal number interpreted correctly
   * pmap: print process name even if smaps is unreadable Debian #775624
+  * ps: sort by etimes column, uses etime Debian #794619
 
 procps-ng-3.3.10
 ----------------
index 270f427301bc399713148db5a07cfdef1108dd27..63ba26888ff9d13112e0f38843afc7c07d24bf3c 100644 (file)
@@ -1467,7 +1467,7 @@ static const format_struct format_array[] = {
 {"environ","ENVIRONMENT",pr_nop,      sr_nop,    11, ENV,    LNx, PO|UNLIMITED},
 {"esp",       "ESP",     pr_esp,      sr_kstk_esp, 8,  0,    LNX, TO|RIGHT},
 {"etime",     "ELAPSED", pr_etime,    sr_etime,  11,   0,    U98, ET|RIGHT}, /* was 7 wide */
-{"etimes",    "ELAPSED", pr_etimes,   sr_nop,     7,   0,    BSD, ET|RIGHT}, /* FreeBSD */
+{"etimes",    "ELAPSED", pr_etimes,   sr_etime,   7,   0,    BSD, ET|RIGHT}, /* FreeBSD */
 {"euid",      "EUID",    pr_euid,     sr_euid,    5,   0,    LNX, ET|RIGHT},
 {"euser",     "EUSER",   pr_euser,    sr_euser,   8, USR,    LNX, ET|USER},
 {"f",         "F",       pr_flag,     sr_flags,   1,   0,    XXX, ET|RIGHT}, /*flags*/