Tuning via /proc Filesystem
Figure 5-5 shows the files that can be used either to tune or to view the status of configuration parameters related to the topics covered in this chapter.
In /proc/sys/kernel are the files modprobe and hotplug that can change the pathnames of the two programs introduced earlier in the section "User-Space Helpers."
A few files in /proc export the values within internal data structures and configuration parameters, which are useful to track what resources were allocated by device drivers, shown earlier in the section "Basic Goals of NIC Initialization." For some of these data structures, a user-space command is provided to print their contents in a more user-friendly format. For example, lsmod lists the modules currently loaded, using /proc/modules as its source of information.
In /proc/net, you can find the files created
by
net_dev_init, via dev_proc_init and dev_mcast_init (see the
earlier section "Initializing the Device
Handling Layer: net_dev_init"):
- dev
Displays, for each network device registered with the kernel, a few statistics about reception and transmission, such as bytes received or transmitted, number of packets, errors, etc.
- dev_mcast
Displays, for each network device registered with the kernel, the values of a few parameters used by IP multicast.
- wireless
Similarly to dev, for each wireless device, prints the values of a few parameters from the wireless block returned by the
dev->get_wireless_statsvirtual function. Note thatdev->get_wireless_stats ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access