Skip to content

stbtrace can't find input files for package installations, collection… #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 19, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions cmd/stbtrace.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
help='A comma separated list of statistics to'
'collect')
parser.add_argument('-c', '--coll', type=int, action='store',
dest='collection_ns',
help='The collection interval specified in ns')
dest='collection_sec',
help='The collection interval in seconds')
parser.add_argument('-b', '--bcc', action='store_true', dest='bcc',
help='Emit the bcc script without executing it')
parser.add_argument('-p', '--path', action='store', dest='PATH',
Expand All @@ -62,7 +62,7 @@
if args.PATH:
filename = args.PATH + '/' + args.tracer + '.json'
else:
filename = '../bpf/stbtrace/' + args.tracer + '.json'
filename = base_dir + '/bpf/stbtrace/' + args.tracer + '.json'
try:
with open(filename, 'r') as json_file:
data = json.load(json_file)
Expand Down Expand Up @@ -91,7 +91,7 @@
if args.PATH:
filename = args.PATH + '/' + args.tracer + '.st'
else:
filename = '../bpf/stbtrace/' + args.tracer + '.st'
filename = base_dir + '/bpf/stbtrace/' + args.tracer + '.st'

try:
with open(filename, 'r') as f:
Expand All @@ -118,8 +118,9 @@
template.selectFields('maps', args.STATS.split(","))
template.selectFields('hists', args.STATS.split(","))

if args.collection_ns:
template.addSingleton('collection_period_in_ns', args.collection_ns)
if args.collection_sec:
template.addSingleton('collection_period_in_ns',
args.collection_sec * 1000000000)
else:
for node in data:
if node != 'keys' and \
Expand Down