Setting display columns
-
When running netstat -r, I noticed that the IPv6 addresses have been truncated, apparently due to display limitations. I assume this is because the terminal is configured to be 80 columns. In Linux, it's possible to modify the setting isn termcap to control the terminal behaviour, but I don't see anything different in FreeBSD. Is there any way to configure the ssh consoles to use more than 80 columns?
-
Think its the netstat command rather than the terminal, you can tell how many columns the terminal thinks is available via a stty -a
[2.4.2-RELEASE][admin@pfsense]/root: stty -a
speed 9600 baud; 24 rows; 132 columns;
lflags: icanon isig iexten echo echoe -echok echoke -echonl echoctl
-echoprt -altwerase -noflsh -tostop -flusho -pendin -nokerninfo
-extproc
iflags: -istrip icrnl -inlcr -igncr ixon -ixoff ixany imaxbel -ignbrk
brkint -inpck -ignpar -parmrk
oflags: opost onlcr -ocrnl tab0 -onocr -onlret
cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow
-dtrflow -mdmbuf
cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = <undef>;
eol2 = <undef>; erase = ^?; erase2 = ^H; intr = ^C; kill = ^U;
lnext = ^V; min = 1; quit = ^; reprint = ^R; start = ^Q;
status = ^T; stop = ^S; susp = ^Z; time = 0; werase = ^W;
[2.4.2-RELEASE][admin@pfsenset]/root:I default to a terminal 24 x 132, the output from stty -a changes if I resize the terminal window
Actually try a netstat -r -W, a man netstat on my Mac shows :-
"−W In certain displays, avoid truncating addresses even if this causes some fields to overflow."</undef></undef>
-
Hmmm… Mine shows 37 rows, 130 columns, which should be plenty. I couldn't find anything about this in the netstat man page, other than in relation to multicast addresses. The current netstat display might have been fine with IPv4, but comes up short with IPv6.
-
if you just do a -W you should be able to see your full addresses..
so vs doing netstat -r
do a
netstat -rW
that is cap W…
-
That's part way there, but instead of providing wider columns, it just fully shows the addresses, displacing the next column over to make room. Still, it's an improvement.
-
depends… it will overflow if your doing really long ones like with names but if you do a -rnW it should look pretty good even with long address with vlans on them, etc..