python:supervisor

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
python:supervisor [2023/03/14 16:38] – [Supervisord の設定] ともやんpython:supervisor [2023/03/15 06:03] (現在) – [☢️古い資料です☢️] ともやん
行 55: 行 55:
 </pre></html></WRAP> </pre></html></WRAP>
 <WRAP color_result><html><pre> <WRAP color_result><html><pre>
-<b class=GRN>●</b> supervisord.service - Process Monitoring and Control Daemon +<b class=HIG>●</b> supervisord.service - Process Monitoring and Control Daemon 
-     Loaded: loaded (/usr/lib/systemd/system/supervisord.service; <b class=GRN>enabled</b>; preset: <b class=HIY>disabled</b>+     Loaded: loaded (<a href="file://WICKED-BEAT/usr/lib/systemd/system/supervisord.service">/usr/lib/systemd/system/supervisord.service</a>; <b class=HIG>enabled</b>; preset: <b class="BOLD" style="color:#d7d75f;">disabled</b>
-     Active: <b class=GRN>active (running)</b> since Mon 2023-03-13 06:34:05 JST; 6s ago +     Active: <b class=HIG>active (running)</b> since Mon 2023-03-13 06:34:05 JST; 6s ago 
-    Process: 21987 ExecStart=/usr/bin/supervisord -c /etc/supervisord.conf (code=exited, status=0/SUCCESS) +    Process: 107602 ExecStart=/usr/bin/supervisord -c /etc/supervisord.conf (code=exited, status=0/SUCCESS) 
-   Main PID: 21989 (supervisord)+   Main PID: 107605 (supervisord)
       Tasks: 1 (limit: 19013)       Tasks: 1 (limit: 19013)
      Memory: 23.5M      Memory: 23.5M
         CPU: 515ms         CPU: 515ms
      CGroup: /system.slice/supervisord.service      CGroup: /system.slice/supervisord.service
-             └─21989 /usr/bin/python3 /usr/bin/supervisord -c /etc/supervisord.conf+             └─<b style="color:#8a8a8a;">21989 /usr/bin/python3 /usr/bin/supervisord -c /etc/supervisord.conf</b>
  
  3月 13 06:34:04 WICKED-BEAT systemd[1]: Starting supervisord.service - Process Monitoring and Control Daemon...  3月 13 06:34:04 WICKED-BEAT systemd[1]: Starting supervisord.service - Process Monitoring and Control Daemon...
行 86: 行 86:
 </code> </code>
 </WRAP> </WRAP>
- 
-===== 自動起動設定 ===== 
-<code> 
-$ sudo systemctl enable supervisord.service 
-</code> 
  
 ===== Supervisord の設定 ===== ===== Supervisord の設定 =====
行 99: 行 94:
 </WRAP> </WRAP>
  
 +デフォルトでは UNIX ドメインソケットの設定になっているので...🤔\\
 +<WRAP color_term>
 +<WRAP color_mincode><code ini>
 +[unix_http_server]
 +file=/run/supervisor/supervisor.sock   ; (the path to the socket file)
 +;chmod=0700                 ; sockef file mode (default 0700)
 +;chown=nobody:nogroup       ; socket file uid:gid owner
 +;username=user              ; (default is no username (open server))
 +;password=123               ; (default is no password (open server))
 +
 +;[inet_http_server]         ; inet (TCP) server disabled by default
 +;port=127.0.0.1:9001        ; (ip_address:port specifier, *:port for all iface)
 +;username=user              ; (default is no username (open server))
 +;password=123               ; (default is no password (open server))
 +</code></WRAP>
 +</WRAP>
 +
 +[[http://localhost:9001|]] で使える設定に変更する🤔\\
 <WRAP color_term> <WRAP color_term>
 <WRAP color_mincode><code ini> <WRAP color_mincode><code ini>
 ;[unix_http_server] ;[unix_http_server]
-;file=/var/run/supervisor/supervisor.sock   ; (the path to the socket file)+;file=/run/supervisor/supervisor.sock   ; (the path to the socket file
 +;chmod=0700                 ; sockef file mode (default 0700) 
 +;chown=nobody:nogroup       ; socket file uid:gid owner 
 +;username=user              ; (default is no username (open server)) 
 +;password=123               ; (default is no password (open server))
  
 [inet_http_server]         ; inet (TCP) server disabled by default [inet_http_server]         ; inet (TCP) server disabled by default
 port=127.0.0.1:9001        ; (ip_address:port specifier, *:port for all iface) port=127.0.0.1:9001        ; (ip_address:port specifier, *:port for all iface)
 +;username=user              ; (default is no username (open server))
 +;password=123               ; (default is no password (open server))
 </code></WRAP> </code></WRAP>
 </WRAP> </WRAP>
 +
 +<WRAP color_term>
 +<WRAP color_command><html><pre>
 +<b class=GRN>$</b> <b class=HIY>sudo</b> systemctl restart supervisord
 +<b class=GRN>$</b> <b class=HIY>systemctl</b> status supervisord
 +</pre></html></WRAP>
 +<WRAP color_command><html><pre>
 +<b class=HIG>●</b> supervisord.service - Process Monitoring and Control Daemon
 +     Loaded: loaded (<a href="file://WICKED-BEAT/usr/lib/systemd/system/supervisord.service">/usr/lib/systemd/system/supervisord.service</a>; <b class=HIG>enabled</b>; preset: <b class="BOLD" style="color:#d7d75f;">disabled</b>)
 +     Active: <b class=HIG>active (running)</b> since Wed 2023-03-15 04:46:56 JST; 7min ago
 +    Process: 107602 ExecStart=/usr/bin/supervisord -c /etc/supervisord.conf (code=exited, status=0/SUCCESS)
 +   Main PID: 107605 (supervisord)
 +      Tasks: 1 (limit: 19013)
 +     Memory: 21.9M
 +        CPU: 536ms
 +     CGroup: /system.slice/supervisord.service
 +             └─<b style="color:#8a8a8a;">107605 /usr/bin/python3 /usr/bin/supervisord -c /etc/supervisord.conf</b>
 +
 + 3月 15 04:46:55 WICKED-BEAT systemd[1]: Starting supervisord.service - Process Monitoring and Control Daemon...
 + 3月 15 04:46:56 WICKED-BEAT systemd[1]: Started supervisord.service - Process Monitoring and Control Daemon.
 +</pre></html></WRAP>
 +</WRAP>
 +[[http://localhost:9001|]] にアクセスして動作確認😉\\
 +{{:python:supervisord_http_server_001.png|supervisord http server}}\\
  
 ===== 付録 ===== ===== 付録 =====
行 552: 行 595:
 </WRAP> </WRAP>
  
-====== ️古い資料です ======+====== ️古い資料です (Obsolete)☢️ ====== 
 ===== パッケージ インストール ===== ===== パッケージ インストール =====
 <code> <code>
  • python/supervisor.1678779501.txt.gz
  • 最終更新: 2023/03/14 16:38
  • by ともやん