Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私はLinuxの初心者なので、実行する演習があります。ps、grep、awk、gawkのみを使用して、SQLで使用されるメモリプロセスの合計量を決定します。どのプロセスで使用されているメモリの量をpsで判断するにはどうすればよいですか?パーセントで表示されているpsのMem...どうもありがとう。
ps auwx | awk '/[s]ql/ {total += $4} END {print total}'
$11 ~ /sql/引数に「sql」を含むコマンドの代わりに、実際の (my)sql プロセスを見つけるために代わりに探したい場合があります。
$11 ~ /sql/