Skip to content

Commit 24bce77

Browse files
committed
[swss/syncd] log swss/syncd service script activities (#2545)
Signed-off-by: Ying Xie <[email protected]>
1 parent f9f9a64 commit 24bce77

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

files/scripts/swss.sh

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ LOCKFILE="/tmp/swss-syncd-lock"
77

88
function debug()
99
{
10+
/usr/bin/logger $1
1011
/bin/echo `date` "- $1" >> ${DEBUGLOG}
1112
}
1213

@@ -90,6 +91,7 @@ start() {
9091

9192
# Don't flush DB during warm boot
9293
if [[ x"$WARM_BOOT" != x"true" ]]; then
94+
debug "Flushing databases ..."
9395
/usr/bin/docker exec database redis-cli -n 0 FLUSHDB
9496
/usr/bin/docker exec database redis-cli -n 2 FLUSHDB
9597
/usr/bin/docker exec database redis-cli -n 5 FLUSHDB

files/scripts/syncd.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ LOCKFILE="/tmp/swss-syncd-lock"
77

88
function debug()
99
{
10+
/usr/bin/logger $1
1011
/bin/echo `date` "- $1" >> ${DEBUGLOG}
1112
}
1213

@@ -88,7 +89,8 @@ start() {
8889
else
8990
rm -f /host/warmboot/warm-starting
9091

91-
# Flush DB during non-warm start
92+
# Flush ASIC DB during non-warm start
93+
debug "Flushing ASIC database ..."
9294
/usr/bin/docker exec database redis-cli -n 1 FLUSHDB
9395
fi
9496

0 commit comments

Comments
 (0)