The /proc filesystem…

I’d like to start by looking first at the issue of the file System in Linux.

  • The computer saves data to the RAM storage; it may lose the data if it gets turned off. However, non-volatile RAM (Flash RAM and SSD) is available to maintain the data after the power interruption.
  • Data storage is preferred on hard drives compared to standard RAM as RAM costs more than disk space. The hard disks costs are dropping gradually comparatively the RAM.

Linux File System Structure

Let’s move on to / directory(individual high-level directories.)

  • MemTotal: Total usable ram (i.e. physical ram minus a few reserved bits and the kernel binary code)
  • MemFree: Is sum of LowFree+HighFree (overall stat)
  • Buffers: Memory in buffer cache. mostly useless as metric nowadays Relatively temporary storage for raw disk blocks shouldn’t get tremendously large.
  • Cached: Memory in the pagecache (diskcache) minus SwapCache, Doesn’t include SwapCached
  • SwapCache: Memory that once was swapped out, is swapped back in but still also is in the swapfile (if memory is needed it doesn’t need to be swapped out AGAIN because it is already in the swapfile. This saves I/O )
  • Active: Memory that has been used more recently and usually not reclaimed unless absolute necessary.
  • Dirty: Memory which is waiting to get written back to the disk
  • Writeback: Memory which is actively being written back to the disk
  • Mapped: files which have been mapped, such as libraries
  • Slab: in-kernel data structures cache…
address           perms offset  dev   inode   pathname
08048000-08056000 r-xp 00000000 03:0c 64593 /usr/sbin/gpm
cat 177073/maps
The format is:

address perms offset dev inode pathname

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store