Project

General

Profile

Actions

Feature #4303

closed

want local zone TCP kstats in the global zone

Added by Robert Mustacchi over 9 years ago. Updated over 9 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
kernel
Start date:
2013-11-07
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

The "tcp" module provides a kstat of class "mib2" that's particularly interesting. See INTRO-361. There appears to be one such kstat for each TCP stack, which generally means one such kstat for each zone. However, the local zone ones aren't visible to the global zone.

From the GZ:

# kstat -p -m tcp -c mib2 -s attemptFails
tcp:0:tcp:attemptFails    1

From a local zone on the same system:

$ kstat -p -m tcp -c mib2 -s attemptFails
tcp:0:tcp:attemptFails  16

Note that these things are obviously measuring different things, and I assume the GZ kstat is showing the stats for the GZ's TCP stack while the local zone one is showing the stats for the local zone TCP stack. For work we're doing, we'd need the local-zone kstats available in the global zone. The trick will be naming them, since as we saw above the names of these kstats in the local zone exactly matches that in the GZ, and it's possible that we can't change the naming of the existing kstats because too many tools depend on them. I'm not sure about that.

For what it's worth, the "link" module kstats do something like what we want:

From the global zone:

[root@headnode (coal:0) ~]# kstat -p -m link -s rbytes
link:0:e1000g0:rbytes   87353654
link:0:e1000g1:rbytes   416794441
...
link:0:z24_net0:rbytes  232662551

From the "ca" zone:

# kstat -p -m link -s rbytes
link:0:ca0:rbytes       109146563

Notice that the global zone can see all zones' NICs, while each zone can only see its own. And the kstats are named differently inside the local zone than the are in the GZ. The one thing I'd change is that it would be nice if we could more easily pull out the zonename from the kstat identifier because otherwise we have to maintain our own zoneid/zonename mapping.

--

Actions #1

Updated by Robert Mustacchi over 9 years ago

  • Category set to kernel
  • % Done changed from 0 to 100
  • Tags deleted (needs-triage)

Resolved in 4a0bd0711d2aa8c9386d9c275964fd49a79f7ea5.

Actions #2

Updated by Garrett D'Amore over 9 years ago

  • Status changed from New to Resolved
Actions

Also available in: Atom PDF