Mike mnjk: Difference between revisions

From ITCwiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
Welcome to Mike's test page.
=TEST=
 
<ol>
This is an edit.
<li>Enter the ''/proc'' directory on your VM.</li>
: ''/proc'' is a very special folder is its a virtual filesystem. Its sometimes referred to as a process information pseudo-filesystem. The reason for calling it a pseudo-file system is that all of the "files" in ''/proc'' are not really files at all, but kernel runtime configuration and system information.
<li>Use '''cat cpuinfo''' to view the contents of the ''/proc/cpuinfo'' "file".</li>
: Notice how the output tells your information about the CPU that is running the VM. This isn't actually a file at all you are essentially asking the kernel to provide information about the CPU it's running on which it gathers in realtime. ''/proc'' is used not only to get hardware and kernel information, but it can also be used to tweak kernel settings while the system is running in a way similar to some Windows Registry edits. Look back on [[Franske ITC-2480 Lab 10#Enable Routing|Lab 10]] and notice how we echoed a "1" to a "file" in ''/proc'' to enable packet forwarding without rebooting the system.
: There are a few files in ''/proc'' you should get to know:
* '''/proc/cpuinfo''' = Shows you the CPU info for your machine.
* '''/proc/modules''' = Shows you the currently enabled kernel modules that are active on your kernel.
* '''/proc/cmdline''' = Shows you the boot arguments used to boot your kernel.
* '''/proc/version''' = Shows you your kernel version.
: It is important to note that some of these files have commands tied to them that can give you similar information but often formatted in a different way, for example.
* '''/proc/modules''' = '''lsmod'''
* '''/proc/mounts''' = '''mount'''
* '''/proc/version''' = '''uname -a'''
: Normally it is best to use the command version to lookup the information as it is normally formatted to be easier to read and understand.
<li> Explore all of these files and commands and find the differences between the command line and file output versions as well as what types of information are available.</li>
</ol>

Revision as of 23:53, 26 January 2021

TEST

  1. Enter the /proc directory on your VM.
  2. /proc is a very special folder is its a virtual filesystem. Its sometimes referred to as a process information pseudo-filesystem. The reason for calling it a pseudo-file system is that all of the "files" in /proc are not really files at all, but kernel runtime configuration and system information.
  3. Use cat cpuinfo to view the contents of the /proc/cpuinfo "file".
  4. Notice how the output tells your information about the CPU that is running the VM. This isn't actually a file at all you are essentially asking the kernel to provide information about the CPU it's running on which it gathers in realtime. /proc is used not only to get hardware and kernel information, but it can also be used to tweak kernel settings while the system is running in a way similar to some Windows Registry edits. Look back on Lab 10 and notice how we echoed a "1" to a "file" in /proc to enable packet forwarding without rebooting the system.
    There are a few files in /proc you should get to know:
    • /proc/cpuinfo = Shows you the CPU info for your machine.
    • /proc/modules = Shows you the currently enabled kernel modules that are active on your kernel.
    • /proc/cmdline = Shows you the boot arguments used to boot your kernel.
    • /proc/version = Shows you your kernel version.
    It is important to note that some of these files have commands tied to them that can give you similar information but often formatted in a different way, for example.
    • /proc/modules = lsmod
    • /proc/mounts = mount
    • /proc/version = uname -a
    Normally it is best to use the command version to lookup the information as it is normally formatted to be easier to read and understand.
  5. Explore all of these files and commands and find the differences between the command line and file output versions as well as what types of information are available.