Download - Fukuokaphp vol12 talk_20140225
![Page 1: Fukuokaphp vol12 talk_20140225](https://reader033.vdocuments.pub/reader033/viewer/2022052621/5585a15ad8b42ae22a8b45af/html5/thumbnails/1.jpg)
黒くない画面から始めてみよう
Fukuoka.php Vol.12 ~KUROI GAMEN~2014/02/25
![Page 2: Fukuokaphp vol12 talk_20140225](https://reader033.vdocuments.pub/reader033/viewer/2022052621/5585a15ad8b42ae22a8b45af/html5/thumbnails/2.jpg)
自己紹介
名前: 松崎 学
所属: 株式会社キャム http://www.cam-net.co.jp/
(SaaSでERPサービスを提供中)
Twitter: matsumana
職業:ソフトウェアエンジニア (プログラマ、ITインフラ全般)
![Page 3: Fukuokaphp vol12 talk_20140225](https://reader033.vdocuments.pub/reader033/viewer/2022052621/5585a15ad8b42ae22a8b45af/html5/thumbnails/3.jpg)
私の黒い画面歴
Solaris 4年くらい (1999~2003)
Linux 7年くらい (2007~)
![Page 4: Fukuokaphp vol12 talk_20140225](https://reader033.vdocuments.pub/reader033/viewer/2022052621/5585a15ad8b42ae22a8b45af/html5/thumbnails/4.jpg)
弊社で使っているインフラ、ミドルウェア、ツールなど
![Page 5: Fukuokaphp vol12 talk_20140225](https://reader033.vdocuments.pub/reader033/viewer/2022052621/5585a15ad8b42ae22a8b45af/html5/thumbnails/5.jpg)
AWS
Amazon Linux
Apache
Tomcat, GlassFish
PostgreSQL
Fluentd
GrowthForecast
Zabbix
![Page 6: Fukuokaphp vol12 talk_20140225](https://reader033.vdocuments.pub/reader033/viewer/2022052621/5585a15ad8b42ae22a8b45af/html5/thumbnails/6.jpg)
Jenkins(ビルド, CI, JOBスケジューラ)
Chef
Vagrant
serverspec
![Page 7: Fukuokaphp vol12 talk_20140225](https://reader033.vdocuments.pub/reader033/viewer/2022052621/5585a15ad8b42ae22a8b45af/html5/thumbnails/7.jpg)
どこのサービス・会社でも使ってるものばかりなので詳細は割愛します><
![Page 8: Fukuokaphp vol12 talk_20140225](https://reader033.vdocuments.pub/reader033/viewer/2022052621/5585a15ad8b42ae22a8b45af/html5/thumbnails/8.jpg)
今日のおすすめNew Relic
![Page 9: Fukuokaphp vol12 talk_20140225](https://reader033.vdocuments.pub/reader033/viewer/2022052621/5585a15ad8b42ae22a8b45af/html5/thumbnails/9.jpg)
おすすめする理由
個人的に、以前から使ってみたかったから><
導入が簡単
キレイなUI
サーバからどの様な情報を取得出来るのかを知る第一歩にちょうど良い気がする
![Page 10: Fukuokaphp vol12 talk_20140225](https://reader033.vdocuments.pub/reader033/viewer/2022052621/5585a15ad8b42ae22a8b45af/html5/thumbnails/10.jpg)
agentインストール手順 (newrelic-sysmond)
$ sudo rpm -Uvh http://yum.newrelic.com/pub/newrelic/el5/x86_64/newrelic-repo-5-3.noarch.rpm$ sudo yum install newrelic-sysmond$ sudo nrsysmond-config --set license_key=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX$ sudo service newrelic-sysmond start$ sudo chkconfig newrelic-sysmond on
![Page 11: Fukuokaphp vol12 talk_20140225](https://reader033.vdocuments.pub/reader033/viewer/2022052621/5585a15ad8b42ae22a8b45af/html5/thumbnails/11.jpg)
agentインストール手順 (newrelic-daemon)
$ sudo yum install newrelic-php5$ sudo /usr/bin/newrelic-install install$ sudo cp -ip /etc/newrelic/newrelic.cfg.template /etc/newrelic/newrelic.cfg$ sudo service newrelic-daemon restart$ sudo service httpd restart
![Page 12: Fukuokaphp vol12 talk_20140225](https://reader033.vdocuments.pub/reader033/viewer/2022052621/5585a15ad8b42ae22a8b45af/html5/thumbnails/12.jpg)
phpinfoになんか増えてる
![Page 13: Fukuokaphp vol12 talk_20140225](https://reader033.vdocuments.pub/reader033/viewer/2022052621/5585a15ad8b42ae22a8b45af/html5/thumbnails/13.jpg)
デモ
![Page 14: Fukuokaphp vol12 talk_20140225](https://reader033.vdocuments.pub/reader033/viewer/2022052621/5585a15ad8b42ae22a8b45af/html5/thumbnails/14.jpg)
個人的な所感
![Page 15: Fukuokaphp vol12 talk_20140225](https://reader033.vdocuments.pub/reader033/viewer/2022052621/5585a15ad8b42ae22a8b45af/html5/thumbnails/15.jpg)
Servers既に監視系を導入しているなら乗り換える程ではない他の監視系ほど細かい設定は出来なそうしかし、導入の簡単さは素晴らしい
Applicationsクライアントサイド、サーバサイド(アプリケーション、DB)のそれぞれに掛かった処理時間を知るのには有効だけどざっくりし過ぎている気もする・・・小さなアプリや、負荷テスト、チューニングの用途としては向いていると思う
![Page 16: Fukuokaphp vol12 talk_20140225](https://reader033.vdocuments.pub/reader033/viewer/2022052621/5585a15ad8b42ae22a8b45af/html5/thumbnails/16.jpg)
リアルタイムで状況を確認するにはやっぱり黒い画面が
必要です
![Page 17: Fukuokaphp vol12 talk_20140225](https://reader033.vdocuments.pub/reader033/viewer/2022052621/5585a15ad8b42ae22a8b45af/html5/thumbnails/17.jpg)
top
1: CPUコア毎の表示
c: コマンドライン引数表示
Shift + p: CPU使用率の高い順にソート
Shift + m: メモリ率の高い順にソート
![Page 18: Fukuokaphp vol12 talk_20140225](https://reader033.vdocuments.pub/reader033/viewer/2022052621/5585a15ad8b42ae22a8b45af/html5/thumbnails/18.jpg)
sar
リアルタイムに状態を確認したり
ログから過去の状態を確認したり※デフォルトのログ収集間隔は長すぎるので、 運用時は1分間隔にしましょう
![Page 19: Fukuokaphp vol12 talk_20140225](https://reader033.vdocuments.pub/reader033/viewer/2022052621/5585a15ad8b42ae22a8b45af/html5/thumbnails/19.jpg)
dstat
色んな情報を1画面でまとめて確認したい時に便利※参考URLdstatの万能感がハンパない
http://d.hatena.ne.jp/hirose31/20120229/1330501968
dstatの便利なオプションまとめhttp://qiita.com/harukasan/items/b18e484662943d834901