LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-20-2010, 04:38 AM   #1
shibeaux
LQ Newbie
 
Registered: Nov 2008
Posts: 24

Rep: Reputation: 15
/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.
 
Old 08-20-2010, 02:15 PM   #2
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,718

Rep: Reputation: 143Reputation: 143
The wifi0 count every frame, including management and data frame. But the ath0 only count data frame.
 
Old 08-23-2010, 03:32 AM   #3
shibeaux
LQ Newbie
 
Registered: Nov 2008
Posts: 24

Original Poster
Rep: Reputation: 15
Thanks a lot for your response!
 
Old 08-23-2010, 03:49 AM   #4
shibeaux
LQ Newbie
 
Registered: Nov 2008
Posts: 24

Original Poster
Rep: Reputation: 15
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.
 
Old 08-23-2010, 03:07 PM   #5
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,718

Rep: Reputation: 143Reputation: 143
Do you try the method that link you mentioned describe? Does it work?
 
Old 08-25-2010, 02:43 AM   #6
shibeaux
LQ Newbie
 
Registered: Nov 2008
Posts: 24

Original Poster
Rep: Reputation: 15
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?
 
Old 08-25-2010, 02:23 PM   #7
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,718

Rep: Reputation: 143Reputation: 143
Do you get .ko file even if there is a lot of warning?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
problem in statistic /proc/net/dev nima0102 Linux - Networking 1 06-30-2010 04:33 AM
/proc/net/dev format vlyamtse Linux - General 1 06-08-2007 10:34 AM
/proc/dev/net and /proc/net/dev problem ! Linux.tar.gz Slackware 1 05-23-2007 05:24 AM
read /proc/net/dev with sscanf? Thinking Linux - General 0 03-30-2005 09:14 AM
Question about /proc/net/devc alitrix Linux - Networking 0 02-23-2004 12:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration