Skip to content

Commit 8762b36

Browse files
committed
Added the script description
1 parent a7cb138 commit 8762b36

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,42 @@
11
# process-memory-monitor
2+
3+
## About
4+
5+
あるプロセスが使用している各種メモリ情報を標準出力で出力する
6+
メモリ情報は /proc/\$pid/task/\$pid/status から取得している
7+
8+
## Execution
9+
10+
```bash
11+
$ sh process_memory_monitor.sh
12+
```
13+
14+
## Output
15+
16+
```
17+
2017-01-09 10:07:48,1371,140728,140696,0,75672,75672,69908,88,5888,8876,288,0
18+
```
19+
20+
## Note
21+
22+
\$3〜\$13の単位は kB
23+
24+
|Column| Value |Description |
25+
|:-----|:-------|:-----------|
26+
|$1 | $timestamp|タイムスタンプ |
27+
|$2 | $pid |Pid |
28+
|$3 | $vmpeak |仮想メモリーサイズのピーク値|
29+
|$4 | $vmsize |仮想メモリーサイズ|
30+
|$5 | $vmlck |ロックされているメモリーサイズ (mlock(3) 参照)|
31+
|$6 | $vmhwm |実メモリー上に存在するページサイズ (resident set size) のピーク値 ("high water mark")|
32+
|$7 | $vmrss |実メモリー上に存在するページサイズ|
33+
|$8 | $vmdata |データのサイズ|
34+
|$9 | $vmstk |スタックのサイズ|
35+
|$10| $vmexe |テキストセグメントのサイズ|
36+
|$11| $vmlib |共有ライブラリコードのサイズ|
37+
|$12| $vmpte |ページテーブルエントリーのサイズ (Linux 2.6.10 以降)|
38+
|$13| $vmswap |スワップアウトされた仮想メモリーサイズ (Linux 2.6.34 以降)|
39+
40+
## Reference
41+
42+
* [proc - プロセスの情報を含む擬似ファイルシステム ](https://linuxjm.osdn.jp/html/LDP_man-pages/man5/proc.5.html)

0 commit comments

Comments
 (0)