Skip to content

Commit 99fa252

Browse files
gllghrSebastien Roy
authored andcommitted
Fixes for estat usage and arg parsing error messages (#26)
* Fix usage message for zil program * Fix arg parsing error message
1 parent a0fc93c commit 99fa252

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

cmd/estat.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,11 @@ def die(*args, **kwargs):
9393
-d LEVEL set BCC debug level
9494
-e emit the resulting eBPF script without executing it
9595
96-
estat zil [options]
96+
estat zil [POOL]
9797
Provides a breakdown of time spent doing ZIL-related activities, in
9898
particular the time spent allocating a block and time spent waiting for
99-
the write I/O to complete.
100-
101-
-a pool the pool to trace
99+
the write I/O to complete. If POOL is not specified, defaults to tracing
100+
the pool 'domain0'.
102101
"""
103102

104103

@@ -194,7 +193,10 @@ class Args:
194193
else:
195194
assert False, "unhandled option: " + opt
196195

197-
if len(rem_args) != 1:
196+
if len(rem_args) == 0:
197+
die("Missing duration argument")
198+
199+
if len(rem_args) > 1:
198200
die("Too many arguments")
199201

200202
try:

0 commit comments

Comments
 (0)