I recently started to play with kstat and I would like two write a simple script to graph the network usage of all my zones.

After some research I found everything needed under link:0:::. I am primarily interested by the packet and byte count but these counters are available in two versions:

  • link:0:::*bytes
  • link:0:::*bytes64

and same for the packet count with:

  • link:0:::*packets
  • link:0:::*packets64

The packet count appear to be same but not the byte count.

Could somebody explain the difference between these counters and their 64 versions ? Additionally any documentation or reference on kstat counters in general would be of a great help.

Note: moved from serverfault

1 Answer 1


The metrics suffixed by 64 are stored on 64 bit variables while the other ones are stored on 32 bit variables.

There is no difference with the packets counter as you haven't (yet) exceeded 4 Billion (2^32) packets on that interface but as there already has been more than 4 GiB transmitted, the values are different between packets and packets64.

The bottom line is: use the *64 counters when available.

Most kstat metrics best documentation is the kernel source code.

  • Thank you, exactly what I wall looking for. Most kstat metrics best documentation is the kernel source code. That's what I was fearing
    – ITChap
    Nov 23, 2015 at 4:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .