diff options
Diffstat (limited to 'usr.bin/netstat/main.c')
-rw-r--r-- | usr.bin/netstat/main.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/usr.bin/netstat/main.c b/usr.bin/netstat/main.c index 88ea55a..42e7080 100644 --- a/usr.bin/netstat/main.c +++ b/usr.bin/netstat/main.c @@ -763,6 +763,19 @@ kread(u_long addr, void *buf, size_t size) } /* + * Read single counter(9). + */ +uint64_t +kread_counter(u_long addr) +{ + + if (kvmd_init() < 0) + return (-1); + + return (kvm_counter_u64_fetch(kvmd, addr)); +} + +/* * Read an array of N counters in kernel memory into array of N uint64_t's. */ int |