Re: explanation about /proc/net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Somebody in the thread at some point said:
> Hi all
> 
> How can I find out the /proc/net info
> 
> eg: softnet_stat is for what purpose

In the kernel sources

./Documentation/filesystems/proc.txt

contains some information on /proc/net goodies.

For offroad stuff like softnet_stat though, your best friend is grepping
the kernel sources

$ cat /proc/net/softnet_stat
0cd35244 00000000 00000f10 00000000 00000000 00000000 00000000 00000000
00000000
01bde35c 00000000 00000157 00000000 00000000 00000000 00000000 00000000
00000000
$ grep softnet_stat * -R
...
core/dev.c:     if (!proc_net_fops_create("softnet_stat", S_IRUGO,
&softnet_seq_fops))
core/dev.c:     proc_net_remove("softnet_stat");

./net/core/dev.c

static int softnet_seq_show(struct seq_file *seq, void *v)
{
        struct netif_rx_stats *s = v;

        seq_printf(seq, "%08x %08x %08x %08x %08x %08x %08x %08x %08x\n",
                   s->total, s->dropped, s->time_squeeze, 0,
                   0, 0, 0, 0, /* was fastroute */
                   s->cpu_collision );
        return 0;
}

$ grep "struct netif_rx_stats" include/* -R
include/linux/netdevice.h:struct netif_rx_stats
include/linux/netdevice.h:DECLARE_PER_CPU(struct netif_rx_stats,
netdev_rx_stat);

struct netif_rx_stats
{
        unsigned total;
        unsigned dropped;
        unsigned time_squeeze;
        unsigned cpu_collision;
};

no comments...

-Andy

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux