cutとawkの違いを読み間違えた件について、懺悔というか反省文。 目的: 以下の出力結果からpsコマンドのプロセスID(1234)を取得したい。 $ ps -ef | head -n 3 UID PID PPID C STIME TTY TIME CMD myokoym 1234 0 0 12:34 pts/0 00:00:00 ps -ef myokoym 999999 0 0 12:34 pts/0 00:00:00 head 手順: 該当行をgrepコマンドで抽出し、スペース区切りで2番目のフィールド(カラム)を取得する。 cutの場合 最初はcutを使ってみます。 $ ps -ef | head -n 3 | grep "ps -ef" | cut -d" " -f2 何も出力されません。試しにheadのプロセスIDを取得すると、 $ ps -ef | head -n 3 | g
なんか、2/6 の夜に「修士論文の代わりに退学願を提出してきた」が Twitter でばずったらしく、Yahoo 砲よろしく突如としてアクセスが集中しました。下の方にリソースモニタリングのグラフを貼りつけてますが、今までがほぼ 0 に見えてしまうくらいに来てたのでびっくりでした。 まぁ色々コメントつけて頂いたりしてますが、もう2 年も前なんでこのエントリについて今更僕から突っ込むことは無くて、あのエントリはあのエントリとして見て頂ければと思います。ここでは今回そんな突然のアクセス集中にも見事耐えてくれたさくら VPS に感謝しつつ、アクセス集中の状況を鯖管的立場から分析してみましょう。 ちなみに、以前エントリに書いていますがサーバの構成としてはさくら VPS1 台で、CentOS+Apache+mod_fastcgi+PHP-FPM+MySQL5.5(InnoDB)で WordPress
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く