You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello all! I've been exploring integrating power metrics into something, and it seems like the JSON export fits the bill for the data I need and how to parse it. However....it doesn't look like I'm able to actually access that data until scaphandre exits. For example, in the example on this page that shows piping the output to jq, actually zero output is seen during any of the run. And if you ctrl-c to exit, then all captured data is lost/discarded and you see nothing:
[~]
root # time scaphandre --no-header json --max-top-consumers=15 | jq
^C
real 0m10.304s
user 0m0.203s
sys 0m0.421s
[~]
root #
I can only get output from this method if I give it a specific runtime - say, -t5 or something - where scaphandre will exit on its own, then pipe the results to jq and allow me to see the results (actually I suspect it's piping the data out while it's running, but jq only parses it once it gets that final ] closing bracket that's emitted when scaphandre exits). Either way, this seems to preclude the possibility of running this as a service if I can't get parse-able data in-flight. Was the json exporter only meant to be used in a cron/scheduled job scenario? Or am I missing something that would allow me to run this continually?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello all! I've been exploring integrating power metrics into something, and it seems like the JSON export fits the bill for the data I need and how to parse it. However....it doesn't look like I'm able to actually access that data until scaphandre exits. For example, in the example on this page that shows piping the output to
jq, actually zero output is seen during any of the run. And if youctrl-cto exit, then all captured data is lost/discarded and you see nothing:I can only get output from this method if I give it a specific runtime - say,
-t5or something - where scaphandre will exit on its own, then pipe the results tojqand allow me to see the results (actually I suspect it's piping the data out while it's running, butjqonly parses it once it gets that final]closing bracket that's emitted when scaphandre exits). Either way, this seems to preclude the possibility of running this as a service if I can't get parse-able data in-flight. Was the json exporter only meant to be used in a cron/scheduled job scenario? Or am I missing something that would allow me to run this continually?Thanks for your time and consideration!
Beta Was this translation helpful? Give feedback.
All reactions