Open euglena1215 opened 6 years ago
kataribe binary
cd ~
sudo apt-get install unzip
sudo yum install unzip
wget https://github.com/matsuu/kataribe/releases/download/v0.3.0/linux_amd64.zip
unzip linux_amd64.zip
myprofiler
wget https://github.com/KLab/myprofiler/releases/download/0.1/myprofiler.linux_amd64.tar.gz
tar xf myprofiler.linux_amd64.tar.gz
sudo mv myprofiler /usr/local/bin/
rm myprofiler.linux_amd64.tar.gz
myprofiler -user=root で実行
rack-lineprof
gem install specific_install
gem specific_install https://github.com/kainosnoema/rack-lineprof.git
touch /var/log/lineprof.log
sudo chmod 666 /var/log/lineprof.log
# app.rb
require 'rack-lineprof'
require 'logger' # このrequire要らないかも
logger = Logger.new('/var/log/lineprof.log')
use Rack::Lineprof, profile: 'app.rb', logger: logger # 基本的にはコメントアウトしておく
timestamp=`date +'%m%d_%T'`; sudo cp /var/log/nginx/access.log "/var/log/nginx/access${timestamp}.log"; sudo cp /dev/null /var/log/nginx/access.log
esaに色々載せてたけどとっ散らかっているのでここにまとめていきたい