Skip to content

Commit

Permalink
[swss/syncd] log swss/syncd service script activities (#2545)
Browse files Browse the repository at this point in the history
Signed-off-by: Ying Xie <[email protected]>
  • Loading branch information
yxieca committed Feb 14, 2019
1 parent f9f9a64 commit 24bce77
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions files/scripts/swss.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ LOCKFILE="/tmp/swss-syncd-lock"

function debug()
{
/usr/bin/logger $1
/bin/echo `date` "- $1" >> ${DEBUGLOG}
}

Expand Down Expand Up @@ -90,6 +91,7 @@ start() {

# Don't flush DB during warm boot
if [[ x"$WARM_BOOT" != x"true" ]]; then
debug "Flushing databases ..."
/usr/bin/docker exec database redis-cli -n 0 FLUSHDB
/usr/bin/docker exec database redis-cli -n 2 FLUSHDB
/usr/bin/docker exec database redis-cli -n 5 FLUSHDB
Expand Down
4 changes: 3 additions & 1 deletion files/scripts/syncd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ LOCKFILE="/tmp/swss-syncd-lock"

function debug()
{
/usr/bin/logger $1
/bin/echo `date` "- $1" >> ${DEBUGLOG}
}

Expand Down Expand Up @@ -88,7 +89,8 @@ start() {
else
rm -f /host/warmboot/warm-starting

# Flush DB during non-warm start
# Flush ASIC DB during non-warm start
debug "Flushing ASIC database ..."
/usr/bin/docker exec database redis-cli -n 1 FLUSHDB
fi

Expand Down

0 comments on commit 24bce77

Please sign in to comment.