Skip to content

humility net counters cannot handle counters with 7+ digits #579

@hawkw

Description

@hawkw

This is low-urgency, but while attempting to show off some of our cool ASCII art to a friend, I noticed that the humility net counters command looks a bit ugly when there are numbers with more than six digits. It screws up both the tables and also the cool Unicode block diagram :(

For example:

eliza@alfred ~ $ pfexec humility -t cosmo-os net counters
humility: attached to 1fc9:0143:WTECYVHYHSQD4 via CMSIS-DAP
 -------------------------------------------------------------------
 |  KSZ8463  |         Transmit         |         Receive          |
 |           |   UC   |   BC   |   MC   |   UC   |   BC   |   MC   |
 |-----------|--------|--------|--------|--------|--------|--------|
 | Port 1    |      0 |      0 | 1296164 |      0 |      0 |      0 |
 | Port 2    |      0 |      0 | 1296164 |      0 |      0 |      0 |
 | Port 3    |      0 |      0 |      0 |      0 |      0 | 2592328 |
 -------------------------------------------------------------------

 -------------------------------------------------------
 |     VSC8562     |     Transmit    |     Receive     |
 |                 |  Good  |   Bad  |  Good  |   Bad  |
 |-----------------------------------------------------|
 | Port 0 | MAC    |   6164 |      0 |      0 |      0 |
 |        | Media  |      0 |      0 |   6164 |      0 |
 | Port 1 | MAC    |   6164 |      0 |      0 |      0 |
 |        | Media  |      0 |      0 |   6164 |      0 |
 -------------------------------------------------------

            ┌──────────────────┐            ┌───────────────────┐
            │ KSZ8463          │            │ VSC85x2           │
            │                  │tx        rx│                   │tx
            │            1296164├───────────►│6164           6164├───────►
            │                  │1          0│                   │0
┌────┐    rx│                 0│◄───────────┤0                 0│◄───────
│    ├─────►│2592328            │rx        tx│                   │rx
│ SP │     3│                  │            │                   │
│    │◄─────┤0                 │tx        rx│                   │tx
└────┘    tx│            1296164├───────────►│6164           6164├───────►
            │                  │2          1│                   │1
            │                 0│◄───────────┤0                 0│◄───────
            │                  │rx        tx│                   │rx
            └──────────────────┘            └───────────────────┘
                                             MEDIA           MAC

eliza@alfred ~ $

Metadata

Metadata

Assignees

Labels

🐛 bugSomething that isn't working.💻 console uiRelated to the console UI.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions