Proc File System Sadi Evren SEKER.

Slides:



Advertisements
Similar presentations
Sogang University Advanced Operating Systems (Linux Device Drivers) Advanced Operating Systems (Linux Device Drivers) Sang Gue Oh, Ph.D.
Advertisements

User-Mode Linux Ken C.K. Lee
Module 8 - Process Management. 1.Linux boot loader 2.Linux boot process 3.Linux processes 4.Linux services 5.Linux top 6.Remember proc ? 7.Linux Device.
Linux File systems – The /proc Pawan Jain (2003CS10177) Shashwat Sehgal (2003CS10188) CSL373 - Operating Systems.
Operating Systems Recitation 5, April 21-22, 2002 slide 13 updated April 28 th.
1 UNIX 1 History of UNIX 2 Overview of UNIX 3 Processes in UNIX 4 Memory management in UNIX 5 The UNIX file system 6 Input/output in UNIX.
1 Case Study 1: UNIX and LINUX Chapter History of unix 10.2 Overview of unix 10.3 Processes in unix 10.4 Memory management in unix 10.5 Input/output.
EET 450 Chapter 2 – How hardware and Software Work Together.
Introduction to Kernel
Processes and Resources
Processes & Daemons Chapter IV / Part III. Commands Internal commands: alias, cd, echo, pwd, time External commands, code is in a file: grep, ls, more.
Linux Operating System
SUSE Linux Enterprise Server Administration (Course 3037) Chapter 1 Introduction to Managing the SUSE Linux Enterprise Server.
File System and Directory Structure in Linux. What is File System In a computer, a file system is the way in which files are named and where they are.
Configuring Disk Quotas Linux System Administration To implement disk quotas, use the following steps: Enable quotas per file system by modifying /etc/fstab.
Booting and boot levels
Offline Performance Monitoring for Linux Abhishek Shukla.
Chapter 8. Disks and Filesystems. Ordinary Files u What is a file? –a container for ordered data –persistent (stays around) and accessible by name u Unix.
Day 4 Understanding Hardware Partitions Linux Boot Sequence.
How Hardware and Software Work Together
Managing Processes CSCI N321 – System and Network Administration Copyright © 2000, 2011 by Scott Orr and the Trustees of Indiana University.
The Linux /proc Filesystem CSE8343 – Fall 2001 Group A1 – Alex MacFarlane, Garrick Williamson, Brad Crabtree.
Linux Introduction Part 2. Finding Files find “start directory” -name "filename“ Find the file called "filename" on the filesystem starting the search.
Guide to Linux Installation and Administration, 2e1 Chapter 10 Managing System Resources.
Module 2 - The File System
The Structure of Processes (Chap 6 in the book “The Design of the UNIX Operating System”)
Linux Administration. Pre-Install Different distributions –Redhat, Caldera, mandrake, SuSE, FreeBSD Redhat Server Install –Check HCL –Significant issues.
Agenda Link of the week Use of Virtual Machine Review week one lab assignment This week’s expected outcomes Review next lab assignments Break Out Problems.
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
Lecture – Performance Performance management on UNIX.
UNIX (Linux) Introduction Module-1. OS Kernel In computing, the kernel is the central component of OS. It is a bridge between applications and the actual.
Guide To UNIX Using Linux Third Edition Chapter 8: Exploring the UNIX/Linux Utilities.
Manage Directories and Files in Linux. 2 Objectives Understand the Filesystem Hierarchy Standard (FHS) Identify File Types in the Linux System Change.
Linux Kernel Management. Module 9 – Kernel Administration ♦ Overview The innermost layer of Linux operating system is the kernel, which is a thin layer.
User-Space-to-Kernel Interface
CSC414 “Introduction to UNIX/ Linux” Lecture 2. Schedule 1. Introduction to Unix/ Linux 2. Kernel Structure and Device Drivers. 3. System and Storage.
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
System Administration. Logging in as System Administrator System Admin login (aka superuser, aka root) –login id: root –Default PS1 prompt: # –Home directory:
1 Structure of Processes Chapter 6 Process State and Transition Data Structure for Process Layout of System Memory THE DESIGN OF THE UNIX OPERATING SYSTEM.
Linux Kernel Programming (LKP). LKP New sub-course New sub-course We will learn together We will learn together Evaluation of this part of course will.
Linux Processes Last Update Copyright Kenneth M. Chipps Ph.D. 1.
Embedded Software Design Week II Linux Intro Linux Kernel.
Local Area Tracking system System Control Unit. Goals Configure Spartan 3 FPGA development board to boot and run uClinux OS Configure Spartan 3 FPGA development.
Guide to Parallel Operating Systems with Windows 7 and Linux Chapter 10 Operating System Management.
Memory management. Linux Memory Management Total memory available for processes = real memory + paging space - 1MB. First megabyte of real memory is used.
Linux Administration – Finding You Way on the Command Line The Linux File Directory or Tree.
Input/Output (I/O) Important OS function – control I/O
Introduction to Kernel
Chapter Objectives In this chapter, you will learn:
Linux203Training Module System Mgmt.
Process Management Process Concept Why only the global variables?
UBUNTU INSTALLATION
Case Study 1: UNIX and LINUX
Structure of Processes
Chapter 4 – Introduction to Operating System Concepts
Linux 202 Training Module Program and Process.
Linux Operating System Architecture
CS 286 Computer Organization and Architecture
OS Virtualization.
Structure of Processes
COP 4343 Unix System Administration
Project 3: An Introduction to File Systems
Process Control B.Ramamurthy 2/22/2019 B.Ramamurthy.
CS149D Elements of Computer Science
Unix Process Control B.Ramamurthy 4/11/2019 B.Ramamurthy.
Process Management and System Monitoring
Process Description and Control in Unix
Process Description and Control in Unix
Chapter 1: Introduction CSS503 Systems Programming
Structure of Processes
Presentation transcript:

Proc File System Sadi Evren SEKER

Proc FS /proc /proc directory is NOT a real File System It is a Virtual File System information about processes and other system information. It is mapped to /proc and mounted at boot time.

Discovering around # cd /proc The first thing that you will notice is that there are some familiar sounding files, and then a whole bunch of numbered directories. The numbered directories represent processes, better known as PIDs, and within them, a command that occupies them. The files contain system information such as memory (meminfo), CPU information (cpuinfo), and available filesystems.

meminfo # cat /proc/meminfo As you can see, /proc/meminfo contains a bunch of information about your system’s memory, including the total amount available (in kb) and the amount free on the top two lines.

Man Pages # man 5 /proc/<filename>

List of Files /proc/cmdline – Kernel command line information. /proc/console – Information about current consoles including tty. /proc/devices – Device drivers currently configured for the running kernel. /proc/dma – Info about current DMA channels. /proc/fb – Framebuffer devices. /proc/filesystems – Current filesystems supported by the kernel. /proc/iomem – Current system memory map for devices. /proc/ioports – Registered port regions for input output communication with device. /proc/loadavg – System load average.

List of Files (continue) /proc/locks – Files currently locked by kernel. /proc/meminfo – Info about system memory (see above example). /proc/misc – Miscellaneous drivers registered for miscellaneous major device. /proc/modules – Currently loaded kernel modules. /proc/mounts – List of all mounts in use by system. /proc/partitions – Detailed info about partitions available to the system. /proc/pci – Information about every PCI device. /proc/stat – Record or various statistics kept from last reboot. /proc/swap – Information about swap space. /proc/uptime – Uptime information (in seconds). /proc/version – Kernel version, gcc version, and Linux distribution installed.

Process Info Within /proc’s numbered directories you will find a few files and links. Remember that these directories’ numbers correlate to the PID of the command being run within them. Let’s use an example. On my system, there is a folder name /proc/12: # cd /proc/12 # ls

Process Status / Details # cat /proc/12/status

Some important files In any numbered directory, you will have a similar file structure. The most important ones, and their descriptions, are as follows: cmdline – command line of the process environ – environmental variables fd – file descriptors limits – contains information about the limits of the process mounts – related information You will also notice a number of links in the numbered directory: cwd – a link to the current working directory of the process exe – link to the executable of the process root – link to the work directory of the process

Some commands uptime, lsof, mount, and ps

Assignment The number of CPUs in your machine and their clock speed, number of cores. The version of Linux kernel running on your system The time in day:hr:min:sec when the system was last booted The average load on the system in the last 15 minutes The total usable and currently free memory in the system The total swap space and the currently used swap space in the system The swap partitions and their sizes The time the CPU spent (over all processes) in the user mode and kernel mode The number of context switches made by the system so far The number of interrupts handled by the system so far