筑波大学技術報告
28:9-16,2008

RRDtool ࠍ↪޿ߚടㅦེߩࠟࠬ࿶ജ࡮᷷ᐲ Web ࡕ࠾࠲࡯ᄢ๺ġ ⦟ᐢ╳ᵄᄢቇ⎇ⓥၮ⋚✚ว࠮ࡦ࠲࡯㧔ᔕ↪ടㅦེㇱ㐷㧕‫ޥ‬305-8577 ⨙ၔ⋵ߟߊ߫Ꮢᄤ₺บ 1-1-1᭎ⷐ㧞㧚࿶ജ⸘‫ޔ‬᷷ᐲ⸘ߩᦝᣂ╳ᵄᄢቇ⎇ⓥၮ⋚✚ว࠮ࡦ࠲࡯ᔕ↪ടㅦེㇱ㐷ߢߪ‫ဳࡓ࠺ࡦ࠲ޔ‬㕒㔚ടㅦེਥ࠲ࡦࠢߩ㔚᳇⛘✼ࠟࠬߣߒߡ౐ࡈ࠶ൻ⎫㤛㧔SF6㧕ࠟࠬࠍ૶↪ߒߡ޿ࠆ‫ߎޕ‬ߩࠟࠬߩ࿶ജߣ᷷ᐲࠍRRDtool ߣ lighttpd ࠍ૶↪
ߒߡWeb਄ߢࡕ࠾࠲࡯ߢ߈ࠆ◲ᤃࡠࠟ࡯ߩ㐿⊒ࠍⴕߞߚ‫ࠅࠃߦࠇߎޕ‬㜞♖ᐲߥ࠺࡯࠲ࠍ⥄േ⸥㍳ߢ߈ㇱ㐷ౝߤߎ߆ࠄߢ߽⃻࿷୯ߣㆊ෰ߩᄌേࠍ⷗ࠄࠇࠆࠃ
߁ߦߥߞߚ‫ޕ‬೑↪ߐࠇߥߊߥߞߚᣥဳPCߩ᦭ല೑↪
߽⋡⊛ߩ 1 ߟߢ޽ࠆ‫ޕ‬ߎࠇ߹ߢߩ⸘ེߪ‫ޔ‬࿑ 1 ߩ᭽ߥࠕ࠽ࡠࠣ㊎ߩ࿶ജ⸘ࠍ૶↪ߒߡ޿ߚߚ߼‫ߺ⺒ޔ‬ขࠆੱ㑆ߦࠃࠅዊᢙὐ
એਅ 2 ᩴ⋡㧔0.01 MPa㧕⒟ᐲߩ⺋Ꮕ߇↢ߓߡ޿ߚ‫ޕ‬㜞࿶ࠟࠬ଻቟ᴺߦࠃࠆ࿶ജන૏ߩ kg/cm2 ψ MPa߳ߩᄌᦝ߽⺒ߺขࠅ⺋Ꮕࠍᄢ߈ߊߒߡߒ߹ߞߚේ࿃
ߩ 1 ߟߢ޽ࠆ‫ޕ‬ᣥ᧪ߩ࿶ജ⸘࡮᷷ᐲ⸘ߢߪ⺋Ꮕ߇ᄢ߈ߔ߉ߡടㅦེਥ࠲ࡦࠢౝߩోࠟࠬኈ㊂ߩ⸘▚߽ᱜ⏕ߦ಴᧪ߥ߆ߞߚ‫ޔߢߎߘޕ‬ᣂߒ޿⸘ེߦߪߥࠆߴߊ㜞♖ᐲߢ቟ଔߥ࿶ജ⸘࡮᷷ᐲ⸘ߩㆬቯࠍᔃដߌߚ‫ޕ‬ടㅦེਥ࠲
ࡦࠢౝߩࠟࠬ࿶ജߪ⌀ⓨ߆ࠄ 0.6 MPa ⒟ᐲ߹ߢᄌൻ߇޽ࠆߩߢ‫ޔ‬ኻᔕ⵾ຠߩㆬᛯ߇㔍ߒ߆ߞߚ‫⊛⚳ᦨޕ‬ߦណ↪ߒߚߩߪ‫ޔ‬2.1, 2.2 ߩᯏེ㧔࿑ 2㧕ߢ޽ࠆ‫ޕ‬ࠠ࡯ࡢ࡯࠼㧦 RRDtool‫ޔ‬Web ࡕ࠾࠲࡯‫◲ޔ‬ᤃ࠺࡯࠲ࡠࠟ࡯‫ࡦࠦ࠰ࡄޔ‬ౣ೑↪

㧝㧚ߪߓ߼ߦ

2.1 ࿶ജ⸘╳ᵄᄢቇ⎇ⓥၮ⋚✚ว࠮ࡦ࠲࡯ᔕ↪ടㅦེㇱ㐷ߢߪ‫ဳࡓ࠺ࡦ࠲ޔ‬㕒㔚ടㅦེਥ࠲ࡦࠢߩ㔚᳇⛘✼ࠟࠬߣߒߡ౐ࡈ࠶ൻ⎫㤛㧔SF6㧕ࠟࠬࠍ૶↪ߒߡ޿ࠆ‫ߎޕ‬ߩࠟࠬߩ࿶ജ߿᷷ᐲߪ‫ޔ‬ടㅦེߩ቟ቯേ૞ߦᷓߊ㑐ࠊࠆࠦࡠ࠽㔚ᵹߩᵹࠇᣇߦ㑐ਈߒߡ޿ࠆߚ߼⋙ⷞ߇ਇนᰳߢ޽ࠆ‫ߢ߹੹ޕ‬ᚒ‫ߪޘ‬࿑ 1 ߩ᭽ߥࠕ࠽ࡠࠣࡔ࡯࠲ߢ࿶ജ߿᷷ᐲࠍ⺒ߺขࠅࡠࠣࡉ࠶ࠢߦ⸥౉ߒߡ޿ߚ߇‫ޔ‬࿑ 1 ਅ஥ߩ㆙㓒⋙ⷞ↪ࡔ࡯࠲߇᡿㓚ߒᣂⷙ
ߦ⾼౉ߔࠆᔅⷐߦㄼࠄࠇߚ‫ߊ߆ߞߖޔߢߎߘޕ‬ᣂߒߊߔࠆߩߢ޽ࠇ߫㜞♖ᐲߥ‛ࠍ⾼౉ߒߡ‫⸥ޔ‬㍳ߪ⥄േߢ⴫␜߽⷗߿ߔߊᣉ⸳ౝㇱߩߤߎ߆ࠄߢ߽⷗ࠄࠇࠆᣇ߇ࠃ޿ߣ⠨߃‫ޔ‬㐿⊒ࠍⴕߞߚ‫ޕ‬࿶ജ࠮ࡦࠨ࡯㧦ࡃ࡞ࠦࡓ VPRNP-A3(-0.1㨪1MPa)-5⴫␜ེ㧦ࡃ࡞ࠦࡓ C37N-SRS-0.1㨪1 MPa ࠍ 4 ᩴߢ⴫␜ߒ‫ޔ‬RS-232C ߢㅢାน2.2 ᷷ᐲ⸘
᷹᷷ᛶ᛫૕㧦ᨋ㔚Ꮏ SR2N-P-S-H2-6.4-134/50-R1/2-316
ᜰ␜⺞▵⸘㧦
ጊᱞ C40A5G0AS3D0-20㨪50͠ ࠍ 3 ᩴߢ⴫␜ߒ‫ޔ‬RS-232C ߢㅢାนᣥ࿶ജ⸘ᣂ࿶ജ⸘ᣂ᷷ᐲ⸘

࿑ 2㧚ᣂߒ޿࿶ജ⸘ߣ᷷ᐲ⸘

࿑ 1㧚ࠕ࠽ࡠࠣߩ࿶ജ⸘.

㧟㧚૶↪ߒߚ PC ߣ OSWindows95 ⧷⺆ ߣߒߡ૶↪ߐࠇߡ޿ߚ 8 ᐕએ਄
೨ߦ⾼౉ߒߚ PC ࠍ૶↪ߒߚ‫ޔߪߡߒߣࠢ࠶ࡍࠬޕ‬CPU: Celeron 466 MHz, Memory: 128 MB ߢ HDD ߽ฎ޿߹߹ߢ޽ࠆ‫ޕ‬OS ߪ FreeBSD 6.0-RELEASE ࠍ૶↪
ߒߚ‫ޕ‬Ყセ⊛ᣥဳߩ PC ߦߪ RS-232C ࠪ࡝ࠕ࡞ࡐ࡯࠻߇ᮡḰߢ 2 ߟઃ޿ߡ߅ࠅ‫߽ࠇߎޔ‬࿶ജ⸘࡮᷷ᐲ⸘
ߣߩ 2 ♽⛔ߩㅢାߩߚ߼ߦߪㇺว߇⦟߆ߞߚ‫ޕ‬

㧠㧚Web ࠨ࡯ࡃPC߇㕖ജߢ⾗Ḯ߇ਲߒ޿ߚ߼‫ޔ‬㜞ㅦᕈ߇㊀ⷞߐࠇ
ࠆⅣႺߦᦨㆡൻߐࠇߚ‫ޔ‬BSD࡜ࠗ࠮ࡦࠬߩࡈ࡝࡯࠰
ࡈ࠻࠙ࠚࠕ lighttpd 1 ࠍ૶↪ߒߚ‫ࡔޔࠅࠃߦࠇߎޕ‬ࡕ࡝ߩᶖ⾌㊂߇ዋߥߊ‫ޔ‬CPU߳ߩ⽶⩄߇ዋߥ޿㜞ㅦߥേ૞ࠍታ⃻ߢ߈ߡ޿ࠆ‫ޕ‬

㧡㧚RRDtool
RRDtool 2 (Round Robin Database TOOL) [1] ߪ‫ޔ‬TobiOetiker 3 ᳁߇㐿⊒ߒߚ‫ࠍ࠲࡯࠺ޔ‬ല₸⊛࡮♽⛔⊛ߦᩰ⚊ߒߡಽᨆಣℂߒ‫ޔ‬࿑ 3 ߩ᭽ߥࠣ࡜ࡈࠖࠞ࡞ߥ⴫␜ࠍน⢻ߣߔࠆGNU General Public License 4 ߩ࠰ࡈ࠻࠙ࠚࠕߢ޽ࠆ‫ޕ‬ߎߩ࠰ࡈ࠻࠙ࠚࠕࠍ೑↪ߔࠆᦨᄢߩࡔ࡝࠶࠻ߪ࠺࡯࠲ࡠࠣࠍ㐳ᦼ㑆ขࠆ႐วߦࠣ࡜ࡈࡊࡠ࠶࠻ߩߚ߼ߩ࠺࡯࠲ߩ㑆ᒁ߈ࠍ࡙࡯ࠩ࡯߇⠨߃ߥߊߡ⦟޿ߎߣߢ޽ࠆ‫ޕ‬ㅙᰴ࠺࡯࠲ࠍ RRDtool ߦᷰߔߛߌߢ㕖Ᏹߦ߁߹ߊ㐳ᦼࡠ߽ࠣ⍴ᦼࡠ߽ࠣ࠺࡯࠲ࡌ࡯ࠬࠃࠅ⺒ߺ಴ߒߡ⴫␜ߒߡߊࠇࠆ‫ࠍ࠲࡯࠺ޔߚ߹ޕ‬㑆ᒁߊ㑆㓒߇⥄↱ߦ⸳ቯߢ߈ࠆ‫․ߩઁߩߘޕ‬ᓽߣߒߡ‫ޔ‬࡮ឬ ↹ಣℂߣ࠺࡯࠲ᩰ⚊ಣℂߩࠦࡑࡦ࠼߇ಽ㔌ߒߡ޿ࠆ‫ޕ‬࡮࠺࡯࠲ࡈࠔࠗ࡞ߦ RRD㧔࡜࠙ࡦ࠼ࡠࡆࡦ࠺࡯࠲ࡌ࡯ࠬ㧕ࠍណ↪ߒߡ޿ࠆߩߢㆇ↪ਛߦࡈࠔࠗ࡞ࠨࠗ࠭߇Ⴧ߃ߥ޿‫ޕ‬ߥߤ߇޽ࠆ‫ޕ‬ ࡀ࠶࠻ࡢ࡯ࠢߩ࠻࡜ࡈࠖ࠶ࠢ▤ℂߥߤߩ↪ㅜߢ᭽‫ߥޘ‬ᚲߢ೑↪ߐࠇߡ޿ࠆ‫ޕ‬੹࿁㐿⊒ߒߚ Web ࡕ࠾࠲࡯࠰ࡈ࠻࠙ࠚࠕߪߎߩRRDtool ࠍ Perl ߆ࠄ೑↪ߒߡታ⃻ߒߡ޿ࠆ‫ޕ‬

࿑ 3㧚㐿⊒ߒߚࡕ࠾࠲࡯ߩ Web ࡉ࡜࠙࠭↹㕙଀

1

http://ja.wikipedia.org/wiki/Lighttpd
http://oss.oetiker.ch/rrdtool/3
http://tobi.oetiker.ch/4
http://ja.wikipedia.org/wiki/GNU_General_Public_License2&%㧢㧚࠰ࡈ࠻࠙ࠚࠕߩ㐿⊒࡮⸳ቯ

೙ᓮቶPC⸘ེࠍടㅦེਥ࠲ࡦࠢᧄ૕ߦขࠅઃߌࠆ೨ߦ⃻႐એᄖߩዬቶ߿㐿⊒ቶߢ PC ߣߩࠪ࡝ࠕ࡞ㅢାߩ㈩✢ࠍߒߡ‫ߩࠕࠚ࠙࠻ࡈ࠰ޔ‬㐿⊒ࠍⴕߞߚ‫ޕ‬ធ⛯෸߮࠰ࡈ࠻࠙ࠚࠕߩ᭽ሶࠍ࿑ 4 ߦ␜ߔ‫ޕ‬⃻႐PCዬቶPCLAN100Mbps࿶ജ⸘䊂䊷䉺෼㓸䊐䉜䉟䊦଻ሽPerl 䊒䊨䉫䊤䊛䊂䊷䉺䊔䊷䉴䉫䊤䊐䊒䊨䉾䊃
RRDtool

6.1 ࿶ജ⸘࡮᷷ᐲ⸘ߣߩㅢାㇱߪߓ߼ߦ‫ޔ‬ㅢାㇱߩ㐿⊒ࠍⴕߞߚ‫⸘ߩࠇߙࠇߘޕ‬ེߦ⃻࿷୯ࠍ㄰ߒߡߊࠇࠆࠃ߁࡝ࠢࠛࠬ࠻๮઎ࠍㅍࠅ‫ޔ‬ㅍࠄࠇߡ߈ߚ࠺࡯࠲ࠍ⸥㍳ߔࠆߛߌߩන⚐ߥ߽ߩߢ޽ࠆ‫ޕ‬Perl ࡊࡠࠣ࡜ࡓߪ‫ޔ‬KEKߩዊ⩲㓉᳁ 5 ߩ
ᐔᚑ 9 ᐕᐲᛛⴚ⎇ⓥળႎ๔ᦠ[2]ࠍෳ⠨ߣߒߚ‫ޕ‬ታ㓙ߩ㐿⊒ߪߘࠇߙࠇߩᯏེߩㅢା๮઎߇ోߊ㆑޿⹜ⴕ㍲⺋ߒߥ߇ࠄേ૞ߔࠆࠃ߁ߦ઀਄ߍߚ‫ޕ‬ീᒝਇ⿷߿ℂ↱߇ࠊ߆ࠄߕ⸘ེߣߩᱜᏱߥㅢା߇ߢ߈ࠆ߹ߢߦᤨ㑆߇߆߆ߞߡߒ߹ߞߚㇱಽࠍ࿑ 5 ߦ␜ߔ‫ޔߚ߹ޕ‬࿑ 6 ߦᦨ⚳⊛ߥ࠰࡯ࠬࡊࡠࠣ࡜ࡓ ( present_value.pl )ࠍ␜ߔ‫ ࠍࡓ࡜ࠣࡠࡊߩߎޕ‬cron ߢ 2 ಽ߅߈ߦታⴕߒ‫ޔ‬ඨ࡝ࠕ࡞࠲ࠗࡓ࠺࡯࠲( real_press_temp.txt ) ߣߒߡࡈࠔࠗ࡞ߦ਄ᦠ߈ߒߡ޿ࠆ‫ޔߪࠇߎޕ‬Webࠕࠢ࠮ࠬߩᐲߦ⸘ེ᷹ߦ৻‫ⶄߣߊⴕߦ࠻ࠬࠛࠢ࡝ޘ‬ᢙߩ࡙࡯ࠩ࡯߇หᤨߦ⍍ᤨ୯ࠍ⷗ߚߣ߈ߦਇౕว߇↢ߓࠆߩࠍ㒐ߋ቟ᤃߥᣇᴺߢ޽ࠆ‫ޕ‬߹ߚ‫ޔ‬ᓟㅀߔࠆ RRDtool ߩ࠺࡯࠲ߦ໧㗴߇↢ߓߚ႐ ว ߩ ࡃ ࠶ ࠢ ࠕ ࠶ ࡊ ߣ ߒ ߡ ‫ ޔ‬csv ࡈ ࠔ ࠗ ࡞( main_tank_press_temp.csv ) ߦ߽ cron ߢᲤᱜᤨߦㅊ
⸥ߢ࠺࡯࠲ࠍ⸥㍳ߒߡ޿ࠆ‫ޕ‬ౣ೑↪䊌䉸䉮䊮᷷ᐲ⸘
RS-232C
9600bpsweb䉰䊷䊋lighttpdweb䉮䊮䊁䊮䉿⴫␜↪CGI
Celeron 466 MHzMemory 128 MB࿑ 4㧚ធ⛯෸߮࠰ࡈ࠻࠙ࠚࠕrrd-record.pl ߩਛりߪ present_value.pl ߣ߶߷หߓߥߩߢ⋭⇛ߔࠆ߇‫ޔ‬㆑޿ߪᦠ߈಴ߒㇱಽࠍ‫ޔ‬$RRD = "/usr/local/bin/rrdtool";$RRA = "/usr/home/yamato/main_tank_press_temp.rrd";# write data to RRD toolsystem("$RRD update $RRA N:$press_log:$temp_log");ߣߒߡ޿ࠆߛߌߢ޽ࠆ‫ޕ‬
 24 ᤨ㑆‫ޔ‬ㅳ㑆‫᦬ޔ‬㑆‫ޔ‬ᐕ㑆ࡠࠣߩࠣ࡜ࡈ png ↹௝ࡈࠔࠗ࡞ࠍ૞ᚑߔࠆࠪࠚ࡞ࠬࠢ࡝ࡊ࠻( rrdtool-graph-p_t.sh ) ߩ৻ㇱߪ‫ޔ‬࿑ 8 ߩㅢࠅߢ޽ࠆ‫ޕ‬ߎࠇࠍ‫ޔ‬cron ߦࠃࠅ⚂ 15 ಽ߅߈ߦታⴕߒࡈࠔࠗ࡞ࠍએਅߩ㗅ߢ૞ᚑߔࠆ‫ޕ‬ press-daily.png  24 ᤨ㑆࿶ജࡠࠣ temp-daily.png  24 ᤨ㑆᷷ᐲࡠࠣ press-weekly.png  ㅳ㑆࿶ജࡠࠣ temp-weekly.png  ㅳ㑆᷷ᐲࡠࠣ press-monthly.png  ᦬㑆࿶ജࡠࠣ temp-monthly.png  ᦬㑆᷷ᐲࡠࠣ press-yearly.png  ᐕ㑆࿶ജࡠࠣ temp-yearly.png  ᐕ㑆᷷ᐲࡠࠣ

6.2 RRDtool ߩ⸳ቯ RRDtool ߩ⸳ቯߪ Web ᬌ⚝ߔࠆߣᴛጊߩ૶↪଀ࠍ⷗ࠆߎߣ߇಴᧪ࠆ‫╩ޕ‬⠪߽޿ߊߟ߽ߩ Web ࠨࠗ࠻ࠍෳ⠨ߦߐߖߡ޿ߚߛ޿ߚ‫ࠍࠄࠇߘޕ‬ෳ⠨ߦ⸳ቯࡈࠔࠗ࡞ࠍ⹜ⴕ㍲⺋ߒߡቢᚑߐߖߚ‫ޕ‬ ࠺࡯࠲ࡌ࡯ࠬࠍ૞ᚑߔࠆࠪࠚ࡞ࠬࠢ࡝ࡊ࠻
( rrdtool-create-p_t.sh ) ߪ‫ޔ‬࿑ 7 ߩㅢࠅߢ޽ࠆ‫ᦨޕ‬ೋߦߎࠇࠍ⿠േߒ‫࡞ࠗࠔࡈࠬ࡯ࡌ࠲࡯࠺ޔ‬( main_tank_press_temp.rrd ) ߇಴᧪ߚࠄ‫ޔ‬cron ߦࠃࠅ࠺࡯࠲ࡌ࡯ࠬߦ 10 ಽ߅߈ߦ࠺࡯࠲ࠍㅊടߔࠆࡊ
ࡠࠣ࡜ࡓ ( rrd-record.pl ) ߢ࠺࡯࠲ࠍᦝᣂߔࠆ‫ޕ‬

EQO㧔࿶ജ⸘ߣ㧕ߢࠛ࡜࡯߇Ꮻߞߡ߈ߡߒ߹ߞߚᲤ࿁ࠦࡑࡦ࠼೉ߩవ㗡߆ࠄ⚳ࠊࠅ߹ߢߩ࠺࡯࠲ߩ HEX ࠦ࡯࠼ߢ 1 ࡃࠗ࠻ߕߟ⿷ߒߚᢙߩਅ૏ 2 ᩴࠍ2 ࡃࠗ࠻ߩ ASCII ࠦ࡯࠼ߦߒߚ߽ߩ㧔࠴ࠚ࠶ࠢࠨࡓ㧕ࠍㅊടߒߥ޿ߣ޿ߌߥ߆ߞߚ‫ޕ‬
"S00RD¥r"
٤"S00RD49¥r"
CR ߪ ¥n ߢߪߥߊ ¥r ߥ੐ߦ᳇ઃߊߩߦ߽ᤨ㑆߇߆߆ߞߚ‫ޕ‬EQO㧔᷷ᐲ⸘ߣ㧕ߩㅢା߇಴᧪ߥ߆ߞߚ
೙ᓮࠦ࡯࠼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ߒߡᄢ㊂ߦㅍାߐࠇߡ᧪ߚ‫ࠇߎޕ‬XGTVKECNNCDGN M2C >
ࠍ࿁ㆱߔࠆߚ߼‫ޔ‬
WPKVUGZRQPGPV>
VKVNG OCKPVCPMICURTGUUWTG FCKN[ >
rrdtool-graph-p_t.sh > /dev/null&'(RTGUUOCKPAVCPMARTGUUAVGORTTFRTGUU#8'4#)'>
%&'(MRARTGUURTGUU >ߣߒߡࠛ࡜࡯ࠍ⸃᳿ߒߚ‫ޕ‬.+0'MRARTGUUHHRTGUUWTG>࠺࡯࠲෼㓸‫߈ᦠ࡞ࠗࠔࡈޔ‬಴ߒ‫ࡌ࠲࡯࠺ޔ‬)24+06MRARTGUU#8'4#)'#8'4#)' NH5>
࡯ࠬᦝᣂߩ Perl ࡊࡠࠣ࡜ࡓ߿ࠣ࡜ࡈ૞ᚑ)24+06MRARTGUU/+0/+0 NH5>ߩࠪࠚ࡞ࠬࠢ࡝ࡊ࠻߇ߤߩࠃ߁ߥ࠲ࠗࡒࡦ)24+06MRARTGUU/#:/#: NH5>
ࠣߢታⴕߐࠇߡ޿ࠆ߆ࠍ߹ߣ߼ߚ‛ࠍ࿑ 9)24+06MRARTGUU.#56.#56 NH5ߦ␜ߔ‫ޕ‬
WUTNQECNDKPTTFVQQNITCRJWUTJQOG[COCVQVGORFCKN[RPI>
6.3 Web ࠦࡦ࠹ࡦ࠷ CGI
UVCTVFC[U>
GPF>
࡙࡯ࠩ࡯ߩ Web ࡉ࡜࠙ࠩ߆ࠄߩ࡝ࠢࠛࠬKOIHQTOCV20)>
࠻ߦᔕ╵ߒ‫ޔ‬࿑ 3 ߩ᭽ߥ↹㕙ࠍ಴ߔߚ߼ߦYKFVJ>
CGI ( index.cgi ) ߢ࠺࡯࠲ࡈࠔࠗ࡞ߩ⺒ߺㄟJGKIJV>ߺ‫▚⸘ޔ‬ಣℂ‫ޔ‬html ߢߩ಴ജࠍⴕߞߡ޿ࠆ‫ޕ‬
EQNQT$#%-HCHG>⹦⚦ߪ࿑ 11 ߩㅢࠅߢ޽ࠆ‫ޕ‬
EQNQT%#08#5HHHHHH>
EQNQT)4+&>
6.4 Web ࡉ࡜࠙ࠩߢߩ⥄േᦝᣂ
EQNQT/)4+&>
ടㅦེਥ࠲ࡦࠢࠟࠬ⒖ㅍᤨ߿ടㅦེㆇォEQNQT(106>
ᤨߥߤࠟࠬ࿶ജ߿᷷ᐲߩᄌൻ߇Ყセ⊛ᄙ޿EQNQT(4#/'>
ߣ߈ߦߪ⃻႐߿೙ᓮቶࡉ࡜࠙ࠩ߆ࠄߩ࡝ࠢ
EQNQT#4419HH>ࠛ ࠬ ࠻ ࡮⴫␜ ᦝ ᣂ ࠍ ReloadEvery 6 ߣ ޿ ߁
XGTVKECNNCDGN %GNUKWU >
Firefoxߩ᜛ᒛᯏ⢻ࠍ૶↪ߒ‫ޔ‬1 ಽ߅߈߿ 5 ಽ
VKVNG OCKPVCPMICUVGORGTCVWTG FCKN[ >߅߈ߥߤߦ⸳ቯߒ࠺࡯࠲ࡠࠣߩౣ⺒ߺㄟߺ&'(VGOROCKPAVCPMARTGUUAVGORTTFVGOR#8'4#)'>
ࠍ⥄േൻߒߡ޿ࠆ‫ޕ‬㧔࿑ 10㧕
.+0'VGORHHVGORGTCVWTG>)24+06VGOR#8'4#)'#8'4#)' NH>
6.5 ో࠺࡯࠲ߩࡃ࠶ࠢࠕ࠶ࡊ)24+06VGOR/+0/+0 NH>)24+06VGOR/#:/#: NH>
ᧄࠪࠬ࠹ࡓߩ PC ߪ‫ ࠍߡోޔ‬1 บߢᜂߞߡ)24+06VGOR.#56.#56 NH
޿ࠆߩߢࡂ࡯࠼࠺ࠖࠬࠢߩࠢ࡜࠶ࠪࡘ߇⿠̖̖̖̖̖ㅳ㑆‫᦬ޔ‬㑆‫ޔ‬ᐕ㑆ಽ߳ߣ⛯ߊߎࠆߣ៊ኂ߇ᄢ߈޿‫ޔ߼ߚߩߘޕ‬Samba ࠨ࡯ࡃࠍ┙ߜ਄ߍ‫ޔ‬㊀ⷐߥࡈࠔࠗ࡞ࠍ 1 ᣣ 1 ࿁ቯᤨߦ╩⠪ߩᏱ↪ PC ߦ⥄േ⊛ߦࡃ࠶ࠢࠕ࠶ࡊࠦࡇ࡯ࠍขࠆࠃ߁ߦߒߡ޿ࠆ‫ޕ‬6࿑ 8㧚rrdtool-graph-p_t.sh ߩౝኈߩ৻ㇱ

http://norahmodel.exblog.jp/321560/&(ਥ䉺䊮䉪࿶ജ⸘䊶᷷ᐲ⸘䊨䉧䊷䊂䊷䉺⸥㍳ᤨ㑆৻ⷩ࿶ജ⸘䊶᷷ᐲ⸘଻ሽ䊂䊷䉺 ଻ሽ㗫ᐲᲤಽ⴫␜ 㪇↢䊂䊷䉺Ფᱜᤨ㪇㫄㪸㫀㫅㪶㫋㪸㫅㫂㪶㫇㫉㪼㫊㫊㪶㫋㪼㫄㫇㪅㪺㫊㫍ඨ䊥䉝䊦䉺䉟䊛䊂䊷䉺㫉㪼㪸㫃㪶㫇㫉㪼㫊㫊㪶㫋㪼㫄㫇㪅㫋㫏㫋䋲ಽ䈍䈐㪩㪩㪛䊂䊷䉺㫄㪸㫀㫅㪶㫋㪸㫅㫂㪶㫇㫉㪼㫊㫊㪶㫋㪼㫄㫇㪅㫉㫉㪻䋱䋰ಽ䈍䈐䊨䉫⴫␜↪
䉫䊤䊐↹௝㩷㪅㫇㫅㪾㩷䊂䊷䉺⚂䋱䋵ಽ䈍䈐ᤨ㑆ゲ㩷㩿න૏㩷ಽ㪀㪈㪉㪈㪊㪋㪊㪌㪌㪍㪎㪎㪏㪐㪈㪇 㪈㪈 㪈㪉 㪈㪊 㪈㪋 㪈㪌 㪈㪍 㪈㪎 㪈㪏 㪈㪐 㪉㪇 㪉㪈 㪉㪉 㪉㪊 㪉㪋 㪉㪌 㪉㪍 㪉㪎 㪉㪏 㪉㪐 㪊㪇 㪊㪈 㪊㪉 㪊㪊 㪊㪋 㪊㪌 㪊㪍 㪊㪎 㪊㪏 㪊㪐 㪋㪇 㪋㪈 㪋㪉 㪋㪊 㪋㪋 㪋㪌 㪋㪍 㪋㪎 㪋㪏 㪋㪐 㪌㪇 㪌㪈 㪌㪉 㪌㪊 㪌㪋 㪌㪌 㪌㪍 㪌㪎 㪌㪏 㪌㪐㪐㪉㪈㪈㪈㪊㪈㪌㪈㪎㪈㪐㪈㪉㪋㪉㪈㪉㪊㪉㪌㪉㪉㪉㪎㪉㪐㪊㪈㪊㪊㪊㪌㪊㪎㪊㪐㪊㪉㪈㪏㪋㪈㪋㪊㪋㪌㪋㪎㪋㪐㪌㪈㪋㪉㪊㪋㪋㪏ETQPVCDGߢߩ⸳ቯ    WUTJQOG[COCVQTGEQTFRN    WUTJQOG[COCVQRTGUGPVAXCNWGRN    WUTJQOG[COCVQTTFTGEQTFRN    UJWUTJQOG[COCVQTTFVQQNITCRJRAVUJ FGXPWNN
ߎߩETQPߩ⺑᣿‫ޕ‬࡮ᲤᱜᤨߦTGEQTFRNࠍታⴕߒ↢࠺࡯࠲ OCKPAVCPMARTGUUAVGOREUX ߦㅊ⸥‫ޕ‬࡮ߣಽ⟎߈ߦRTGUGPVAXCNWGRNࠍታⴕߒYGDࡉ࡜࠙ࠩ⃻࿷୯⴫␜↪ߩඨ࡝ࠕ࡞࠲ࠗࡓ࠺࡯࠲ TGCNARTGUUAVGORVZV ࠍ਄ᦠ߈‫ޕ‬࡮ߩಽ⟎߈ߦTTFTGEQTFRNࠍታⴕߒ44&ߩ࠺࡯࠲ OCKPAVCPMARTGUUAVGORTTF ࠍᦠ߈ㄟ߻‫ޕ‬࡮ߩ⚂ಽ⟎߈ߦTTFVQQNITCRJRAVUJࠍታⴕߒYGDࡉ࡜࠙ࠩࡠࠣ⴫␜↪ࠣ࡜ࡈ↹௝࠺࡯࠲ࠍએਅߩ㗅ߢ૞ᚑߔࠆ‫ޕ‬‫ޓ‬RTGUUFCKN[RPI‫ޓ‬VGORFCKN[RPI‫ޓ‬RTGUUYGGMN[RPI‫ޓ‬VGORYGGMN[RPI‫ޓ‬RTGUUOQPVJN[RPI‫ޓ‬VGOROQPVJN[RPI‫ޓ‬RTGUU[GCTN[RPI‫ޓ‬VGOR[GCTN[RPI࿑ 9㧚cron ߢߩ࠺࡯࠲ᦝᣂ࠲ࠗࡒࡦࠣ৻ⷩ࿑ 10㧚ReloadEvery ߢ࠺࡯࠲⴫␜ࠍ⥄േᦝᣂ⸳ቯ 㧔Firefox ߢฝࠢ࡝࠶ࠢࡔ࠾ࡘ࡯߆ࠄ)&)㪌㪊㪌㪉㪌㪌㪌㪎㪌㪐WUTDKPRGTN6JKUKUVJGOCKPVCPMRTGUUWTGICWIGCPFVJGVJGTOQOGVGTFCVCEQNNGEVKQPRTQITCOD[;QUJKJKTQ;COCVQQRGP +0(+.'WUTJQOG[COCVQTGCNARTGUUAVGORVZV 
NQCFAXCNWG
HQT CCC ]
XTGCF +0(+.'XCNWG KH X ]
NCUV_
NQCFAXCNWGXCNWG
_RTGUUWTGFCVCRCTVRTGUUANQIUWDUVT NQCFAXCNWG RTGUUAMIANQIRTGUUANQI
RTGUUAMIANQIUWDUVT RTGUUAMIANQI 
VGORGTCVWTGFCVCRCTVVGORANQIUWDUVT NQCFAXCNWG 
ENQUG +0(+.' ωJVONߢ಴ജ
RTKPV*6/. >PRTKPV*'#& >P
RTKPV/'6#JVVRGSWKX>%QPVGPV6[RG>EQPVGPV>VGZVJVONEJCTUGV'7%,2> >P
RTKPV6+6.' ਥ࠲ࡦࠢ࿶ജ࡮᷷ᐲࡕ࠾࠲࡯6+6.' >P
RTKPV*'#& >P
RTKPVDQF[VGZV>>DIEQNQT>((((((> >PRTKPV* 7& ࡍ࡟࠻ࡠࡦടㅦེDT ਥ࠲ࡦࠢ 5((1065+<'> > 57$ 57$ (106 ࠟࠬ࿶ജ࡮᷷ᐲࡕ࠾࠲࡯* >P
RTKPV(1065+<'> > >P
RTKPV⃻࿷ߩ࿶ജ㧦>P
RTKPV(1065+<'> >%1.14>((> RTGUUANQI/2C RTGUUAMIANQIMIEO(1065+<'> > 572 572 (106 (106 $4 >P
RTKPV⃻࿷ߩ᷷ᐲ㧦>P
RTKPV(1065+<'> >%1.14>((> VGORANQI͠(106 $4 >PRTKPV*4 >P
RTKPV ᤨ㑆ࡠࠣ$4 >P
RTKPV+/)54%>RTGUUFCKN[RPI>#.6>=RTGUUFCKN[RPI?> $4 >P
RTKPV+/)54%>VGORFCKN[RPI>#.6>=VGORFCKN[RPI?> $4 >P
RTKPVㅳ㑆ࡠࠣ$4 >P
RTKPV+/)54%>RTGUUYGGMN[RPI>#.6>=RTGUUYGGMN[RPI?> $4 >P
RTKPV+/)54%>VGORYGGMN[RPI>#.6>=VGORYGGMN[RPI?> $4 >P
RTKPV᦬㑆ࡠࠣ$4 >P
RTKPV+/)54%>RTGUUOQPVJN[RPI>#.6>=RTGUUOQPVJN[RPI?> $4 >P
RTKPV+/)54%>VGOROQPVJN[RPI>#.6>=VGOROQPVJN[RPI?> $4 >P
RTKPVᐕ㑆ࡠࠣ$4 >P
RTKPV+/)54%>RTGUU[GCTN[RPI>#.6>=RTGUU[GCTN[RPI?> $4 >P
RTKPV+/)54%>VGOR[GCTN[RPI>#.6>=VGOR[GCTN[RPI?> $4 >P
RTKPV(106 >P
RTKPV$1&; >P
RTKPV*6/. >P࿑ 11㧚Web ࠦࡦ࠹ࡦ࠷૞ᚑ CGI ( index.cgi )&*㧣㧚߹ߣ߼
RRDtool ߣ lighttpdࠍ૶↪ߔࠆ੐ߦࠃߞߡ㕖ജߥ
ᣥဳPC㧔Celeron 466 MHz㧕ߢ߽࠲ࡦ࠺ࡓဳ㕒㔚ടㅦེਥ࠲ࡦࠢߩ౐ࡈ࠶ൻ⎫㤛㧔SF6㧕ࠟࠬߩ⃻࿷ߩ࿶ജ࡮᷷ᐲ෸߮ 24 ᤨ㑆ࡠࠣ‫ޔ‬ㅳ㑆ࡠࠣ‫᦬ޔ‬㑆ࡠࠣ‫ޔ‬ᐕ㑆ࡠࠣࠍ㜞ㅦߦⶄᢙ࡙࡯ࠩ࡯ߦឭଏߢ߈ߚ‫ߪࠇߎޕ‬ടㅦེߩ⁁ᴫᛠីߩ৻ᚻᲑߣߒߡ߽᦭ലߥ࠷࡯࡞ߣߥߞߚ‫ޔ߫߃଀ޕ‬ടㅦེߩࠦࡦ࠺࡚ࠖࠪ࠾ࡦࠣࠍ
Vt=10 MVߢⴕߞߡ޿ࠆߣ߈ߦ⚂ 1 ᤨ㑆ߢ 1 kPa(0.001 MPa)ࠟࠬ࿶ജ߇਄᣹ߔࠆߎߣߪ੹࿁ߩ㐿⊒ᯏེࠍ૶↪ߒߡೋ߼ߡ⍮ࠆߎߣ߇ߢ߈ߚ‫ޔߚ߹ޕ‬ᄖ᳇ߦࠃࠆ᷷ᐲᄌൻߢടㅦེਥ࠲ࡦࠢߩࠟࠬ࿶ജ߇߼߹ߋࠆߒߊᄌൻߒߡ޿ࠆߎߣ߽ⷞⷡ⊛ߦᛠីߢ߈ߚ‫ޕ‬ߎࠇࠄߩ࠺࡯࠲ߦࠃࠅ᷷ᐲ਄᣹ߢࠦࡠ࠽㔚ᵹߩᵹࠇ߇ᷫࠄߥ޿ࠃ߁ߦⓨ⺞ᯏߩ᷷ᐲ⸳ቯࠍਅߍߡ⺞ᢛߔࠆߥߤߩភ⟎ࠍขࠆߎߣ߽ߢ߈ߚ‫ޕ‬ᧄႎ๔ᦠ߇‫ޔ‬㆙㓒ߢ⸘ེߩ࠺࡯࠲ࡠࠣࠍขࠅߚ޿ߣ޿ߞߚหߓࠃ߁ߥ⋡⊛ࠍᜬߟᣇ‫ߩޘ‬ෳ⠨ߣߥࠇ߫ᐘ޿ߢ޽ࠆ‫ޕ‬ࠪࠬ࠹ࡓ᭴▽ᤨߦߏഥ⸒‫ߏޔ‬දജࠍ㗂߈߹ߒߚᔕ↪ടㅦེㇱ㐷ᛛⴚኾ㐷⡯ຬ ᧁ᧛ඳ⟤᳁‫ޔ‬࿶ജ࠮ࡦࠨ࡯࡮᷷ᐲ࠮ࡦࠨ࡯ߩടㅦེਥ࠲ࡦࠢ㈩▤߳ߩขࠅઃߌࠍⴕߞߡߊߛߐߞߚห ⍹੗⡡᳁ߦᗵ⻢޿ߚߒ߹ߔ‫ޕ‬ෳ⠨ᢥ₂࡮ෳ⠨ Web site[1] ‫ޟ‬RRDtool ߩ૶޿ᣇ‫ޟޠ‬RRDtool 1.2 ♽ࠍ૶߁‫ޠ‬Takuro KUBOTA ᳁ Web ࡍ࡯ࠫ
http://www.bonz.squares.net/~takuro/[2] ዊ⩲㓉, ࡢࡦࡏ࡯࠼ࡑࠗࠦࡦ෸߮ FreeBSD ࡑࠪࡦࠍ૶↪ߒߚ㆙㓒㔚࿶᷹ቯࠪࠬ࠹ࡓ, ᐔᚑ 9 ᐕᐲᩭⲢว⑼ቇ⎇ⓥᚲᛛⴚ⎇ⓥળႎ๔ᦠ (1997) 186-189.
http://pfwww.kek.jp/kosuge/paper/giken97.pdf

Gas pressure and temperature monitor of the accelerator tank on the Web siteby using the RRDtool
Yoshihiro Yamato
Tandem Accelerator Complex, Research Facility Center for Science and Technology,
University of Tsukuba,
1-1-1 Tennodai, Tsukuba, Ibaraki, 305-8577 Japan
Gas pressure and temperature in the accelerator tank in our facility are able to be watched on the Web site at allhours. The variations of the pressure and the temperature are logged on the Web site and can be shown as graphs. The
monitoring system was developed by using the RRDtool and lighttpd, and it works on an old model personal computer
which was not in use. As the result, the accelerator condition is able to be diagnosed in detail.
Keywords: RRDtool ; Web monitor; simple data logger&+