mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Don't needlessly call _get_proc_cmdline an extra time
This commit is contained in:
parent
a6f6b66016
commit
c208101d66
1 changed files with 1 additions and 5 deletions
|
@ -168,12 +168,8 @@ def top(num_processes=5, interval=3):
|
|||
):
|
||||
if num_processes and idx >= num_processes:
|
||||
break
|
||||
if len(_get_proc_cmdline(process)) == 0:
|
||||
cmdline = _get_proc_name(process)
|
||||
else:
|
||||
cmdline = _get_proc_cmdline(process)
|
||||
info = {
|
||||
"cmd": cmdline,
|
||||
"cmd": _get_proc_cmdline(process) or _get_proc_name(process),
|
||||
"user": _get_proc_username(process),
|
||||
"status": _get_proc_status(process),
|
||||
"pid": _get_proc_pid(process),
|
||||
|
|
Loading…
Add table
Reference in a new issue