Font size
Worksheets5. 201.3 Kernel runtime management and troubleshooting
Total questions: 85
Worksheet time: 53mins
Type the command to list the kernel modules loaded:
(a)
"This command is used to insert and load modules to the kernel. To load modules you should be logged in as a superuser"
(a)
Which parameter of the "insmod" command writes results to syslog instead of the terminal?
insmod -a
insmod -c
insmod -s
insmod -v
insmod -l
Let's suppose you have the kernel version 5.15.0-52-generic. What should be the full path of the folder containing most of the kernel modules?
(a)
You have the next kernel module: /lib/modules/6.0.8/kernel/net/wireless/lib80211.ko
Type the full command to load that module to the kernel.
(a)
Which commands are used to remove a module from the kernel?
insmod
lsmod
rmmod
modprobe -r
delmod
How can you remove the next module:
/lib/modules/6.0.8/kernel/net/wireless/lib80211.ko
(a)
"It is used to insert modules. However, it has the ability to load single modules, modules, and their prerequisites, or all modules stored in a specific directory. It also is more specific in its error messages than insmod"
insmod
lsmod
loadmod
modprobe
rmmod
"If the module is dependent upon other modules these will be loaded first. The modprobe command determines prerequisite relationships between modules by reading the file ___________".
/lib/modules/kernel-version/modules.dep
/lib/modules/modules.dep/
/lib/modules/kernel-version/modules.dep.bin
/lib/modules/kernel-version/kernel/modules.dep
"Loads all the modules specified on the line".
modprobe -a
modprobe -c
modprobe -l
modprobe -s
modinfo -h
"Displays a complete module configuration, including defaults and directives found in /etc/modules.conf".
modprobe -a
modprobe -c
modprobe -l
modprobe -s
modinfo -h
"List modules. Now, it’s no longer available".
modprobe -a
modprobe -c
modprobe -l
modprobe -s
modinfo -h
"Displays results in syslog instead of on the terminal".
modprobe -a
modprobe -c
modprobe -l
modprobe -s
modinfo -h
"Set verbose mode".
modprobe -a
modprobe -v
modprobe -l
modprobe -s
modinfo -h
"Module configuration is handled in the file (1)___________. If this file does not exist the modprobe utility will try to read the (2)___________ instead. But the last is deprecated".
Which files does the above statement refer to?
(1) /etc/modules.conf
(1) /etc/modules-load.d/modules.conf
(2) /etc/conf.modules
(2) /lib/modules/kernel-version/modules.dep
"It displays information about a module from its module-object-file".
insmod
lsmod
modinfo
infmod
rmmod
"Display the module's author".
modinfo -a
modinfo -d
modinfo -n
modinfo -p
modinfo -h
"Display the module’s description".
modinfo -a
modinfo -d
modinfo -n
modinfo -p
modinfo -h
"Display the module's filename".
modinfo -a
modinfo -d
modinfo -n
modinfo -p
modinfo -h
"Display the type parameters that a module may support".
modinfo -e
modinfo -t
modinfo -n
modinfo -p
modinfo -h
"Display a small usage screen".
modinfo -e
modinfo -t
modinfo -n
modinfo -n
modinfo -h
"Display the version of modinfo".
modinfo -e
modinfo -v
modinfo -n
modinfo -V
modinfo -h
Which file is used to control assignments of the resources a module uses, such as hardware interrupts or Direct Memory Access (DMA) channels?
/proc/sys/kernel/
/etc/conf.modules
/lib/modules/kernel-version/modules.dep
/etc/modules.conf
"The command __________ causes a specified shell command to be executed to start the execution of a module prior to install it".
pre-boot
pre-load
pre-install
load
The module on the path /etc/init.d/pcmcia should be started.
But, first, the pcmcia_core should be installed.
Type the complete command to install and start the module execution.
(a)
"The command __________ can determine module dependencies and install prerequisite modules automatically.".
insmod
lsmod
rmmod
modprobe
delmod
The command modprobe can determine module dependencies and install prerequisite modules automatically. To do this, modprobe scans the first column of ____________ to find the module it is to install.
/lib/modules/kernel-version/modules.conf
/lib/modules/kernel-version/modules.dep
/lib/modules/modules.dep
/lib/modules/dependencies.conf
Type the full path of the file containing module dependencies on a Linux Kernel 5.15.0-52-generic
(a)
"This command probes all modules and tries to recreate them".
insmod
loadmod
rmmod
depmod
delmod
Let's suppose you have a Linux Kernel 5.15.0-52-generic.
When you run the depmod command, which file is regenerated?
(a)
"Both _________ and _________ provide for dynamic loading of kernel-modules."
insmod
loadmod
kmod
depmod
kerneld
To use kmod, which two options should be enabled while compiling a kernel?
CONFIG_MOD
CONFIG_KMOD
CONFIG_MODULES
CONFIG_CONFIG_KMOD
"Installing the kernel means installing the following files into the /boot directory". (Choose four correct answers):
system.map-2.6.x
config-2.6.x
vmlinuz-2.6.x
initrd.img-2.6.x
System.kern-2.6.x
"Besides building and installing a kernel on a local machine, you can also create packages that allow you to distribute your newly built kernel to other machines".
Which are three commands for this reason:
make rpm-pkg
make rpm-ko
make binrpm-pkg
make deb-pkg
make deb-kern.ko
"Builds both source and binary RPM packages".
make rpm-pkg
make rpm-ko
make binrpm-pkg
make deb-pkg
make deb-kern.ko
"Builds (only) binary kernel RPM package".
make rpm-bin
make rpm-ko
make binrpm-pkg
make deb-pkg
make deb-kern.ko
"Builds the kernel package as a deb(ian) package".
make deb-pack
make rpm-ko
make binrpm-pkg
make deb-pkg
make deb-kern.ko
"The folder is a pseudo-filesystem, meaning that its contents are directly presented by the kernel. It contains directories and other files that reflect the state of the running system".
/
/proc
/run
/boot
/var
"It contains the generic systemwide commands".
/
/bin
/run
/boot
/var
"It's the top-level directory for data that will be constantly changing (logs etc.)".
/
/bin
/run
/boot
/var
"It contains data related to services the system provides (e.g. a webserver)".
/srv
/bin
/serv
/boot
/var
"It holds temporary files".
/srv
/temp
/tmp
/boot
/var
"It's where USB disks, tape-units and other devices that contain a filesystem can be mounted temporarily".
/dev
/temp
/mnt
/mount
/var
"They are used to hold modules and other libraries".
/lib
/temp
/lib32
/mount
/lib64
"It holds files used during boot".
/boot
/temp
/lib32
/mount
/lib64
"It's under which we find special commands for the system administrator".
/boot
/sbin
/lib32
/bin
/lib64
"It's for third party packages".
/boot
/sbin
/home
/opt
/lib64
"It contains the configuration files for your system".
/etc
/sbin
/home
/opt
/lib64
"It contains commands which are part of the distribution".
/etc
/bin/
/usr/local/bin
/opt
/lib64
"It contains commands that are non-mandatory or added later by the system administrator".
/etc
/usr/bin/
/usr/local/bin
/opt
/lib64
"It contains commands that are specific to the local system".
/usr/local/bin
/usr/bin/
/etc/local/bin
/opt
/lib64
"This directory contains directories with kernel modules needed for the kernel. These directories are created after building the kernel with make modules_install".
/lib/modules/
/lib/modules/modules.dep
/lib/modules
/etc/modules.conf
/etc/conf.modules
"It's a useful diagnostic, instructional, and debugging tool. It intercepts and records the system calls which are called by a process and the signals which are received by a process."
strace
strings
ltrace
iptrace
pstrace
Type the full command to trace the system call of the command "ls":
(a)
"It counts the number of system calls made by 'ls' command".
strace ls
strace -c
strace -e
strace -C
Which command will show the specific write call made for the command "ls":
strace -e trace=wr ls
strace -w ls
strace -e trace=write ls
strace -C
What command store the output of the system calls made by the ls command, into the file output.txt
strace -c output.txt ls
strace -w ls output.txt
strace -e trace=write ls
strace -o output.txt ls
"It's used to see the text inside a binary or data file".
strace
strings
ltrace
iptrace
pstrace
Type the full command to see the text inside the binary /usr/bin/mtr
(a)
"It intercepts and records the dynamic library calls which are called by the executed process and the signals which are received by that process".
strace
strings
ltrace
iptrace
pstrace
Type the full command to intercept and records the dynamic library calls of the program in /usr/bin/mtr
(a)
"It prints system information such as machine type, network hostname, OS release, OS name, OS version, and processor type of the host".
host
uname
lspci
lsusb
"It prints all information (machine type, network hostname, OS release, OS name, OS version, and processor type of the host"
uname -a
uname -n
uname -s
uname -r
"It prints the kernel name".
uname -a
uname -n
uname -s
uname -r
"It prints the network node hostname".
uname -a
uname -n
uname -s
uname -r
"It prints the kernel build version, date, and time".
uname -p
uname -m
uname -v
uname -i
"It prints the machine hardware architecture name".
uname -p
uname -m
uname -v
uname -i
"It prints the name of the processor type".
uname -p
uname -n
uname -v
uname -i
"It prints the name of the operating system".
uname -p
uname -m
uname -o
uname -i
"It's a directory in the /proc pseudo filesystem. It contains files that allow you to tune and monitor the Linux kernel".
/proc/sys/kernel/
/proc/sys/kernel/osrelease
/proc/sys/
/proc/sys/bus/
"This file contains the version of the running kernel".
/proc/sys/kernel/osrelease
/proc/sys/kernel/osversion
/proc/sys/kernel/linux-release
/proc/sys/kernel/linux-version
Type the command to prompt the kernel to auto-reboot after 20 seconds of facing a kernel panic:
(a)
"With ________ you can display information about all the PCI buses in the system and all the devices that are connected to them. Access to some parts of the PCI configuration space is restricted to root on many operating systems".
lsusb
lspci
pciinfo
/proc/sys/pci
"It checks the USB buses and devices".
lsusb
lspci
pciinfo
/proc/sys/pci
"It displays information about installed hardware. It gathers information from interrupts, DMA files, and ioports from the /proc directory. It gives a quick overview about which device is using what I/O address and IRQ/DMA channel".
lsusb
lspci
lsdev
/proc/sys/pci
"To use this command, in some distributions you should firstly install the package procinfo as __________, instead, you could use __________ command".
apt install lsdev
apt install procinfo
lsdev
procinfo
"lsdev gathers information from three main files:"
/proc/sys/kernel
/proc/sys/devices
/proc/interrupts
/proc/ioports
/proc/dma
"It's used to modify kernel parameters at runtime. The parameters available are those listed under /proc/sys/".
udev
lsdev
lsusb
sysctl
Type the full path of the sysctl configuration file:
(a)
"It was designed to make Linux device handling more flexible and safe by taking device handling out of system space into userspace".
/dev/
udev
kernel
lsdev
"Consists of a userspace daemon which receives "uevents" from the kernel. Communication between the userspace daemon and the kernel is done through the sysfs pseudo filesystem".
/dev/
udev
kernel
lsdev
Type the full path of the directory that contains the configuration and the rule files for the udev utility:
(a)
Type the full path of the directory containing the default udev rules:
(a)
"Custom rules to override the default rules in /lib/udev/rules.d/ are specified in the (a) directory".
"This command will print udev and kernel uevents to standard output. You can use it to analyze event timing by comparing the timestamps of the kernel uevent and the udev event"
lsudev
lsevent
udevmonitor
lsudevadm
udevadm monitor
