Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Working with UNIX Process 6/7 Chapter

Working with UNIX Process 6/7 Chapter

Yuta Totz

March 05, 2016
Tweet

More Decks by Yuta Totz

Other Decks in Programming

Transcript

  1. ࣮༻ྫ • γεςϜϦιʔεͷ੍ݶͷมߋ͕ඞཁʹͳΔϓϩάϥϜ͸͋Μ·ͳ͍…ɻ͚Ͳಛ ผͳ༻్ͷπʔϧͰ͸ͱͯ΋ॏཁʹͳΔ • ex. ϓϩηε͕ಉ࣌ʹ਺ઍͷωοτϫʔΫίωΫγϣϯΛѻ͏ඞཁ͕͋Δ • httpύϑΥʔϚϯεπʔϧͷhttperf(1) •

    httperf —hog —server www —num-conn 5000 • => ಉ࣌ʹ5000ͷίωΫγϣϯΛ࡞੒͠Α͏ͱ͢Δ • ιϑτϦϛοτ͕σϑΥϧτ஋ͩͱ໌Β͔ʹ·͍ͣͷͰɺhttperf(1)͸࣮ߦલʹࣗ ਎ͷιϑτϦϛοτΛҾ্͖͛Δ
  2. ͜Εͬͯϋογϡʁ • ϋογϡΦϒδΣΫτͰ͸ͳ͍ (merge͕ͳ͍ͱ ͔) => ϋογϡϥΠΫʹΞΫηεͰ͖ΔAPI͕༻ ҙ͞Ε͍ͯΔ Process.setrlimit(:NOFILE, 4096)

    p Process.getrlimit(:NOFILE) => [4096, 4096] puts ENV[‘EDITOR’] => vim puts ENV.has_key?(‘PATH’) => true puts ENV.is_a?(Hash) => false