Hello and welcome to this video on System Configuration on Oracle Linux 8.
In this video, we will cover Oracle Linux 8's Proc file system.
For our objectives today, after viewing this video you should be able to:
Describe the Proc File System.
List the top-level files in Proc.
List the process directories in proc.
And lastly you will be able to explain the /proc/sys directory.
The proc directory hierarchy consists of files that provide information about system hardware
and processes.
These files provide insight into kernel operations and those with write permission can be modified
to change the kernel configuration.
It is named after its original purpose, which is an interface to the structures within running
processes to support debugging tools.
Linux adopted this from Solaris but also added the interface to the kernel.
The proc file system became quite messy over the years therefore the sysfs file system
was created to clean it up.
proc can be called a virtual file system because the files within it are virtual files.
There is a great deal of information available from these files, but most show zero size
when listed.
In addition, most of the files are updated frequently.
Virtual files such as /proc/interrupts, /proc/meminfo, /proc/cpuinfo, and /proc/devices provide a
view of the system's hardware.
Others, such as /proc/filesystems and the files under /proc/sys, provide information
about the system's configuration and allow this configuration to be modified.
The following are examples of top-level files in proc:
/proc/buddyinfo: Provides information for diagnosing memory fragmentation
/proc/cmdline: Lists parameters passed to the kernel at boot time
/proc/cpuinfo: Provides CPU information
/proc/crypto: Provides information about installed cryptographic cyphers
/proc/devices: Lists the names and major device numbers for all currently configured character
and block devices
/proc/dma: Lists the Direct Memory Access channels that are currently in use
And then /proc/execdomains: Lists the execution domains for binaries that the Oracle Linux
kernel supports
The /proc directory contains directories with numerical names.
These directories are named after a program's process ID and contain information about that
process.
The owner and group of each process directory are set to the user running the process.
Each process directory contains several files including:
cmdline: Is the command issued when starting the process
cwd: Is a symbolic link to the current working directory for the process
environ: Is a list of the environment variables for the process
fd: Is the directory containing all the file descriptors for a particular process
maps: Is a list of memory maps to executables and library files associated with process
root: Is a link to the root directory of the process
And then finally status: Is the status of the process in a more readable form than stat
or statm
Other directories within the /proc directory group similar information by topic.
The following is a partial list of these directories:
/proc/bus: Contains information about buses which are present.
The presence or absence of actual devices affects what information is available with
the /proc/bus hierarchy.
/proc/driver: Contains information about drivers.
/proc/fs: Contains information about file systems.
The /proc/net file is a symbolic link to network parameters and statistics.
/proc/scsi: Provides information about SCSI devices.
/proc/sys provides system information and allows you to enable, disable, or modify kernel
features in real time.
Kernel settings can be changed by modifying files that have write permission.
The echo command is used to change /proc/sys file values.
Other files contain binary or Boolean values.
A value of 0 represents off or false.
A value of 1 represents on or true.
Changes made by using the echo command are not persistent and are lost upon system reboot.
To make configuration changes persistent, add them to files created in the /etc/sysctl.d
directory.
Let's explore the proc file system.
Use the ls command to display the contents of the /proc directory.
Use the ls command to display entries without numerical names.
View the meminfo file to display information about RAM.
View the cpuinfo file to display information about the processors used by your system.
View the devices file to display information about the various character and block devices
currently configured.
View the /proc/fs/xfs directory to display the xfs file system currently configured.
Run the change directory command to explore process directories in the proc file system.
Use the ls command with -d and 0-9 as arguments to display only the directories in /proc with
numerical names.
Next, show that one process directory exists for each process running on your system.
And finally use the ps command which produces one more entry due to the column headings
As you can see the column headings increases the count by 1.
After watching this video, you should now be able to:
Describe the /proc File System
List the top-level files in /proc
List the process directories in /proc
And lastly you should be able to explain the /proc/sys directory.
Oracle provides an extensive number of resources which you can use to learn more about this
subject and others.
Look for additional videos on the Oracle Linux 8 boot process covering GRUB2, systemd and
other Linux boot process topics.
This concludes this video.
Thank you for watching.