Merge branch 'master' of gitorious.org:procps/procps

This commit is contained in:
Craig Small 2013-05-23 21:54:33 +10:00
commit 4d35bbb36d
4 changed files with 47 additions and 37 deletions

2
NEWS
View File

@ -6,6 +6,8 @@ procps-ng-3.3.8
Debian #707648 Debian #707648
* eliminate the potential library segmentation fault * eliminate the potential library segmentation fault
Debian #706259, RedHat #951391 Debian #706259, RedHat #951391
* top now accomodates a window manager like 'screen'
RedHat #962022
procps-ng-3.3.7 procps-ng-3.3.7

View File

@ -1533,6 +1533,9 @@ static const format_struct format_array[] = {
{"login", "LOGNAME", pr_nop, sr_nop, 8, 0, BSD, AN|LEFT}, /*logname*/ /* double check */ {"login", "LOGNAME", pr_nop, sr_nop, 8, 0, BSD, AN|LEFT}, /*logname*/ /* double check */
{"logname", "LOGNAME", pr_nop, sr_nop, 8, 0, XXX, AN|LEFT}, /*login*/ {"logname", "LOGNAME", pr_nop, sr_nop, 8, 0, XXX, AN|LEFT}, /*login*/
{"longtname", "TTY", pr_tty8, sr_tty, 8, 0, DEC, PO|LEFT}, {"longtname", "TTY", pr_tty8, sr_tty, 8, 0, DEC, PO|LEFT},
#ifdef WITH_SYSTEMD
{"lsession", "SESSION", pr_sd_session, sr_nop, 11, 0, LNX, ET|LEFT},
#endif
{"lstart", "STARTED", pr_lstart, sr_nop, 24, 0, XXX, ET|RIGHT}, {"lstart", "STARTED", pr_lstart, sr_nop, 24, 0, XXX, ET|RIGHT},
{"luid", "LUID", pr_nop, sr_nop, 5, 0, LNX, ET|RIGHT}, /* login ID */ {"luid", "LUID", pr_nop, sr_nop, 5, 0, LNX, ET|RIGHT}, /* login ID */
{"luser", "LUSER", pr_nop, sr_nop, 8, USR, LNX, ET|USER}, /* login USER */ {"luser", "LUSER", pr_nop, sr_nop, 8, USR, LNX, ET|USER}, /* login USER */
@ -1545,6 +1548,9 @@ static const format_struct format_array[] = {
{"m_size", "SIZE", pr_size, sr_size, 5, MEM, LNX, PO|RIGHT}, {"m_size", "SIZE", pr_size, sr_size, 5, MEM, LNX, PO|RIGHT},
{"m_swap", "SWAP", pr_nop, sr_nop, 5, 0, LNx, PO|RIGHT}, {"m_swap", "SWAP", pr_nop, sr_nop, 5, 0, LNx, PO|RIGHT},
{"m_trs", "TRS", pr_trs, sr_trs, 5, MEM, LNx, PO|RIGHT}, {"m_trs", "TRS", pr_trs, sr_trs, 5, MEM, LNx, PO|RIGHT},
#ifdef WITH_SYSTEMD
{"machine", "MACHINE", pr_sd_machine, sr_nop, 31, 0, LNX, ET|LEFT},
#endif
{"maj_flt", "MAJFL", pr_majflt, sr_maj_flt, 6, 0, LNX, AN|RIGHT}, {"maj_flt", "MAJFL", pr_majflt, sr_maj_flt, 6, 0, LNX, AN|RIGHT},
{"majflt", "MAJFLT", pr_majflt, sr_maj_flt, 6, 0, XXX, AN|RIGHT}, {"majflt", "MAJFLT", pr_majflt, sr_maj_flt, 6, 0, XXX, AN|RIGHT},
{"min_flt", "MINFL", pr_minflt, sr_min_flt, 6, 0, LNX, AN|RIGHT}, {"min_flt", "MINFL", pr_minflt, sr_min_flt, 6, 0, LNX, AN|RIGHT},
@ -1565,6 +1571,9 @@ static const format_struct format_array[] = {
{"osz", "SZ", pr_nop, sr_nop, 2, 0, SUN, PO|RIGHT}, {"osz", "SZ", pr_nop, sr_nop, 2, 0, SUN, PO|RIGHT},
{"oublk", "OUBLK", pr_nop, sr_nop, 5, 0, BSD, AN|RIGHT}, /*oublock*/ {"oublk", "OUBLK", pr_nop, sr_nop, 5, 0, BSD, AN|RIGHT}, /*oublock*/
{"oublock", "OUBLK", pr_nop, sr_nop, 5, 0, DEC, AN|RIGHT}, /*oublk*/ {"oublock", "OUBLK", pr_nop, sr_nop, 5, 0, DEC, AN|RIGHT}, /*oublk*/
#ifdef WITH_SYSTEMD
{"ouid", "OWNER", pr_sd_ouid, sr_nop, 5, 0, LNX, ET|LEFT},
#endif
{"p_ru", "P_RU", pr_nop, sr_nop, 6, 0, BSD, AN|RIGHT}, {"p_ru", "P_RU", pr_nop, sr_nop, 6, 0, BSD, AN|RIGHT},
{"paddr", "PADDR", pr_nop, sr_nop, 6, 0, BSD, AN|RIGHT}, {"paddr", "PADDR", pr_nop, sr_nop, 6, 0, BSD, AN|RIGHT},
{"pagein", "PAGEIN", pr_majflt, sr_maj_flt, 6, 0, XXX, AN|RIGHT}, {"pagein", "PAGEIN", pr_majflt, sr_maj_flt, 6, 0, XXX, AN|RIGHT},
@ -1606,12 +1615,7 @@ static const format_struct format_array[] = {
{"scnt", "SCNT", pr_nop, sr_nop, 4, 0, DEC, AN|RIGHT}, /* man page misspelling of scount? */ {"scnt", "SCNT", pr_nop, sr_nop, 4, 0, DEC, AN|RIGHT}, /* man page misspelling of scount? */
{"scount", "SC", pr_nop, sr_nop, 4, 0, AIX, AN|RIGHT}, /* scnt==scount, DEC claims both */ {"scount", "SC", pr_nop, sr_nop, 4, 0, AIX, AN|RIGHT}, /* scnt==scount, DEC claims both */
#ifdef WITH_SYSTEMD #ifdef WITH_SYSTEMD
{"sd_machine","MACHINE", pr_sd_machine, sr_nop, 31, 0, LNX, ET|LEFT}, {"seat", "SEAT", pr_sd_seat, sr_nop, 11, 0, LNX, ET|LEFT},
{"sd_ouid", "OWNER", pr_sd_ouid, sr_nop, 5, 0, LNX, ET|LEFT},
{"sd_seat", "SEAT", pr_sd_seat, sr_nop, 11, 0, LNX, ET|LEFT},
{"sd_session","SESSION", pr_sd_session, sr_nop, 11, 0, LNX, ET|LEFT},
{"sd_unit", "UNIT", pr_sd_unit, sr_nop, 31, 0, LNX, ET|LEFT},
{"sd_uunit", "UUNIT", pr_sd_uunit, sr_nop, 31, 0, LNX, ET|LEFT},
#endif #endif
{"sess", "SESS", pr_sess, sr_session, 5, 0, XXX, PO|PIDMAX|RIGHT}, {"sess", "SESS", pr_sess, sr_session, 5, 0, XXX, PO|PIDMAX|RIGHT},
{"session", "SESS", pr_sess, sr_session, 5, 0, LNX, PO|PIDMAX|RIGHT}, {"session", "SESS", pr_sess, sr_session, 5, 0, LNX, PO|PIDMAX|RIGHT},
@ -1679,6 +1683,9 @@ static const format_struct format_array[] = {
{"uid_hack", "UID", pr_euser, sr_euser, 8, USR, XXX, ET|USER}, {"uid_hack", "UID", pr_euser, sr_euser, 8, USR, XXX, ET|USER},
{"umask", "UMASK", pr_nop, sr_nop, 5, 0, DEC, AN|RIGHT}, {"umask", "UMASK", pr_nop, sr_nop, 5, 0, DEC, AN|RIGHT},
{"uname", "USER", pr_euser, sr_euser, 8, USR, DEC, ET|USER}, /* man page misspelling of user? */ {"uname", "USER", pr_euser, sr_euser, 8, USR, DEC, ET|USER}, /* man page misspelling of user? */
#ifdef WITH_SYSTEMD
{"unit", "UNIT", pr_sd_unit, sr_nop, 31, 0, LNX, ET|LEFT},
#endif
{"upr", "UPR", pr_nop, sr_nop, 3, 0, BSD, TO|RIGHT}, /*usrpri*/ {"upr", "UPR", pr_nop, sr_nop, 3, 0, BSD, TO|RIGHT}, /*usrpri*/
{"uprocp", "UPROCP", pr_nop, sr_nop, 8, 0, BSD, AN|RIGHT}, {"uprocp", "UPROCP", pr_nop, sr_nop, 8, 0, BSD, AN|RIGHT},
{"user", "USER", pr_euser, sr_euser, 8, USR, U98, ET|USER}, /* BSD n forces this to UID */ {"user", "USER", pr_euser, sr_euser, 8, USR, U98, ET|USER}, /* BSD n forces this to UID */
@ -1686,6 +1693,9 @@ static const format_struct format_array[] = {
{"usrpri", "UPR", pr_nop, sr_nop, 3, 0, DEC, TO|RIGHT}, /*upr*/ {"usrpri", "UPR", pr_nop, sr_nop, 3, 0, DEC, TO|RIGHT}, /*upr*/
{"util", "C", pr_c, sr_pcpu, 2, 0, SGI, ET|RIGHT}, // not sure about "C" {"util", "C", pr_c, sr_pcpu, 2, 0, SGI, ET|RIGHT}, // not sure about "C"
{"utime", "UTIME", pr_nop, sr_utime, 6, 0, LNx, ET|RIGHT}, {"utime", "UTIME", pr_nop, sr_utime, 6, 0, LNx, ET|RIGHT},
#ifdef WITH_SYSTEMD
{"uunit", "UUNIT", pr_sd_uunit, sr_nop, 31, 0, LNX, ET|LEFT},
#endif
{"vm_data", "DATA", pr_nop, sr_vm_data, 5, 0, LNx, PO|RIGHT}, {"vm_data", "DATA", pr_nop, sr_vm_data, 5, 0, LNx, PO|RIGHT},
{"vm_exe", "EXE", pr_nop, sr_vm_exe, 5, 0, LNx, PO|RIGHT}, {"vm_exe", "EXE", pr_nop, sr_vm_exe, 5, 0, LNx, PO|RIGHT},
{"vm_lib", "LIB", pr_nop, sr_vm_lib, 5, 0, LNx, PO|RIGHT}, {"vm_lib", "LIB", pr_nop, sr_vm_lib, 5, 0, LNx, PO|RIGHT},

42
ps/ps.1
View File

@ -1311,6 +1311,10 @@ time the command started. See also
.BR bsdstart , \ start , \ start_time ", and" \ stime . .BR bsdstart , \ start , \ start_time ", and" \ stime .
T} T}
lsession SESSION T{
displays login session identifier of a process.
T}
lwp LWP T{ lwp LWP T{
light weight process (thread) ID of the dispatchable entity (alias light weight process (thread) ID of the dispatchable entity (alias
.BR spid , \ tid ). .BR spid , \ tid ).
@ -1319,6 +1323,10 @@ See
for additional information. for additional information.
T} T}
machine MACHINE T{
displays machine name for processes assigned to VM or container.
T}
maj_flt MAJFLT T{ maj_flt MAJFLT T{
The number of major page faults that have occurred with this process. The number of major page faults that have occurred with this process.
T} T}
@ -1353,6 +1361,10 @@ if you want the kernel function name). Running tasks will display a dash
('\-') in this column. ('\-') in this column.
T} T}
ouid OWNER T{
displays the Unix user identifier of the owner of the session of a process.
T}
pcpu %CPU T{ pcpu %CPU T{
see see
.BR %cpu . .BR %cpu .
@ -1489,30 +1501,10 @@ SCHED_FIFO, SCHED_RR, SCHED_BATCH, SCHED_ISO, and SCHED_IDLE are respectively
displayed as 0, 1, 2, 3, 4, and 5. displayed as 0, 1, 2, 3, 4, and 5.
T} T}
sd_machine MACHINE T{ seat SEAT T{
displays machine name for processes assigned to VM or container.
T}
sd_ouid OWNER T{
displays the Unix user identifier of the owner of the session of a process.
T}
sd_seat SEAT T{
displays login session identifier of a process. displays login session identifier of a process.
T} T}
sd_session SESSION T{
displays login session identifier of a process.
T}
sd_unit UNIT T{
displays systemd unit which a process belongs to.
T}
sd_uunit UUNIT T{
displays systemd user unit which a process belongs to.
T}
sess SESS T{ sess SESS T{
session ID or, equivalently, the process ID of the session leader. (alias session ID or, equivalently, the process ID of the session leader. (alias
.BR session , \ sid ). .BR session , \ sid ).
@ -1732,6 +1724,10 @@ see
.BR euser , \ user ). .BR euser , \ user ).
T} T}
unit UNIT T{
displays systemd unit which a process belongs to.
T}
user USER T{ user USER T{
see see
.BR euser . .BR euser .
@ -1739,6 +1735,10 @@ see
.BR euser , \ uname ). .BR euser , \ uname ).
T} T}
uunit UUNIT T{
displays systemd user unit which a process belongs to.
T}
vsize VSZ T{ vsize VSZ T{
see see
.BR vsz . .BR vsz .

View File

@ -350,16 +350,14 @@ static void at_eoj (void) {
if (Ttychanged) { if (Ttychanged) {
tcsetattr(STDIN_FILENO, TCSAFLUSH, &Tty_original); tcsetattr(STDIN_FILENO, TCSAFLUSH, &Tty_original);
if (keypad_local) putp(keypad_local); if (keypad_local) putp(keypad_local);
if (exit_ca_mode) putp("\n");
if (exit_ca_mode) {
// this next will also replace top's most recent screen with the // this next will also replace top's most recent screen with the
// original display contents that were visible at our invocation // original display contents that were visible at our invocation
putp(exit_ca_mode); putp(exit_ca_mode);
else {
// but if we can't, we'll simply do it as old top always used to
putp(tg2(0, Screen_rows));
putp("\n");
} }
putp(Cap_curs_norm); putp(Cap_curs_norm);
putp(Cap_clr_eol);
#ifndef RMAN_IGNORED #ifndef RMAN_IGNORED
putp(Cap_smam); putp(Cap_smam);
#endif #endif
@ -756,7 +754,6 @@ static int show_pmt (const char *str) {
* Show a special coordinate message, in support of scrolling */ * Show a special coordinate message, in support of scrolling */
static inline void show_scroll (void) { static inline void show_scroll (void) {
PUTT(Scroll_fmts, tg2(0, Msg_row), Frame_maxtask); PUTT(Scroll_fmts, tg2(0, Msg_row), Frame_maxtask);
putp(tg2(0, Msg_row));
} // end: show_scroll } // end: show_scroll
@ -5445,7 +5442,7 @@ static void frame_hlp (int wix, int max) {
* (*subordinate* functions invoked know WHEN the user's had) * (*subordinate* functions invoked know WHEN the user's had)
* (ENOUGH already. And at Frame End, it SHOULD be apparent) * (ENOUGH already. And at Frame End, it SHOULD be apparent)
* (WE am d'MAN -- clearing UNUSED screen LINES and ensuring) * (WE am d'MAN -- clearing UNUSED screen LINES and ensuring)
* (the CURSOR is STUCK in just the RIGHT place, know what I) * (that those auto-sized columns are addressed, know what I)
* (mean? Huh, "doesn't DO MUCH"! Never, EVER think or say) * (mean? Huh, "doesn't DO MUCH"! Never, EVER think or say)
* (THAT about THIS function again, Ok? Good that's better.) * (THAT about THIS function again, Ok? Good that's better.)
* *
@ -5474,7 +5471,10 @@ static void frame_make (void) {
Tree_idx = Pseudo_row = Msg_row = scrlins = 0; Tree_idx = Pseudo_row = Msg_row = scrlins = 0;
summary_show(); summary_show();
Max_lines = (Screen_rows - Msg_row) - 1; Max_lines = (Screen_rows - Msg_row) - 1;
OFFw(Curwin, INFINDS_xxx); OFFw(w, INFINDS_xxx);
if (VIZISw(w) && CHKw(w, View_SCROLL)) show_scroll();
else PUTT("%s%s", tg2(0, Msg_row), Cap_clr_eol);
if (!Rc.mode_altscr) { if (!Rc.mode_altscr) {
// only 1 window to show so, piece o' cake // only 1 window to show so, piece o' cake
@ -5498,8 +5498,6 @@ static void frame_make (void) {
putp(Cap_nl_clreos); putp(Cap_nl_clreos);
PSU_CLREOS(Pseudo_row); PSU_CLREOS(Pseudo_row);
} }
if (VIZISw(w) && CHKw(w, View_SCROLL)) show_scroll();
else PUTT("%s%s", tg2(0, Msg_row), Cap_clr_eol);
fflush(stdout); fflush(stdout);
/* we'll deem any terminal not supporting tgoto as dumb and disable /* we'll deem any terminal not supporting tgoto as dumb and disable