Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
J
jumpserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
jumpserver
Commits
d34ec00a
Commit
d34ec00a
authored
Aug 26, 2015
by
蓝枫
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #14 from pengyao/master
exact match, thanks for pengyao
parents
a040b1c1
e9c69245
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
connect.py
connect.py
+2
-2
No files found.
connect.py
View file @
d34ec00a
...
...
@@ -90,8 +90,8 @@ def log_record(username, host):
log_file_path
=
os
.
path
.
join
(
today_connect_log_dir
,
log_filename
)
dept_name
=
User
.
objects
.
get
(
username
=
username
)
.
dept
.
name
pid
=
os
.
getpid
()
pts
=
os
.
popen
(
"ps axu |
grep
%
s | grep -v grep | awk '
{ print $7 }'"
%
pid
)
.
read
()
.
strip
()
ip_list
=
os
.
popen
(
"who |
grep
%
s | awk '
{ print $5 }'"
%
pts
)
.
read
()
.
strip
(
'()
\n
'
)
pts
=
os
.
popen
(
"ps axu |
awk '$2==
%
s
{ print $7 }'"
%
pid
)
.
read
()
.
strip
()
ip_list
=
os
.
popen
(
"who |
awk '$2==
%
s
{ print $5 }'"
%
pts
)
.
read
()
.
strip
(
'()
\n
'
)
if
not
os
.
path
.
isdir
(
today_connect_log_dir
):
try
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment