diff --git a/files/build_templates/enable_counters.service b/files/build_templates/enable_counters.service index f19249369f87..95424474cb15 100644 --- a/files/build_templates/enable_counters.service +++ b/files/build_templates/enable_counters.service @@ -1,7 +1,8 @@ [Unit] Description=Enable SONiC counters +PartOf=swss.service [Service] Type=oneshot -ExecStart=/bin/bash -c '/usr/bin/counterpoll queue enable ; /usr/bin/counterpoll port enable ; /usr/bin/pfcwd counter_poll enable' +ExecStart=/bin/bash -c 'sleep 60 ; /usr/bin/counterpoll queue enable ; /usr/bin/counterpoll port enable ; /usr/bin/pfcwd counter_poll enable' RemainAfterExit=yes diff --git a/files/build_templates/enable_counters.timer b/files/build_templates/enable_counters.timer index 7382a1658c1b..40a91525a712 100644 --- a/files/build_templates/enable_counters.timer +++ b/files/build_templates/enable_counters.timer @@ -2,7 +2,7 @@ Description=Delays the SONiC counters gathering until SONiC has started [Timer] -OnBootSec=3min +OnBootSec=2min Unit=enable_counters.service [Install]