Skip to content
Snippets Groups Projects
Commit 5f7343eb authored by Andreas Ziegler's avatar Andreas Ziegler
Browse files

disable_all_uprobes.py: output progress information

In order to estimate the progress of uprobe disabling, output the
current iteration count every 1000th time.
parent c2d07194
No related branches found
No related tags found
No related merge requests found
Pipeline #74395 passed
...@@ -24,8 +24,12 @@ if len(sys.argv) > 1: ...@@ -24,8 +24,12 @@ if len(sys.argv) > 1:
for line in infd: for line in infd:
disable_event(line.split(' ')[0][2:]) disable_event(line.split(' ')[0][2:])
else: else:
i = 0
for folder in os.scandir(MOUNTPOINT + '/events/uprobes'): for folder in os.scandir(MOUNTPOINT + '/events/uprobes'):
i += 1
if folder.is_dir(): if folder.is_dir():
disable_event(folder.name) disable_event(folder.name)
if i % 1000 == 0:
print('disabled {} events'.format(i))
write_to_trace_file('uprobe_events', os.O_WRONLY | os.O_TRUNC, '') write_to_trace_file('uprobe_events', os.O_WRONLY | os.O_TRUNC, '')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment