SHARE
Facebook X Pinterest WhatsApp

Proc and Processes

Written By
thumbnail Juliet Kemp
Juliet Kemp
Jul 20, 2010
ServerWatch content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More



Juliet Kemp

The /proc directory — which provides a text-based way of
interfacing with system settings and processes — looks complicated at first
glance, but it can be incredibly helpful when troubleshooting. Try out these
tips for looking at processes:

Tip of the Trade: The /proc directory provides a text-based way of interfacing with system settings and processes. Sure, it looks complicated at first glance, but it is incredibly helpful when troubleshooting.

ls /proc will show you a long list of directories. These are your
processes, one directory per process ID. Have a look at your process list
(using ps -A), and pick a process. The one I’ll look at is

1787 ?        00:00:00 thunderbird

so directory /proc/1787.

Look at the contents of that directory. The file cmdline tells
you what command was used to launch this process. This can be useful if the
problem you have is launch-related. You’ll be warned that this might be
binary, but it’s mostly text and easy to read. environ, similarly,
gives you the command environment, which is also useful for troubleshooting
(try starting the process on another machine and comparing the files); and the
fd directory allows you to check what the process is accessing.

maps shows the memory maps to executables and library files.
For each executable or library, the memory address is given,
together with the permissions (r/w/x, s(hared), and p(rivate – copy on
write)), the offset into the file, and the device and device inode.
For my Thunderbird process, it starts like this:

08048000-080e9000 r-xp 00000000 03:01 2354694    /bin/bash
080e9000-080ef000 rw-p 000a0000 03:01 2354694    /bin/bash
080ef000-08183000 rw-p 080ef000 00:00 0          [heap]

Lastly, for this brief overview: stat and status (the more
human-readable file) both give status information. This is
the full list that ps pulls selected information from.

For further information, the proc manpage is incredibly
comprehensive and well worth a look.

thumbnail Juliet Kemp

Juliet Kemp is a ServerWatch contributor.

Recommended for you...

What Is a Container? Understanding Containerization
What Is a Print Server? | How It Works and What It Does
Nisar Ahmad
Dec 8, 2023
What Is a Network Policy Server (NPS)? | Essential Guide
Virtual Servers vs. Physical Servers: Comparison and Use Cases
Ray Fernandez
Nov 14, 2023
ServerWatch Logo

ServerWatch is a top resource on servers. Explore the latest news, reviews and guides for server administrators now.

Property of TechnologyAdvice. © 2025 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.