sonic-buildimage/dockers/docker-platform-monitor/docker-pmon.supervisord.conf.j2
longhuan-cisco c022066522
Add enable_sff_mgr flag support for xcvrd (#18054)
This PR is a dependency of sonic-net/sonic-platform-daemons#383
HLD of sff_mgr: sonic-net/SONiC#1371

Why I did it
Add enable_xcvrd_sff_mgr flag support for sff_mgr
2024-03-11 19:39:13 -07:00

209 lines
4.9 KiB
Django/Jinja

[supervisord]
logfile_maxbytes=1MB
logfile_backups=2
nodaemon=true
[eventlistener:dependent-startup]
command=python3 -m supervisord_dependent_startup
autostart=true
autorestart=unexpected
startretries=0
exitcodes=0,3
events=PROCESS_STATE
buffer_size=1024
[eventlistener:supervisor-proc-exit-listener]
command=/usr/bin/supervisor-proc-exit-listener --container-name pmon
events=PROCESS_STATE_EXITED,PROCESS_STATE_RUNNING
autostart=true
autorestart=unexpected
buffer_size=1024
[program:rsyslogd]
command=/usr/sbin/rsyslogd -n -iNONE
priority=1
autostart=false
autorestart=false
stdout_logfile=syslog
stderr_logfile=syslog
dependent_startup=true
{% if not skip_chassisd and IS_MODULAR_CHASSIS == 1 %}
[program:chassisd]
command=/usr/local/bin/chassisd
priority=3
autostart=false
autorestart=unexpected
stdout_logfile=syslog
stderr_logfile=syslog
startsecs=10
dependent_startup=true
dependent_startup_wait_for=rsyslogd:running
{% endif %}
{% if not skip_chassis_db_init %}
[program:chassis_db_init]
command=/usr/local/bin/chassis_db_init
priority=3
autostart=false
autorestart=false
stdout_logfile=syslog
stderr_logfile=syslog
startsecs=0
dependent_startup=true
dependent_startup_wait_for=rsyslogd:running
{% endif %}
{% if not skip_sensors and HAVE_SENSORS_CONF == 1 %}
[program:lm-sensors]
command=/usr/bin/lm-sensors.sh
priority=3
autostart=false
autorestart=false
stdout_logfile=syslog
stderr_logfile=syslog
startsecs=0
dependent_startup=true
dependent_startup_wait_for=rsyslogd:running
{% endif %}
{% if not skip_fancontrol and HAVE_FANCONTROL_CONF == 1 %}
[program:fancontrol]
command=/usr/sbin/fancontrol
priority=4
autostart=false
autorestart=unexpected
stdout_logfile=syslog
stderr_logfile=syslog
startsecs=10
dependent_startup=true
dependent_startup_wait_for=rsyslogd:running
{% endif %}
{% if not skip_ledd %}
[program:ledd]
command={% if API_VERSION == 3 and 'ledd' not in python2_daemons %}python3 {% else %} python2 {% endif %}/usr/local/bin/ledd
priority=5
autostart=false
autorestart=unexpected
stdout_logfile=syslog
stderr_logfile=syslog
startsecs=10
dependent_startup=true
dependent_startup_wait_for=rsyslogd:running
{% endif %}
{% if not skip_xcvrd %}
[program:xcvrd]
{% set base_command = "python3 /usr/local/bin/xcvrd" %}
{% set options = "" -%}
{% if skip_xcvrd_cmis_mgr %}
{%- set options = options + " --skip_cmis_mgr" %}
{% endif -%}
{% if enable_xcvrd_sff_mgr %}
{%- set options = options + " --enable_sff_mgr" %}
{% endif -%}
{% if delay_xcvrd %}
{%- set command = "bash -c \"sleep 30 && " ~ base_command ~ options ~ "\"" %}
{% else %}
{%- set command = base_command ~ options %}
{% endif -%}
command={{ command }}
priority=6
autostart=false
autorestart=unexpected
stdout_logfile=syslog
stderr_logfile=syslog
startsecs=10
dependent_startup=true
dependent_startup_wait_for=rsyslogd:running
{% endif %}
{% if DEVICE_METADATA and 'subtype' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['subtype'] == 'DualToR' %}
{% if not skip_ycabled %}
[program:ycabled]
{% if delay_ycabled %}
command=bash -c "sleep 30 && nice -n -20 python3 /usr/local/bin/ycabled"
{% else %}
command=nice -n -20 python3 /usr/local/bin/ycabled
{% endif %}
priority=7
autostart=false
autorestart=unexpected
stdout_logfile=syslog
stderr_logfile=syslog
startsecs=10
dependent_startup=true
dependent_startup_wait_for=rsyslogd:running
{% endif %}
{% endif %}
{% if not skip_psud %}
[program:psud]
command={% if API_VERSION == 3 and 'psud' not in python2_daemons %}python3 {% else %} python2 {% endif %}/usr/local/bin/psud
priority=8
autostart=false
autorestart=unexpected
stdout_logfile=syslog
stderr_logfile=syslog
startsecs=10
dependent_startup=true
dependent_startup_wait_for=rsyslogd:running
{% endif %}
{% if not skip_syseepromd %}
[program:syseepromd]
command={% if API_VERSION == 3 and 'syseepromd' not in python2_daemons %}python3 {% else %} python2 {% endif %}/usr/local/bin/syseepromd
priority=9
autostart=false
autorestart=unexpected
stdout_logfile=syslog
stderr_logfile=syslog
startsecs=10
dependent_startup=true
dependent_startup_wait_for=rsyslogd:running
{% endif %}
{% if not skip_thermalctld %}
[program:thermalctld]
command={% if API_VERSION == 3 and 'thermalctld' not in python2_daemons %}python3 {% else %} python2 {% endif %}/usr/local/bin/thermalctld
priority=10
autostart=false
autorestart=unexpected
stdout_logfile=syslog
stderr_logfile=syslog
startsecs=10
startretries=50
dependent_startup=true
dependent_startup_wait_for=rsyslogd:running
{% endif %}
{% if not skip_pcied %}
[program:pcied]
command=/usr/local/bin/pcied
priority=11
autostart=false
autorestart=unexpected
stdout_logfile=syslog
stderr_logfile=syslog
startsecs=10
dependent_startup=true
dependent_startup_wait_for=rsyslogd:running
{% endif %}
{% if include_sensormond %}
[program:sensormond]
command=/usr/local/bin/sensormond
priority=10
autostart=false
autorestart=unexpected
stdout_logfile=syslog
stderr_logfile=syslog
startsecs=10
dependent_startup=true
dependent_startup_wait_for=rsyslogd:running
{% endif %}