Description

In FreeBSD or any Unix version, devfs and procfs are shown as 100% utilized. This article describes each of these filesystems and the reason for 100% utilization.

 

Symptoms

In FreeBSD or any Unix version, devfs and procfs are shown as 100% utilized. Below is the snapshot from one of the FreeBSD devices.

Filesystem Size Used Avail Capacity Mounted on
/dev/ad0s1a 891M 424M 395M 52% /
devfs 1.0K 1.0K 0B 100% /dev         <<<<<<<<<<<<<<<
/dev/md0 582M 582M 0B 100% /junos
/cf 891M 424M 395M 52% /junos/cf
procfs 4.0K 4.0K 0B 100% /proc       <<<<<<<<<<<<<<<<
/dev/ad0s1e 99M 220K 91M 0% /config
/dev/ad2s1f 12G 522M 10G 5% /var
/dev/md1 1006M 11M 914M 1% /mfs
/var/jail 12G 522M 10G 5% /jail/var
/var/log 12G 522M 10G 5% /jail/var/log
devfs 1.0K 1.0K 0B 100% /jail/dev

 

 

Solution

Below are the descriptions of each filesystem:

devfs

In a Unix-style OS, processes access devices via the /dev directory. Within this directory, there are device nodes allocated as block or character devices, each with a major and minor number corresponding to its device driver and its device instance. (for example, da0 and da0s1a).

For a new device such as a USB drive to be supported by the kernel, there has to be a node in /dev that corresponds to it so that processes are able to access it.

The virtual filesystem devfs , which is created by the kernel, keeps track of the device drivers currently registered while also automatically creating and removing the corresponding device nodes in /dev . The kernel will dynamically resize it so that it will always be as large as required for the device nodes, so df will show it as always being very small and 100% full. This is normal and harmless.

procfs

The /proc file system ( procfs ) is a real-time API to the kernel. It is a virtual file system: it is not associated with a block device but exists only in memory. The files in the procfs are there to allow user programs to not only access certain information from the kernel, but also for debug purposes.

Each process has its own directory under /proc with the process ID as the name. In this directory, we can find all kinds of information that the kernel has for the particular process.

Since this / procfs is made dynamically depending on the process running and populate it with the corresponding PID, it is as large as required at that moment and hence 100% utilized, which is normal and harmless .

In fact, ps uses the proc file system to obtain its information. We can get a more detailed view of the process by reading the file /proc/PID/status . Here is a snapshot of one such process:

root@% ls /proc

0 1450 1463 1477 1491 2 26 33 44 55
1 1451 1464 1479 1492 20 27 34 45 57
10 1452 1465 1480 1493 21 28 35 46 6
1094 1454 <<<<<<<<<<<<<<<

root@% ps -aux | grep 1454
root 1454 0.0 1.7 117420 18136 ?? D Fri04PM 71:14.07 /usr/sbin/chassisd -N

root@% cat /proc/1454/status
chassisd 1454 1 1 1 - noflags 1383324212,464274 43,353893 4231,908372 select 0 0 0,0 -

 

Modification History

2020-02-26: Removed references to EOS J-Series

2020-02-11: Article reviewed for accuracy; no changes required.