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
160
procfs
以下動画のテキストです。
https://youtu.be/y0N4TmNRmQg
Satoru Takeuchi
PRO
June 10, 2020
Tweet
Share
More Decks by Satoru Takeuchi
See All by Satoru Takeuchi
ポーリングと割り込み
sat
PRO
0
14
Rook: Intro and Deep Dive With Ceph
sat
PRO
1
110
会社員しながら本を書いてきた知見の共有
sat
PRO
3
790
デバイスにアクセスするデバイスファイル
sat
PRO
1
39
ファイルシステムのデータを ブロックデバイスへの操作で変更
sat
PRO
1
34
デバイスドライバ
sat
PRO
0
49
マルチスレッドの実現方法 ~カーネルスレッドとユーザスレッド~
sat
PRO
2
130
共有メモリ
sat
PRO
3
71
マルチスレッドプログラム
sat
PRO
3
59
Other Decks in Technology
See All in Technology
毎晩の 負荷試験自動実行による効果
recruitengineers
PRO
5
180
「Chatwork」のEKS環境を支えるhelmfileを使用したマニフェスト管理術
hanayo04
1
400
アクセスピークを制するオートスケール再設計: 障害を乗り越えKEDAで実現したリソース管理の最適化
myamashii
1
660
スタックチャン家庭用アシスタントへの道
kanekoh
0
120
Rethinking Incident Response: Context-Aware AI in Practice
rrreeeyyy
2
940
Figma Dev Mode MCP Serverを用いたUI開発
zoothezoo
0
230
Copilot coding agentにベットしたいCTOが開発組織で取り組んだこと / GitHub Copilot coding agent in Team
tnir
0
190
An introduction to Claude Code SDK
choplin
2
1k
Talk to Someone At Delta Airlines™️ USA Contact Numbers
travelcarecenter
0
160
microCMSではじめるAIライティング
himaratsu
0
150
Introduction to Sansan for Engineers / エンジニア向け会社紹介
sansan33
PRO
5
39k
〜『世界中の家族のこころのインフラ』を目指して”次の10年”へ〜 SREが導いたグローバルサービスの信頼性向上戦略とその舞台裏 / Towards the Next Decade: Enhancing Global Service Reliability
kohbis
3
1.5k
Featured
See All Featured
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
How to Ace a Technical Interview
jacobian
278
23k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
126
53k
GitHub's CSS Performance
jonrohan
1031
460k
Practical Orchestrator
shlominoach
189
11k
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.5k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.4k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.9k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
YesSQL, Process and Tooling at Scale
rocio
173
14k
Making Projects Easy
brettharned
116
6.3k
For a Future-Friendly Web
brad_frost
179
9.8k
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