Skip to content
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

Proposing new command vagrant top #8358

Closed
vhosakot opened this issue Mar 10, 2017 · 7 comments
Closed

Proposing new command vagrant top #8358

vhosakot opened this issue Mar 10, 2017 · 7 comments

Comments

@vhosakot
Copy link

New feature proposal

I'd like to propose a new vagrant command vagrant top (similar to docker top https://docs.docker.com/engine/reference/commandline/top/) to display the CPU and memory usage of all the vagrant virtual machines. Currently, the user must SSH into each machine and run the top command to check the CPU and memory usage of each vagrant VM. Instead, having a command like vagrant top would be very useful to check the CPU and memory stats using a single command. vagrant top will also help debug issues when certain vagrant VMs consume a lot of CPU and/or memory on the host like (see the %CPU column below):

PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND                                   
 3227 qemu      20   0 2687456 2.006g   9088 S 210.5  6.4   1268:53 qemu-kvm                                  
 3375 qemu      20   0 6878692 2.856g   9096 S 210.5  9.1   1227:26 qemu-kvm                                  
 3309 qemu      20   0 2682336 2.013g   9068 S 210.2  6.4   1201:28 qemu-kvm                                  
 3283 qemu      20   0 2685408 2.015g   9100 S 209.5  6.4   1221:05 qemu-kvm 

This feature was discussed with spox in the #vagrant IRC channel on March 9th 2017.

Vagrant version

# vagrant -v
Vagrant 1.8.1

Host operating system

CentOS 7.3

Guest operating system

# vagrant box list
centos/7 (libvirt, 1611.01)

Expected behavior

  1. Display the CPU and memory usage of all the vagrant VMs in the output of the single command
    vagrant top.
  2. Display the CPU and memory usage of a specific vagrant VM in the output of
    vagrant top <VM name>.
  3. Display the following in vagrant help:
    top Display CPU and memory statistics of all the vagrant machines
@RichWellum
Copy link

👍

3 similar comments
@j05h
Copy link

j05h commented Mar 10, 2017

👍

@sysarcher
Copy link

👍

@maxgorovenko
Copy link

👍

@chrisroberts
Copy link
Member

This sounds like a reasonable idea, but this has low chance of being a priority for us anytime soon, so we'd rather close this issue than have it stagnate into the foreseeable future. The best way to get this implemented would be to submit a PR. If you do so, we'd welcome this work. If you want to discuss how to go about doing this, I'd be happy to help with that.

Again, thank you for suggesting this and it is a reasonable idea. But, since this is a feature request, it requires some work to add it to the project and we don't plan on doing that soon. But as this is also an open source project we welcome contributions. Thanks!

@mrself
Copy link

mrself commented Mar 4, 2020

I would like to add that such a command could also show CPU and memory usage of the VM in the current PC: show how much resources each machine takes. It may be useful when the VM hangs on and it is necessary to set the statistics of that VM.

@ghost
Copy link

ghost commented Mar 5, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@hashicorp hashicorp locked and limited conversation to collaborators Mar 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants