akishin999の日記

調べた事などを書いて行きます。

インストール済みの mod_jk のバージョンの調べ方

引継ぎなどで面倒を見る事になったサーバで、前任者不在、ソースコードも見当たらない、といった状況は結構あったりします。

そんな中で Apache モジュールである mod_jk のバージョンを調べる必要があったので、以下のようにして調べました。

# strings ./mod_jk.so | grep mod_jk
mod_jk.so
mod_jk.c
mod_jk/1.2.18
mod_jk: Invalid JkLog path %s
The mod_jk module request log format string
The mod_jk module automatic context apache alias directory
Turns on SSL processing and information gathering by mod_jk
Set one of more options to configure the mod_jk module
mod_jk: jk_log_to_file %s failed: %s
mod_jk: could not init JK log lock in child
mod_jk: could not create jk_log_lock
mod_jk: Could not set permissions on jk_log_lock; check User and Group directives
mod_jk: could not open JkLog file %s
mod_jk: could not open reliable pipe to jk log %s
mod_jk::jk_translate, check alias_dir: %s
mod_jk::jk_translate, AutoAlias HTTP_NOT_FOUND for URI: %s
mod_jk::jk_translate, AutoAlias child_dir: %s
mod_jk::jk_translate, AutoAlias OK for file: %s
mod_jk::jk_translate, AutoAlias HTTP_FORBIDDEN for URI: %s


3 行目を見ると、どうやらバージョンは 1.2.18 のようです。


strings コマンドはバイナリファイルの中に埋め込まれている文字列を表示するコマンドなので、全部が全部出来るとは限りませんが、他の Apache モジュールや、その他のプログラムでもこの方法でバージョンが判るものはあると思います。


ちなみに、後輩に後から教えて貰ったのですが、mod_jk のバージョンは status worker を設定すればそちらの画面からも確認できるそうです。