LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   /proc/net/dev packet counters question (https://www.linuxquestions.org/questions/linux-networking-3/proc-net-dev-packet-counters-question-827407/)

shibeaux 08-20-2010 04:38 AM

/proc/net/dev packet counters question
 
Hi all.

I'm trying to find out what is the difference between wifi0 and ath0 (atheros wifi card) in terms of packet counters shown in proc/net/dev pseudofile.

The fact is that wifi0 and ath0 packet counters are different. I've read that wifi0 refers to the physical device and ath0 refers to virtual device over wifi0, so, as far as I know, packets counters in both devices should be the same, isn't it?

Another annoying question for me is that ath0 doesn't show any erroneous packets, while wifi0 does.

This is the output givwen by proc/net/dev:

Quote:

carlos@PC-083:~$ 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: 668536 6931 0 0 0 0 0 0 668536 6931 0 0 0 0 0 0
ip6tnl0: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
eth2: 60 1 0 0 0 0 0 0 192384 1662 0 0 0 0 0 0
eth0: 0 0 0 0 0 0 0 0 31598 299 0 0 0 0 2 0
wifi0:225264722 366641 1 14519 0 22104 0 0 33263179 136475 123 2 0 0 0 0
ath0:183537595 186262 0 0 0 0 0 0 27768398 134952 2 2 0 0 0 0
zyd0: 163588 1390 418 137 0 418 0 0 34830 823 2 0 0 0 0 0

I hope you can help me with this question.

Thanks in advance.

nini09 08-20-2010 02:15 PM

The wifi0 count every frame, including management and data frame. But the ath0 only count data frame.

shibeaux 08-23-2010 03:32 AM

Thanks a lot for your response!

shibeaux 08-23-2010 03:49 AM

I'm wondering if there is a way to modify these kernel packets counters without the correspondent kernel module modification (as described here ).

I'm developing an interface manager able to throw warnings when the link goes down, for example when PER (Packet Error Rate) crosses an established threshold, so I'm looking for a way to manually test my program, for example modifying kernel packets stats in order to change values of corrupted packets to high PER.

Regards.

nini09 08-23-2010 03:07 PM

Do you try the method that link you mentioned describe? Does it work?

shibeaux 08-25-2010 02:43 AM

No, I haven't done it because I'm unable to compile dev.c successfully. While compiling, it throws the following errors:

Quote:

make -C /lib/modules/2.6.24-5-mip6/build M=/home/carlos/Escritorio/dev modules
make[1]: se ingresa al directorio `/usr/src/linux-headers-2.6.24-5-mip6'
Building modules, stage 2.
MODPOST 1 modules
WARNING: "rtmsg_ifinfo" [/home/carlos/Escritorio/dev/dev_MMII.ko] undefined!
WARNING: "dev_activate" [/home/carlos/Escritorio/dev/dev_MMII.ko] undefined!
WARNING: "netdev_register_kobject" [/home/carlos/Escritorio/dev/dev_MMII.ko] undefined!
WARNING: "open_softirq" [/home/carlos/Escritorio/dev/dev_MMII.ko] undefined!
WARNING: "raise_softirq_irqoff" [/home/carlos/Escritorio/dev/dev_MMII.ko] undefined!
WARNING: "__netdev_watchdog_up" [/home/carlos/Escritorio/dev/dev_MMII.ko] undefined!
WARNING: "dev_mcast_init" [/home/carlos/Escritorio/dev/dev_MMII.ko] undefined!
WARNING: "net_namespace_list" [/home/carlos/Escritorio/dev/dev_MMII.ko] undefined!
WARNING: "__qdisc_run" [/home/carlos/Escritorio/dev/dev_MMII.ko] undefined!
WARNING: "linkwatch_run_queue" [/home/carlos/Escritorio/dev/dev_MMII.ko] undefined!
WARNING: "dev_ethtool" [/home/carlos/Escritorio/dev/dev_MMII.ko] undefined!
WARNING: "do_softirq" [/home/carlos/Escritorio/dev/dev_MMII.ko] undefined!
WARNING: "dst_init" [/home/carlos/Escritorio/dev/dev_MMII.ko] undefined!
WARNING: "netdev_kobject_init" [/home/carlos/Escritorio/dev/dev_MMII.ko] undefined!
WARNING: "__rtnl_unlock" [/home/carlos/Escritorio/dev/dev_MMII.ko] undefined!
WARNING: "dev_deactivate" [/home/carlos/Escritorio/dev/dev_MMII.ko] undefined!
WARNING: "netdev_unregister_kobject" [/home/carlos/Escritorio/dev/dev_MMII.ko] undefined!
WARNING: "wext_proc_init" [/home/carlos/Escritorio/dev/dev_MMII.ko] undefined!
WARNING: "__netpoll_rx" [/home/carlos/Escritorio/dev/dev_MMII.ko] undefined!
WARNING: "dev_shutdown" [/home/carlos/Escritorio/dev/dev_MMII.ko] undefined!
WARNING: "kallsyms_lookup" [/home/carlos/Escritorio/dev/dev_MMII.ko] undefined!
WARNING: "dev_init_scheduler" [/home/carlos/Escritorio/dev/dev_MMII.ko] undefined!
WARNING: "wext_proc_exit" [/home/carlos/Escritorio/dev/dev_MMII.ko] undefined!
WARNING: "wext_handle_ioctl" [/home/carlos/Escritorio/dev/dev_MMII.ko] undefined!
make[1]: se sale del directorio `/usr/src/linux-headers-2.6.24-5-mip6'
I've checked out that necessary libraries are included in dev.c, so I don't figure out how to resolve this. Any ideas?

nini09 08-25-2010 02:23 PM

Do you get .ko file even if there is a lot of warning?


All times are GMT -5. The time now is 05:21 AM.