Skip to content

Commit 8ff4130

Browse files
committed
process file
- Detailing Linux process info and key files in `/proc` - Adds a visual representation of process directory structure
1 parent 05ab536 commit 8ff4130

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

content/OS/Process/Process File.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
Author:
3+
- Xinyang YU
4+
Author Profile:
5+
- https://linkedin.com/in/xinyang-yu
6+
tags:
7+
- OS
8+
Creation Date: 2025-05-18, 20:26
9+
Last Date: 2025-05-18T21:00:15+08:00
10+
References:
11+
draft:
12+
description: Understand how Linux exposes process details through the /proc virtual filesystem. Learn about key files like cmdline, environ, fd, maps, status, limits, and io, vital for performance monitoring, debugging latency, and analyzing resource usage in critical applications.
13+
---
14+
## Abstract
15+
---
16+
![[process_dir.png]]
17+
18+
- For [[Linux Kernel|Linux]], we can view the [[Process (进程)|process]] info in the form of [[File|file]] under `/proc`
19+
20+
>[!important] Key files
21+
> - `cmdline`: Contains the command line arguments used to start the process
22+
> - `environ`: Contains the environment variables for the process
23+
> - `fd`: Directory containing [[File System Link#Soft (Symbolic) File System Link|symbolic links]] to files the process has open
24+
> - `maps`: Memory mapping information, useful for debugging memory issues
25+
> - `status`: General process status information (state, memory usage, etc.)
26+
> - `limits`: Resource limits for the process
27+
> - `io`: I/O statistics for the process
28+
>
29+
> These files are useful for
30+
> - Performance monitoring and troubleshooting
31+
> - Resource usage of critical trading applications
32+
> - Debugging latency issues by examining process states
33+
34+
## References
35+
---
36+
- [The Linux Programming Interface](https://man7.org/tlpi/)
172 KB
Loading

0 commit comments

Comments
 (0)