Home
Packages
Forums
Wiki
GitLab
Security
AUR
Download
コンテンツにスキップ
メインメニュー
メインメニュー
サイドバーに移動
非表示
案内
メインページ
目次
コミュニティに貢献
最近の出来事
おまかせ表示
特別ページ
交流
ヘルプ
貢献
最近の更新
最近の議論
新しいページ
統計
リクエスト
ArchWiki
検索
検索
表示
アカウント作成
ログイン
個人用ツール
アカウント作成
ログイン
Procfsのソースを表示
ページ
議論
日本語
閲覧
ソースを閲覧
履歴を表示
ツール
ツール
サイドバーに移動
非表示
操作
閲覧
ソースを閲覧
履歴を表示
全般
リンク元
関連ページの更新状況
ページ情報
表示
サイドバーに移動
非表示
←
Procfs
あなたには「このページの編集」を行う権限がありません。理由は以下の通りです:
この操作は、次のグループに属する利用者のみが実行できます:
登録利用者
。
このページのソースの閲覧やコピーができます。
{{Lowercase title}} [[Category:疑似ファイルシステム]] [[en:procfs]] {{Style|Use [[Template:ic]].}} proc ファイルシステム、または [[Wikipedia:procfs|procfs]] は擬似ファイルシステムで、通常 {{ic|/proc}} にマウントされ、実行中のシステムに関する情報を含んでいます。 * プロセス、最も顕著な使用例。 * カーネル情報および [[sysctl|パラメータ]]。 * システムメトリクス、たとえば CPU 使用率。 == 内容 == === カーネルおよびシステム情報 === {{ic|/proc}} の下には、システムやカーネルに関する多くの情報を提供する多くのファイルがあります。ここで全部を網羅することはできませんが、それらの一部を以下に、それらが何かについての簡単な情報とともにリストしています。 * {{ic|/proc/cpuinfo}} - CPUに関する情報 * {{ic|/proc/meminfo}} - 物理メモリに関する情報 * {{ic|/proc/vmstats}} - 仮想メモリに関する情報 * {{ic|/proc/mounts}} - [[mount]] に関する情報 * {{ic|/proc/filesystems}} - カーネルにコンパイルされ、現在のカーネルモジュールがロードされたファイルシステムに関する情報 * {{ic|/proc/uptime}} - 現在のシステム稼働時間 * {{ic|/proc/cmdline}} - カーネルコマンドライン === プロセス === {{ic|/proc/''pid''}} には、現在実行中のすべてのプロセスに関する情報が保存されています。 以下は、現在実行中のいくつかの PID を示した例です: {{hc|$ ls -l /proc| total 0 dr-xr-xr-x 9 root root 0 Sep 8 18:17 1 dr-xr-xr-x 9 root root 0 Sep 9 03:02 10 dr-xr-xr-x 9 daemonx daemonx 0 Sep 9 03:02 1057 dr-xr-xr-x 9 daemonx daemonx 0 Sep 8 18:18 1077 dr-xr-xr-x 9 daemonx daemonx 0 Sep 9 03:02 1087 dr-xr-xr-x 9 root root 0 Sep 9 03:02 11 dr-xr-xr-x 9 daemonx daemonx 0 Sep 9 03:02 1103 dr-xr-xr-x 9 daemonx daemonx 0 Sep 9 03:02 1107 dr-xr-xr-x 9 daemonx daemonx 0 Sep 9 03:02 1159 dr-xr-xr-x 9 root root 0 Sep 9 03:02 12 dr-xr-xr-x 9 root root 0 Sep 9 03:02 124 dr-xr-xr-x 9 root root 0 Sep 9 03:02 125 dr-xr-xr-x 9 root root 0 Sep 9 03:02 127 dr-xr-xr-x 9 root root 0 Sep 9 03:02 128 ... }} 例として pid 1057 の中身を見てみましょう。 {{hc|$ ls -l /proc/1057| total 0 dr-xr-xr-x 2 daemonx daemonx 0 Sep 9 03:12 attr -rw-r--r-- 1 daemonx daemonx 0 Sep 9 03:12 autogroup -r-------- 1 daemonx daemonx 0 Sep 9 03:12 auxv -r--r--r-- 1 daemonx daemonx 0 Sep 9 03:12 cgroup --w------- 1 daemonx daemonx 0 Sep 9 03:12 clear_refs -r--r--r-- 1 daemonx daemonx 0 Sep 9 03:12 cmdline -rw-r--r-- 1 daemonx daemonx 0 Sep 9 03:12 comm -rw-r--r-- 1 daemonx daemonx 0 Sep 9 03:12 coredump_filter -r--r--r-- 1 daemonx daemonx 0 Sep 9 03:12 cpuset lrwxrwxrwx 1 daemonx daemonx 0 Sep 9 03:12 cwd -> /home/daemonx -r-------- 1 daemonx daemonx 0 Sep 9 03:12 environ lrwxrwxrwx 1 daemonx daemonx 0 Sep 9 03:12 exe -> /usr/lib/gvfsd-metadata dr-x------ 2 daemonx daemonx 0 Sep 9 03:12 fd dr-x------ 2 daemonx daemonx 0 Sep 9 03:12 fdinfo -rw-r--r-- 1 daemonx daemonx 0 Sep 9 03:12 gid_map -r-------- 1 daemonx daemonx 0 Sep 9 03:12 io -r--r--r-- 1 daemonx daemonx 0 Sep 9 03:12 latency -r--r--r-- 1 daemonx daemonx 0 Sep 9 03:12 limits -rw-r--r-- 1 daemonx daemonx 0 Sep 9 03:12 loginuid dr-x------ 2 daemonx daemonx 0 Sep 9 03:12 map_files -r--r--r-- 1 daemonx daemonx 0 Sep 9 03:12 maps -rw------- 1 daemonx daemonx 0 Sep 9 03:12 mem ... }} いくつかのフィールド: * {{ic|cmdline}} - プログラムを開始するために使用された引数。 * {{ic|cwd}} - プロセスの現在の作業ディレクトリ。 * {{ic|environ}} - プロセス内の環境変数(ゼロ区切り)。 * {{ic|fd/}} - プロセスのオープンファイルディスクリプタを含むディレクトリ。 * {{ic|exe}} - プロセスの実行可能ファイルへのシンボリックリンク。 * {{ic|maps}} - プロセスのメモリマッピング。 * {{ic|mem}} - プロセスの仮想メモリ。 == 使用方法 == {{ic|/proc}} の内容は通常のファイルと同様に操作できます。 ファイルから読み取るには: $ cat /proc/cmdline ファイルに書き込むには: # echo 1 > /proc/sys/kernel/sysrq == 参照 == * {{man|5|proc}} * [https://docs.kernel.org/filesystems/proc.html procfsのカーネルドキュメント] * [[Wikipedia:Procfs]]
このページで使用されているテンプレート:
テンプレート:Hc
(
ソースを閲覧
)
テンプレート:Ic
(
ソースを閲覧
)
テンプレート:Lowercase title
(
ソースを閲覧
)
テンプレート:META Message
(
ソースを閲覧
)
テンプレート:Man
(
ソースを閲覧
)
テンプレート:Style
(
ソースを閲覧
)
Procfs
に戻る。
検索
検索
Procfsのソースを表示
話題を追加