Raspberry Pi_Eng_19.3.2 Checking System Information in “/proc” Folder


Published Book on Amazon


All of IOT Starting with the Latest Raspberry Pi from Beginner to Advanced – Volume 1
All of IOT Starting with the Latest Raspberry Pi from Beginner to Advanced – Volume 2


출판된 한글판 도서


최신 라즈베리파이(Raspberry Pi)로 시작하는 사물인터넷(IOT)의 모든 것 – 초보에서 고급까지 (상)
최신 라즈베리파이(Raspberry Pi)로 시작하는 사물인터넷(IOT)의 모든 것 – 초보에서 고급까지 (하)


Original Book Contents


19.3.2  Checking System Information in "/proc" Folder

 

The status information about the system as a whole is included below the "/proc" folder.

             

19.3.2.1    Information about CPU and Memory

 

In the "/proc" folder, you can see the CPU and memory related information for the entire system.

 

The following is checking the contents of "/proc/meminfo". This shows the overall state of the memory. If you check the contents of the file again after a while, you can see that the contents have been changed. This means that the contents of this file have been automatically changed because the state of memory usage has been changed as the state of the system is changed.

 

MemTotal:         380780 kB

MemFree:           19768 kB

MemAvailable:     205052 kB

Buffers:           28956 kB

Cached:           175456 kB

SwapCached:            4 kB

Active:           185464 kB

Inactive:         140352 kB

Active(anon):      64036 kB

Inactive(anon):    61900 kB

Active(file):     121428 kB

Inactive(file):    78452 kB

Unevictable:           0 kB

Mlocked:               0 kB

SwapTotal:        102396 kB

SwapFree:         102392 kB

Dirty:                 0 kB

Writeback:             0 kB

AnonPages:        121412 kB

Mapped:            79280 kB

Shmem:              4536 kB

Slab:              18480 kB

SReclaimable:      11764 kB

SUnreclaim:         6716 kB

KernelStack:        2040 kB

PageTables:         4100 kB

NFS_Unstable:          0 kB

Bounce:                0 kB

WritebackTmp:          0 kB

CommitLimit:      292784 kB

Committed_AS:    1052716 kB

VmallocTotal:     630784 kB

VmallocUsed:        2108 kB

VmallocChunk:     384300 kB

 

The following is checking the contents of the "/proc/cpuinfo" file. This contains information about the CPU.

 

processor       : 0

model name      : ARMv6-compatible processor rev 7 (v6l)

BogoMIPS        : 2.00

Features        : half thumb fastmult vfp edsp java tls

CPU implementer : 0x41

CPU architecture: 7

CPU variant     : 0x0

CPU part        : 0xb76

CPU revision    : 7

 

Hardware        : BCM2708

Revision        : 0010

Serial          : 0000000053e2c74b

 

The following is checking the contents of the "/proc/version" file. It contains Linux version information.

 

Linux version 3.18.11+ (dc4@dc4-XPS13-9333) (gcc version 4.8.3 20140303 (prerelease) (crosstool-NG linaro-1.13.1+bzr2650 - Linaro GCC 2014.03) ) #781 PREEMPT Tue Apr 21 18:02:18 BST 2015

 


 

19.3.2.2    Information about File System

 

In "/proc", you can see information about the entire file system of the system.

 

The following is checking the contents of "/proc/filesystems". This shows the type of file system supported by the current system.

 

nodev   sysfs

nodev   rootfs

nodev   ramfs

nodev   bdev

nodev   proc

nodev   cgroup

nodev   tmpfs

nodev   devtmpfs

nodev   debugfs

nodev   sockfs

nodev   pipefs

nodev   rpc_pipefs

nodev   configfs

nodev   devpts

        ext3

        ext2

        ext4

        vfat

        msdos

nodev   nfs

nodev   nfs4

nodev   autofs

        f2fs

nodev   mqueue

        ntfs

 

The following is checking the contents of "/proc/partitions". This is information about currently installed disks and partitions. When you run "fdisk l" command, you will see the same disks and partitions displayed.

 

major minor  #blocks  name

 

 179        0   15558144 mmcblk0

 179        1     832818 mmcblk0p1

 179        2          1 mmcblk0p2

 179        3      32768 mmcblk0p3

 179        5      61440 mmcblk0p5

 179        6    7876608 mmcblk0p6

 179        7      81920 mmcblk0p7

 179        8    6647808 mmcblk0p8

   8        0   30258240 sda

   8        1   30254208 sda1

 

The following is checking the contents of "/proc/mounts". It displays information about the currently mounted file system. You can see that the same thing like this is displayed when you run "mount" command.

 

rootfs / rootfs rw 0 0

/dev/root / ext4 rw,noatime,data=ordered 0 0

devtmpfs /dev devtmpfs rw,relatime,size=186124k,nr_inodes=46531,mode=755 0 0

tmpfs /run tmpfs rw,nosuid,noexec,relatime,size=38080k,mode=755 0 0

tmpfs /run/lock tmpfs rw,nosuid,nodev,noexec,relatime,size=5120k 0 0

proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0

sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0

tmpfs /run/shm tmpfs rw,nosuid,nodev,noexec,relatime,size=76140k 0 0

devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0

/dev/mmcblk0p5 /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro 0 0

/dev/mmcblk0p3 /media/SETTINGS ext4 rw,nosuid,nodev,relatime,data=ordered 0 0

/dev/mmcblk0p7 /media/boot vfat rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0077,codepage=437,iocharset=ascii,shortname=mixed,showexec,utf8,flush,errors=remount-ro 0 0

/dev/sda1 /media/REAL_USB ntfs ro,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0177,dmask=077,nls=utf8,errors=continue,mft_zone_multiplier=1 0 0

/dev/mmcblk0p8 /media/root0 ext4 rw,nosuid,nodev,relatime,stripe=1024,data=ordered 0 0