タグ

Serverに関するwittroのブックマーク (2)

  • ohaiを使ってサーバの情報をプログラムで扱おう

    斎藤です。こんにちは。 今日は、Chefをインストールすると共に入るohaiを用いて、サーバの情報をプログラムで扱ってみます。 ※ohaiは6.16(github版)を用いています ohaiとは もともと、Chef Client/Chef Soloが実行環境の情報を取得するためのライブラリです。ただ、単独でもライブラリを使用したり、コマンドを実行する事で、Chefと同様に情報を利用する事ができます。ポイントは、外部コマンドの結果を内部でパースしてプログラムで扱いやすい形にできます。まさに、パーサーライブラリですね。 ohaiがなければ、コマンドでサーバの環境(例えば"df")の情報を取得しようとする時、コマンドの結果を取得した後に「お手製」のパーサーでプログラム内で活用できるようにしなければなりません。これが、"df"のほうに簡単なものならまだしも、"ip addr show"のような設定

    ohaiを使ってサーバの情報をプログラムで扱おう
  • 『Ficia』インフラとPerlにまつわるエトセトラ

    This document provides tips and tricks for optimizing mod_perl performance. It discusses measuring Apache child process memory sharing to identify optimization opportunities. Key recommendations include spawning child processes during Apache startup instead of on request, and tuning configuration settings like MaxRequestsPerChild to control process recycling.Read less

    『Ficia』インフラとPerlにまつわるエトセトラ
  • 1