Skip to content

Commit 3115f77

Browse files
committed
cmd_acc: added report for most active source IP addresses
1 parent cb0ca0e commit 3115f77

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: kamcli/commands/cmd_acc.py

+3
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,7 @@ def acc_report(ctx, oformat, ostyle, limit, interval, name):
529529
- top-src: most active callers
530530
- top-dst: most active callees
531531
- top-odst: most active original callees
532+
- top-srcip: most active source IP addresses
532533
"""
533534
e = create_engine(ctx.gconfig.get("db", "rwurl"))
534535
ctx.vlog("Showing accounting report: " + name)
@@ -538,6 +539,8 @@ def acc_report(ctx, oformat, ostyle, limit, interval, name):
538539
qfield = "dst_user"
539540
elif name == "top-odst":
540541
qfield = "dst_ouser"
542+
elif name == "top-srcip":
543+
qfield = "src_ip"
541544

542545
query = "SELECT `" + qfield + "`, count(*) AS `count` FROM acc"
543546

0 commit comments

Comments
 (0)