Skip to content

Commit

Permalink
[TACACS] Add --no-pager to tacacs utils (#15491)
Browse files Browse the repository at this point in the history
Summary: Add --no-pager to journalctl to display all logs at once, allowing grep to search through the output even when there are many logs.
  • Loading branch information
maipbui authored and mssonicbld committed Nov 27, 2024
1 parent 1990a5f commit f4f5c8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/tacacs/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ def log_exist(ptfhost, sed_command):


def get_auditd_config_reload_timestamp(duthost):
res = duthost.shell("sudo journalctl -u auditd --boot | grep 'audisp-tacplus re-initializing configuration'")
res = duthost.shell("sudo journalctl -u auditd --boot --no-pager | grep 'audisp-tacplus re-initializing configuration'") # noqa E501
logger.info("aaa config file timestamp {}".format(res["stdout_lines"]))

if len(res["stdout_lines"]) == 0:
Expand Down

0 comments on commit f4f5c8e

Please sign in to comment.