Skip to content

Commit 4ac1c9b

Browse files
[watermarkstat] Add new warning message for the 'q_shared_multi' counters in case if they not in COUNTES_DB
Signed-off-by: Vadym Hlushko <[email protected]>
1 parent 99ed8ea commit 4ac1c9b

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

scripts/watermarkstat

+8-4
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ class Watermarkstat(object):
201201

202202
return pg_index
203203

204-
def build_header(self, wm_type):
204+
def build_header(self, wm_type, counter_type):
205205
if wm_type is None:
206206
print("Header info is not available!", file=sys.stderr)
207207
sys.exit(1)
@@ -220,8 +220,12 @@ class Watermarkstat(object):
220220
min_idx = element_idx
221221

222222
if min_idx == sys.maxsize:
223-
print("Object map is empty!", file=sys.stderr)
224-
sys.exit(1)
223+
if counter_type != 'q_shared_multi':
224+
print("Object map is empty!", file=sys.stderr)
225+
sys.exit(1)
226+
else:
227+
print("Object map from COUNTERS_DB is empty, because multicast queues are not configured in CONFIG_DB!")
228+
sys.exit(0)
225229

226230
self.min_idx = min_idx
227231
self.header_list += ["{}{}".format(wm_type["header_prefix"], idx) for idx in range(self.min_idx, max_idx + 1)]
@@ -261,7 +265,7 @@ class Watermarkstat(object):
261265
data = STATUS_NA
262266
table.append((buf_pool, data))
263267
else:
264-
self.build_header(type)
268+
self.build_header(type, key)
265269
# Get stat for each port
266270
for port in natsorted(self.counter_port_name_map):
267271
row_data = list()

0 commit comments

Comments
 (0)