-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
CPU Usage Plugin #33
Comments
Can plugins have state? If so you could store the values and time between runs and then on the next run subtract the values from the previous run and divide by the elapsed time between the runs (which should be the interval). That way you don't have to wait a second to get an actual value and you would get an average percentage over the whole interval which is probably what most people rather want anyway. |
I did what @dennisjac said. needed to store the previous state and calc the deltas. but you don't need to know the elapsed time... take the total delta in ticks and divide that with the [user, nice, system, idle]. Here is one i did for heka, its in |
Sounds like a good idea, should probably be integrated into the existing system plugin |
this has been implemented, thanks @jpalay! |
Hi, sorry but i may be missing something... i don't see any percentage measurements is there anything special that needs to be done in order to turn these on? |
@deanefrati please open a new issue if you are having problems with CPU usage reporting. Please also include Telegraf version, command you are running, and output. thanks! |
I want to add support for CPU Usage (percentage). I've generally seen this done by querying /proc/stat, sleeping for a second, querying again, and calculating the percentage from the diff. Does this sound reasonable if added to the current cpu plugin?
The text was updated successfully, but these errors were encountered: