Tag Archives: procfs

Linux: Execute a Program Periodically

unix linux
Explains how to execute a command at short intervals, display the output screen and highlight changes in output using the watch command on Linux.

Linux: Clear Memory Cache

unix linux

The Linux kernel uses unused main memory as a cache to keep page cache, filesystem dentries and inodes. The use of the cache or buffer memory accelerates access to files stored on non volatile storage such as hard disks. The cached items can be cleared from memory by sending a signal to the Linux kernel using the /proc filesystem or the sysctl command.

Linux: Check CPU for 64-bit Support

unix linux

To check for a 64-bit capable CPU on a x86 system running on Linux, we can make use the /proc/cpuinfo file. Note that this will not determine if the OS is 64-bit or not. It will only determine if the CPU is capable of running a 64-bit OS. To check if the Linux OS is running 32-bit or 64-bit, you can refer to this article instead.

Linux: Swap Usage per Process

unix linux

You run the free command on a Linux machine and it reports that swap space is being used. How do you determine if a process is using swap memory? Or how do you determine which processes are using swap memory? The short answer is to use the procfs or /proc filesystem.

Linux: Hide Processes from Other Users

unix linux

If you are into Linux OS hardening, then one of the ways to improve security is to hide the display of running processes and their arguments from other users. This feature is available if you are on a Linux kernel version of 3.2 or above that supports the new hidepid mount option for procfs or /proc filesystem.