Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Setting display columns

    Scheduled Pinned Locked Moved General pfSense Questions
    6 Posts 3 Posters 719 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • JKnottJ
      JKnott
      last edited by

      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?

      PfSense running on Qotom mini PC
      i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
      UniFi AC-Lite access point

      I haven't lost my mind. It's around here...somewhere...

      1 Reply Last reply Reply Quote 0
      • NogBadTheBadN
        NogBadTheBad
        last edited by

        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>

        Andy

        1 x Netgate SG-4860 - 3 x Linksys LGS308P - 1 x Aruba InstantOn AP22

        1 Reply Last reply Reply Quote 0
        • JKnottJ
          JKnott
          last edited by

          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.

          PfSense running on Qotom mini PC
          i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
          UniFi AC-Lite access point

          I haven't lost my mind. It's around here...somewhere...

          1 Reply Last reply Reply Quote 0
          • johnpozJ
            johnpoz LAYER 8 Global Moderator
            last edited by

            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…

            An intelligent man is sometimes forced to be drunk to spend time with his fools
            If you get confused: Listen to the Music Play
            Please don't Chat/PM me for help, unless mod related
            SG-4860 24.11 | Lab VMs 2.8, 24.11

            1 Reply Last reply Reply Quote 0
            • JKnottJ
              JKnott
              last edited by

              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.

              PfSense running on Qotom mini PC
              i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
              UniFi AC-Lite access point

              I haven't lost my mind. It's around here...somewhere...

              1 Reply Last reply Reply Quote 0
              • johnpozJ
                johnpoz LAYER 8 Global Moderator
                last edited by

                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..

                long.png
                long.png_thumb

                An intelligent man is sometimes forced to be drunk to spend time with his fools
                If you get confused: Listen to the Music Play
                Please don't Chat/PM me for help, unless mod related
                SG-4860 24.11 | Lab VMs 2.8, 24.11

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post
                Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.