-
-
Notifications
You must be signed in to change notification settings - Fork 222
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
Add instance uptime value #729
Comments
Hello, my friend @NotPranav0, and I are students at UT Austin and after taking a virtualization class, we wanted to contribute to this project. Could we be assigned this issue? Thanks. |
Sure, I assigned it to you! If @NotPranav0 comments in this issue I can also assign them to it. |
Comment |
Hello, I'm looking to start working on this issue,
In the first case, would this approach work:
In the second case:
Finally, I was wondering where I could find the structs/data for the monitor processes, VM agents, and qemu processes. Thanks. |
We can probably make that That makes it a bit more consistent with other timestamps type stuff we have.
Time since last start. We should be able to just read the creation time of the container PID and use that as the start time so we don't need to record anything. So you're looking at roughly this set of commits:
As mentioned, for the initial implementation we can just rely on the instance pid's creation time which should be good enough in most cases. For containers that ends up being the |
Hello, I managed to get the instance start time added to the state api, I had a few questions though. My implementation (same for qemu and lxc so probably should make a shared method, however wasn't too sure where to put it):
|
|
That should be easier, just looking at the creation time on the /proc entry for the PID. |
That was a lot easier, thanks. I made those changes and drafted PR #829. |
I realize I haven't exposed those values in |
Closes lxc#729 Signed-off-by: Sahaj Bhakta <sahajbhakta@gmail.com>
I've just pushed that logic and a few fixes to the branch now. |
Closes #729 Signed-off-by: Sahaj Bhakta <sahajbhakta@gmail.com>
It would be pretty useful to know how long an instance has been running.
This should be done with a millisecond value which for containers can be calculated from when the monitor process was first started, whereas for VMs, we can ask the agent for the uptime and fallback to when the qemu process was started.
We'll want the field added to
InstanceState
and then exposed inincus info
and as a column inincus list
.The text was updated successfully, but these errors were encountered: