Staff/autoshutdown
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
単語検索
|
最終更新
|
ヘルプ
| LANG NOT FOUND ]
開始行:
[[Staff]]
自動で観測終了するプログラム autoshutdown.py についての説明
* 観測終了のトリガー [#p0961934]
以下のいずれか
- 指定時刻を過ぎたとき
-- デフォルトでは日出の1時間前
- obs-commander のスクリプト観測プロセス (qobs) が約10分...
* 観測終了時に実行するコマンド [#d8783a0e]
- nstop
- rstop
- qstop
- xstop auto
- pinpoint が終わるのを待つ (timeout=600sec)
- nayuta -home
- nayuta -fin all
- nayuta が終わるのを待つ (timeout=60sec)
- (実行する前に obsmon に確認のポップアップが出ます)
* Action Items [#d1fa7e12]
- %%shutdown する前に qask popup?%%
- %%トリガー: qobs または nightmaster が一定時間走ってい...
- スリット、ベンチレータが閉まっているか最終確認
- slack に投稿
- autoshut_watcher をサービス化
- %% obs-coomander に on/offスイッチ %%
- %% obmon にステータス表示 %%
* プログラム [#j043ad9a]
** autoshutdown.py [#r9527f66]
- path
/home/nhao/bin/autoobs/autoshutdown.py
- usage
usage: autoshutdown [-h] [-m MIN_BEFORE] [-t JST_DOWN] [...
shutdown observation in the morning
options:
-h, --help show this help message and exit
-m MIN_BEFORE, --min-before MIN_BEFORE
shutdwon X min before sunrise
-t JST_DOWN, --jst-down JST_DOWN
shutdown time in JST YYYY-MM-DD h...
--off turn OFF
- screen を使った起動例
screen -d -m -S autoshutdown /home/nhao/bin/autoobs/auto...
screen -d -m -S autoshutdown /home/nhao/bin/autoobs/auto...
-- watcher や obsmon から起動するときは、screen が使われ...
-- ステータス確認
screen -r autoshutdown
Ctrl-a, d で detach
** autoshut_watcher (service) [#t8fdaada]
- autoshutdownが走っているかを監視する
-- 走っているべきなのに走っていなかったら、走らせる
/home/nhao/bin/autoobs/autoshutdown.d/shutdown.jst
があれば走っているべきと判断
- service なので watcher が落ちても、自動的に再スタートす...
- つまり、以下のように2重の安全対策になっている
-- autoshutdown.py が異常終了したら watcher が autoshutd...
-- watcher が落ちたら、service として再スタート (by syst...
- unit file
/home/nhao/.config/systemd/user/autoshut_watcher.service
- check status
systemctl status autoshut_watcher --user
- stop & start
systemctl stop autoshut_watcher --user
systemctl start autoshut_watcher --user
終了行:
[[Staff]]
自動で観測終了するプログラム autoshutdown.py についての説明
* 観測終了のトリガー [#p0961934]
以下のいずれか
- 指定時刻を過ぎたとき
-- デフォルトでは日出の1時間前
- obs-commander のスクリプト観測プロセス (qobs) が約10分...
* 観測終了時に実行するコマンド [#d8783a0e]
- nstop
- rstop
- qstop
- xstop auto
- pinpoint が終わるのを待つ (timeout=600sec)
- nayuta -home
- nayuta -fin all
- nayuta が終わるのを待つ (timeout=60sec)
- (実行する前に obsmon に確認のポップアップが出ます)
* Action Items [#d1fa7e12]
- %%shutdown する前に qask popup?%%
- %%トリガー: qobs または nightmaster が一定時間走ってい...
- スリット、ベンチレータが閉まっているか最終確認
- slack に投稿
- autoshut_watcher をサービス化
- %% obs-coomander に on/offスイッチ %%
- %% obmon にステータス表示 %%
* プログラム [#j043ad9a]
** autoshutdown.py [#r9527f66]
- path
/home/nhao/bin/autoobs/autoshutdown.py
- usage
usage: autoshutdown [-h] [-m MIN_BEFORE] [-t JST_DOWN] [...
shutdown observation in the morning
options:
-h, --help show this help message and exit
-m MIN_BEFORE, --min-before MIN_BEFORE
shutdwon X min before sunrise
-t JST_DOWN, --jst-down JST_DOWN
shutdown time in JST YYYY-MM-DD h...
--off turn OFF
- screen を使った起動例
screen -d -m -S autoshutdown /home/nhao/bin/autoobs/auto...
screen -d -m -S autoshutdown /home/nhao/bin/autoobs/auto...
-- watcher や obsmon から起動するときは、screen が使われ...
-- ステータス確認
screen -r autoshutdown
Ctrl-a, d で detach
** autoshut_watcher (service) [#t8fdaada]
- autoshutdownが走っているかを監視する
-- 走っているべきなのに走っていなかったら、走らせる
/home/nhao/bin/autoobs/autoshutdown.d/shutdown.jst
があれば走っているべきと判断
- service なので watcher が落ちても、自動的に再スタートす...
- つまり、以下のように2重の安全対策になっている
-- autoshutdown.py が異常終了したら watcher が autoshutd...
-- watcher が落ちたら、service として再スタート (by syst...
- unit file
/home/nhao/.config/systemd/user/autoshut_watcher.service
- check status
systemctl status autoshut_watcher --user
- stop & start
systemctl stop autoshut_watcher --user
systemctl start autoshut_watcher --user
ページ名: