Linux Kernel Architecture

(Jacob Rumans) #1

Chapter 10: Filesystems without Persistent Storage


ffffffff803962da T skb_seq_read
ffffffff80396468 t skb_ts_get_next_block
...

kcoreis a dynamic core file that ‘‘contains‘‘ all data of the running kernel — that is, the entire contents of
main memory. It is no different from the normal core files that are saved for debugging purposes when
a fatal error in user applications generates a core dump. The current state of a running system can be
inspected using a debugger together with the binary file. Many of the figures in this book illustrating
the interplay among the kernel data structures were prepared using this method. Appendix 2 takes a
closer look at how available capabilities can be used with the help of the GNUgdbdebugger and theddd
graphical user interface.

interruptssaves the number of interrupts raised during the current operation (the underlying mecha-
nism is described in Chapter 14). On an IA-32 quad-core server, the file could look like this:

wolfgang@meitner>cat /proc/interrupts
CPU0 CPU1 CPU2 CPU3
0: 1383211 1407764 1292884 1364817 IO-APIC-edge timer
1: 0 1 1 0 IO-APIC-edge i8042
8: 0 1 0 0 IO-APIC-edge rtc
9: 0 0 0 0 IO-APIC-fasteoi acpi
12: 1 3 0 0 IO-APIC-edge i8042
16: 8327 4251 290975 114077 IO-APIC-fasteoi libata, uhci_hcd:usb1
18: 0 1 0 0 IO-APIC-fasteoi ehci_hcd:usb2, uhci_hcd:usb4,
uhci_hcd:usb7
19: 0 0 0 0 IO-APIC-fasteoi uhci_hcd:usb6
21: 0 0 0 0 IO-APIC-fasteoi uhci_hcd:usb3
22: 267439 93114 10575 5018 IO-APIC-fasteoi libata, libata, HDA Intel
23: 0 0 0 0 IO-APIC-fasteoi uhci_hcd:usb5, ehci_hcd:usb8
4347: 12 17 7 77445 PCI-MSI-edge eth0
NMI: 0 0 0 0
LOC: 5443482 5443174 5446374 5446306
ERR: 0


Not only the number of interrupts but also the name of the device or driver responsible for the interrupt
are given for each interrupt number.

Last but not least, I must mentionloadavganduptime, which display, respectively, the average system
loading (i.e., the length of the run queue) during the last 60 seconds, 5 minutes, and 15 minutes; and the
system uptime — the time elapsed since system boot.

Network Information


The/proc/netsubdirectory supplies data on the various network options of the kernel. The information
held there is a colorful mix of protocol and device dataand includes several interesting entries as follows:

❑ Statistics on UDP and TCP sockets are available for IPv4 inudpandtcp; the equivalent data for
IPv6 are held inudp6andtcp6.Unixsockets are logged inunix.
❑ The ARP table for backward resolution of addresses can be viewed in thearpfile.
❑ devholds statistics on the volume of data transferred via the network interfaces of the
system (including the loopback software interface). This information can be used to check the
Free download pdf