Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
python
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
isgphys
python
Commits
e0c20e72
Commit
e0c20e72
authored
7 years ago
by
Sven Mäder
Browse files
Options
Downloads
Patches
Plain Diff
Finish skeleton logparser
parent
a2da30ac
No related branches found
No related tags found
1 merge request
!12
Deltalogparse
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bin/deltalogparse.py
+13
-19
13 additions, 19 deletions
bin/deltalogparse.py
with
13 additions
and
19 deletions
bin/deltalogparse.py
+
13
−
19
View file @
e0c20e72
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
import
sys
import
sys
import
time
import
time
import
datetime
import
re
import
re
import
pprint
import
pprint
import
lib_path
import
lib_path
...
@@ -68,22 +69,24 @@ def main():
...
@@ -68,22 +69,24 @@ def main():
connection
.
bind
()
connection
.
bind
()
response
=
connection
.
search
(
reqs_last_run
=
list
()
search_base
=
search_base
,
req_start
=
datetime
.
datetime
.
utcnow
().
strftime
(
'
%Y%m%d%H%M%S.%fZ
'
)
search_filter
=
search_filter
,
search_scope
=
search_scope
,
attributes
=
attributes
)
while
True
:
while
True
:
start_time
=
time
.
perf_counter
()
start_time
=
time
.
perf_counter
()
req_start
=
None
response
=
connection
.
search
(
search_base
=
search_base
,
search_filter
=
''
.
join
([
'
(&
'
,
search_filter
,
'
(reqStart>=
'
,
req_start
,
'
)
'
,
'
)
'
]),
search_scope
=
search_scope
,
attributes
=
attributes
)
if
response
:
if
response
:
#for entry in connection.entries:
# print(entry.entry_dn)
# print(entry['reqStart'])
for
entry
in
connection
.
response
:
for
entry
in
connection
.
response
:
if
entry
[
'
attributes
'
][
'
reqStart
'
][
0
]
==
req_start
:
continue
req_start
=
entry
[
'
attributes
'
][
'
reqStart
'
][
0
]
req_start
=
entry
[
'
attributes
'
][
'
reqStart
'
][
0
]
req_type
=
entry
[
'
attributes
'
][
'
reqType
'
][
0
]
req_type
=
entry
[
'
attributes
'
][
'
reqType
'
][
0
]
req_dn
=
entry
[
'
attributes
'
][
'
reqDN
'
][
0
]
req_dn
=
entry
[
'
attributes
'
][
'
reqDN
'
][
0
]
...
@@ -107,15 +110,6 @@ def main():
...
@@ -107,15 +110,6 @@ def main():
if
sleep_time
>
0
:
if
sleep_time
>
0
:
time
.
sleep
(
sleep_time
)
time
.
sleep
(
sleep_time
)
#else:
# time.sleep(update_every)
response
=
connection
.
search
(
search_base
=
search_base
,
search_filter
=
search_filter
,
search_scope
=
search_scope
,
attributes
=
attributes
)
if
__name__
==
'
__main__
'
:
if
__name__
==
'
__main__
'
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment