Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Get VM container real metric #822

Closed
Ace-Tang opened this issue Oct 16, 2018 · 9 comments
Closed

Get VM container real metric #822

Ace-Tang opened this issue Oct 16, 2018 · 9 comments

Comments

@Ace-Tang
Copy link
Contributor

Description of problem

I am working on some container metric things, found that docker/pouch can not get right kata container metric informations. because if we use runc container, docker can get cpu/memory/pid/blkio infomation from cgroup and proc/stats on the host, but for kata, since it is a vm, we can not get information from host, if we want to get right things, we should get the file inside vm.

Here I think about a simple and crude way to get this information. Get file through exec command, and resolve the data in the pouch side, filling container metric with this thing.

I am not get better idea for how to get metric in kata container, so I want to ask for some help here, thanks.

Expected result

(replace this text with an explanation of what you thought would happen)

Actual result

(replace this text with details of what actually happened)


(replace this text with the output of the kata-collect-data.sh script, after
you have reviewed its content to ensure it does not contain any private
information).

@bergwolf
Copy link
Member

Does kata-runtime events subcommand satisfy your needs? https://github.com/kata-containers/runtime/blob/master/cli/events.go#L119. Please try to expand the same interface if you see any missing pieces.

@Ace-Tang
Copy link
Contributor Author

This is really gooood !

@jshachm
Copy link
Member

jshachm commented Oct 16, 2018

Glad that helps you ^ ^ @Ace-Tang

@Ace-Tang
Copy link
Contributor Author

thanks for @jshachm , now seems still can't get real metric through containerd. I have paste the reason on containerd issue containerd/containerd#2722, could you offer more help.
/cc @lifupan , since you are implement the shim v2 api now, I think you can offer some help. Thank.

@devimc
Copy link

devimc commented Oct 16, 2018

cc @grahamwhaley

@crosbymichael
Copy link

The v2 runtime that the kata should would implement has a custom proto.Any for metrics types. It is up to the shim to provide metrics how they see fit. It shouldn't be an issue.

https://github.com/containerd/containerd/blob/master/runtime/v2/task/shim.proto#L33

@Ace-Tang
Copy link
Contributor Author

Thanks for all yours help, I think #572 can satisfy my need, I will do more test on this.

@Ace-Tang Ace-Tang reopened this Oct 22, 2018
@Ace-Tang
Copy link
Contributor Author

With PR #572, I do some test with the container shim v2 API feature, seems good to run, and I can get kata real metric then, what is this pr's status now ?

It is weird I can not leave a comment under pr #572 , so I reopen this issue.

@Ace-Tang
Copy link
Contributor Author

Ace-Tang commented Oct 22, 2018

double comment since github is down in the morning.

egernst added a commit to egernst/runtime that referenced this issue Feb 9, 2021
…nch-bump

# Kata Containers 1.12.0-alpha1
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

5 participants