ps コマンドジェネレーター
実行中のプロセスを報告するためのpsコマンドを生成する
psの使い方入門
## psとは?
`ps`コマンドは、現在実行中のプロセスのスナップショットを表示します。何が実行されているか、誰がそのプロセスを所有しているか、各プロセスがどれだけのCPU/メモリを消費しているかを確認するための便利なツールで、デバッグや監視、制御不能になったプロセスの検出に役立ちます。
## 使用方法
1. **モードの設定**: 出力形式を選択します(BSDスタイルの完全な一覧には`aux`、System Vスタイルには`-ef`、またはカスタム)。 2. **フィルタリング(任意)**: カスタムモードでは、ユーザー(`-u`)、PID(`-p`)、またはコマンド名(`-C`)で絞り込みます。 3. **出力の整形**: ソート(`--sort`)、プロセスツリー(`--forest`)、またはスレッド情報(`-T`)を追加します。 4. **コピーして実行**: 生成されたコマンドをターミナルにコピーします。
一般的なオプション
### `aux` BSD-style listing The classic "show me everything" view — all processes for all users, with CPU/mem stats and the full command line. The most common starting point.
### `-ef` Standard listing System V-style full listing (`-e` every process, `-f` full format). Use this when you need the PPID column or a portable format across Unix variants.
### `-u` User Restrict output to processes owned by a specific user (Custom mode). E.g. `ps -u john` shows only John's processes.
### `-p` PID Show only the process with the given PID. Useful for verifying a single daemon is alive.
### `-C` Command name Select processes by executable name (e.g. `nginx`, `sshd`). Matches the binary name, not the full command line.
### `--sort` Sort field Sort rows by a column. Prefix with `-` for descending. Common values: `-%cpu`, `-%mem`, `-pid`, `rss`.
### `--forest` ASCII tree Render parent/child relationships as an ASCII tree, making process hierarchies obvious.
### `-H` Hierarchy Similar to `--forest` but a lighter-weight indent that shows process hierarchy.
### `-w` Wide output Disable truncation of long command lines so the full command is visible.
### `-T` Show threads List individual threads (with SPID column) in addition to processes.
▶メモリ消費量が最も多いプロセスをどうやって見つけますか?
▶\`ps aux\`と\`ps -ef\`の違いは何ですか?
▶プロセスの完全なコマンドラインをどうやって確認できますか?
このツールがあなたに役立ったなら、私にコーヒーをご馳走することをお勧めします。
私にコーヒーを買ってください。