Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
procfs
Search
Satoru Takeuchi
PRO
June 10, 2020
Technology
0
170
procfs
以下動画のテキストです。
https://youtu.be/y0N4TmNRmQg
Satoru Takeuchi
PRO
June 10, 2020
Tweet
Share
More Decks by Satoru Takeuchi
See All by Satoru Takeuchi
「Linux」という言葉が指すもの
sat
PRO
4
120
APIとABIの違い
sat
PRO
5
62
ファイルシステムへのアクセス方法
sat
PRO
0
26
ファイルシステム
sat
PRO
1
34
低レイヤソフトウェア技術者が YouTuberとして食っていこうとした話
sat
PRO
7
6.1k
ポーリングと割り込み
sat
PRO
1
80
Rook: Intro and Deep Dive With Ceph
sat
PRO
1
140
会社員しながら本を書いてきた知見の共有
sat
PRO
3
880
デバイスにアクセスするデバイスファイル
sat
PRO
1
62
Other Decks in Technology
See All in Technology
allow_retry と Arel.sql / allow_retry and Arel.sql
euglena1215
1
160
La gouvernance territoriale des données grâce à la plateforme Terreze
bluehats
0
150
MCPで変わる Amebaデザインシステム「Spindle」の開発
spindle
PRO
3
3.2k
Automating Web Accessibility Testing with AI Agents
maminami373
0
1.2k
「全員プロダクトマネージャー」を実現する、Cursorによる仕様検討の自動運転
applism118
21
9.9k
テストを軸にした生き残り術
kworkdev
PRO
0
200
なぜスクラムはこうなったのか?歴史が教えてくれたこと/Shall we explore the roots of Scrum
sanogemaru
5
1.6k
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
8.7k
ガチな登山用デバイスからこんにちは
halka
1
240
KotlinConf 2025_イベントレポート
sony
1
120
会社紹介資料 / Sansan Company Profile
sansan33
PRO
6
380k
自作JSエンジンに推しプロポーザルを実装したい!
sajikix
1
170
Featured
See All Featured
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
15
1.6k
The Cult of Friendly URLs
andyhume
79
6.6k
Typedesign – Prime Four
hannesfritz
42
2.8k
The Invisible Side of Design
smashingmag
301
51k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
9
810
A Modern Web Designer's Workflow
chriscoyier
696
190k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
Statistics for Hackers
jakevdp
799
220k
Making the Leap to Tech Lead
cromwellryan
135
9.5k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
How GitHub (no longer) Works
holman
315
140k
Faster Mobile Websites
deanohume
309
31k
Transcript
procfs Jun 10th, 2020 Satoru Takeuchi Twitter: satoru_takeuchi 1
もくじ • Procfsとは • /proc/<pid>/以下のさまざまなファイル • 用途 • まとめ 2
もくじ • Procfsとは • /proc/<pid>/以下のさまざまなファイル • 用途 • まとめ 3
procfsとは • 通常/proc/以下にマウントされるファイルシステム • (主に)プロセスの情報を格納する ◦ プロセスの情報は/proc/<pid>/以下にある ◦ 歴史的な事情によってプロセス以外の情報もある (例:
/proc/cpuinfo • データはすべてメモリ上に存在する ext4, XFS procfs ディスク メモリ プロセスの情報 4
もくじ • Procfsとは • /proc/<pid>/以下のさまざまなファイル • 用途 • まとめ 5
/proc/<pid>/以下のさまざまなファイル • 演習: いろいろなファイルを見てみよう ◦ /proc/<pid>/cmdline: コマンドライン ◦ /proc/<pid>/fd: 開いているファイル
◦ /proc/<pid>/stat: CPU使用時間などの統計情報 • 詳細はman 5 procfsを参照 6
もくじ • Procfsとは • /proc/<pid>/以下のさまざまなファイル • 用途 • まとめ 7
用途 • psコマンド: プロセスの様々な統計情報を得る • 演習: psコマンドがprocfsを使っていることを確認 ◦ 使うもの: strace
• procfsがあるとプロセス情報取得用システムコールが不要なので便利 • procpsパッケージ内のさまざまなコマンドをチェックしてみよう 8
もくじ • Procfsとは • /proc/<pid>/以下のさまざまなファイル • 用途 • まとめ 9
まとめ • Procfsはプロセスに関する情報を得られるファイルシステム • 各プロセスの情報は/proc/<pid>/以下から得られる • 意味はman 5 procfsを見ればわかる •
psコマンドをはじめとした様々なプログラムが使っている 10