On Wed, Apr 12, 2000 at 09:13:23PM +0800, netpub wrote:
> Dear sir.
>     My name is shijing. Now, I think of programing a process to get Linux's kernel 
>diversified statistics information, which include net NIC data. But I don't find 
>similarity system call "kstat_open" in linux. I wish get your help.
On Linux the /proc hierarchy is used for this, e.g.:

cat /proc/net/dev     
Inter-|   Receive                                                |  Transmit
 face |bytes    packets errs drop fifo frame compressed multicast|bytes    packets 
errs drop fifo colls carrier compressed
    lo: 9484546   34216    0    0    0     0          0         0  9484546   34216    
0    0    0     0       0          0
 dummy:       0       0    0    0    0     0          0         0        0       0    
0    0    0     0       0          0
  eth0:3643795260 15300041   30    0    0    30          0         0 2153331484 
9260819    0    0    0 205085     406          0
  ppp1:     547      11    0    0    0     0          0         0     3021      20    
0    0    0     0       0          0
  ppp0:   45557     815    0    0    0     0          0         0  1690487    1308    
0    0    0     0       0          0


-- 
Frank

Reply via email to