Skip to content

Commit

Permalink
cmd_acc: added report top-odst
Browse files Browse the repository at this point in the history
  • Loading branch information
miconda committed Oct 15, 2024
1 parent 3cd4845 commit 14fcfd9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions kamcli/commands/cmd_acc.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,13 +527,16 @@ def acc_report(ctx, oformat, ostyle, limit, interval, name):
<name> - name of the report:
- top-src: most active callers
- top-dst: most active callees
- top-odst: most active original callees
"""
e = create_engine(ctx.gconfig.get("db", "rwurl"))
ctx.vlog("Showing accounting report: " + name)

userfield = "src_user"
if name == "top-dst":
userfield = "dst_user"
elif name == "top-odst":
userfield = "dst_ouser"

query = "SELECT `" + userfield + "`, count(*) AS `count` FROM acc"

Expand Down

0 comments on commit 14fcfd9

Please sign in to comment.