Page MenuHomeFreeBSD

top(1): increased the maximum length of command shown by "-a"
ClosedPublic

Authored by daichi on Jun 25 2018, 1:13 PM.

Details

Summary

top(1): increased the maximum length of command shown by "-a"

Test Plan

on A terminal:

% touch 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789aaaaaaaaaabbbbbbbbbbccccccccccddddddddddeeeeeeeeeeffffffffffgggggggggghhhhhhhhhhiiiiiiiiiijjjjjjjjjj
% cat - 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789aaaaaaaaaabbbbbbbbbbccccccccccddddddddddeeeeeeeeeeffffffffffgggggggggghhhhhhhhhhiiiiiiiiiijjjjjjjjjj

on B terminal (width is over 210):

% top -a

result:

original top:
  $ top -a -d 1 | grep cat
    785 daichi           1  21    0 11384K  2676K piperd  0   0:00   0.00% grep cat
    779 daichi           1  20    0 10820K  2224K ttyin   0   0:00   0.00% cat - 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789aaaaaaaaaabbbbbbbbbbc
  $

patched top:
  $ /usr/obj/usr/src/amd64.amd64/usr.bin/top/top -a -d 1 | grep cat
    804 daichi           1  20    0 11384K  2676K piperd  0   0:00   0.00% grep cat
    779 daichi           1  20    0 10820K  2224K ttyin   0   0:00   0.00% cat - 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789aaaaaaaaaabbbbbbbbbbccccccccccddddddddddeeeeeeeeeeffffffffffgggggggggghhhhhhhhhhiiiiiiiiiijjjjjjjjjj
  $

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

daichi created this revision.Jun 25 2018, 1:13 PM
gnn accepted this revision.Jun 26 2018, 8:02 AM

Approved.

This revision is now accepted and ready to land.Jun 26 2018, 8:02 AM
eadler accepted this revision.Jun 26 2018, 2:00 PM
This revision was automatically updated to reflect the committed changes.