add initial project files.

This commit is contained in:
2020-06-09 16:02:25 +09:00
commit b692151385
22 changed files with 2851 additions and 0 deletions

18
etc/config.json Normal file
View File

@ -0,0 +1,18 @@
{
"url": "https://www.ni.riken.jp/temperature/",
"digitemp": "/bin/digitemp_DS9097",
"digitemp_config": "etc/digitemp.conf",
"database_dir": "db",
"images_dir": "html/images",
"templates_dir": "templates",
"mail_alert_upper": 35,
"mail_alert_lower": 15,
"mail_from": "cbs-is@ml.riken.jp",
"mail_from_name": "C407 温度監視プログラム",
"mail_info_to": "niu-logs@ml.riken.jp",
"mail_info_subject": "C407 温度監視 定期報告",
"mail_info_template": "mail_info.twig",
"mail_alert_to": "cbs-is@ml.riken.jp",
"mail_alert_subject": "C407 温度監視 警告",
"mail_alert_template": "mail_alert.twig"
}

9
etc/crontab Normal file
View File

@ -0,0 +1,9 @@
#
# Server Room Temperature Monitoring System
#
# update minutely temperature sensor data
* * * * * niu-admin php /data/temperature/sbin/update.php
# send daily temperature informations
1 12 * * * niu-admin php /data/temperature/sbin/send_info.php
# check alert thresholds on every 15 minutes
0,15,30,45 * * * * niu-admin php /data/temperature/sbin/check_alert.php

9
etc/digitemp.conf Normal file
View File

@ -0,0 +1,9 @@
TTY /dev/ttyS1
READ_TIME 1000
LOG_TYPE 1
LOG_FORMAT "%b %d %H:%M:%S Sensor %s C: %.2C F: %.2F"
CNT_FORMAT "%b %d %H:%M:%S Sensor %s #%n %C"
HUM_FORMAT "%b %d %H:%M:%S Sensor %s C: %.2C F: %.2F H: %h%%"
SENSORS 2
ROM 0 0x10 0xF5 0x89 0xB7 0x00 0x08 0x00 0x3B
ROM 1 0x10 0xA3 0x85 0xB7 0x00 0x08 0x00 0x86