Skip to content
This repository has been archived by the owner on Dec 3, 2019. It is now read-only.

Support for batch mode #22

Open
stefanodoni opened this issue Jun 20, 2016 · 3 comments
Open

Support for batch mode #22

stefanodoni opened this issue Jun 20, 2016 · 3 comments

Comments

@stefanodoni
Copy link

As of now, it looks like the main use case for cpustat is interactive. As the provided metrics are super useful, it would be nice to have a batch mode that allows the background logging of the metrics.

To achieve that, at minimum, a timestamp should be logged at the start of each sample. Even better, the tool could support for a machine-parsable CSV output like sadf does.

Many thanks for the outstanding work, much needed!

@mranney
Copy link
Contributor

mranney commented Jun 20, 2016

I've done some work on that. Check out cpustat-agent:

https://github.com/uber-common/cpustat/tree/master/cpustat-agent

It stashes the samples in a circular buffer, and then you can fetch them with a simple client interface.

It has triggered some heap fragmentation issues, which I'm hoping that the next release of Go will fix.

@stefanodoni
Copy link
Author

Great!

Any hint about how it can be used?

@jgehrcke
Copy link

@stefanodoni we have explored using cpustat, and after all we built https://github.com/jgehrcke/goeffel. Quote from goeffel's README:

The program cpustat open-sourced by Uber has a delightful README about the general measurement methodology and overall seems to be a great tool. However, it seems to be optimized for interactive usage (whereas we were looking for a robust measurement program which can be pointed at a process and then be left unattended for a significant while)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants