mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-08-31 23:20:37 +00:00
jlog
This commit is contained in:
@@ -108,8 +108,7 @@ def log_record(username, host):
|
|||||||
remote_ip = os.popen("who |grep `ps aux |gawk '{if ($2==%s) print $1}'` |gawk '{print $5}'|tr -d '()'" % pid).readlines()
|
remote_ip = os.popen("who |grep `ps aux |gawk '{if ($2==%s) print $1}'` |gawk '{print $5}'|tr -d '()'" % pid).readlines()
|
||||||
for ip in remote_ip:
|
for ip in remote_ip:
|
||||||
ip_list.append(ip.strip('\n'))
|
ip_list.append(ip.strip('\n'))
|
||||||
print ip_list
|
ip_list = ','.join(list(set(ip_list)))
|
||||||
ip_list = list(set(ip_list))
|
|
||||||
|
|
||||||
if not os.path.isdir(today_connect_log_dir):
|
if not os.path.isdir(today_connect_log_dir):
|
||||||
try:
|
try:
|
||||||
|
Reference in New Issue
Block a user