Tag Archives: proc

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.

How to Get Linux Boot Time

Linux uptime command will show how long the system has been running. But if you want to find out the boot time of the system instead, you will have to perform a bit of arithmetic – subtract the output of the uptime command from the current time. Sounds too troublesome? There’s an easier way to do it using the Linux proc filesystem.