| < Previous Date Next > | < Previous Thread Next > | Index by date | Index by thread |
きたです.
>うむ、おかげさまで、これでゾンビの群れは発生しなくなりました。
>
>とはいえ、毎度これを入れなきゃならんというのは何か嫌だな。
>ほかの書きかたはないのかな?
open や IO.popen にブロックを与えれば自動的に wait してくれます.
例えば
open("|snmpget -v1 -c xxxxxx 1.3.6.1.2.1.2.2.1.10.5") do |io|
io.each do |line|
ina = line.split
printf "%s:ppp0_in:%s\n", hostname, ina[3]
end
end
みたいな感じ.
--
Junichiro Kita mailto:kita@xxxxxxxxxxxxxxx