mirror of
https://code.dumpstack.io/tools/appvm.git
synced 2024-11-27 10:31:31 +00:00
Refactor
This commit is contained in:
parent
8a93015bfe
commit
29e447435f
2
appvm.go
2
appvm.go
|
@ -280,7 +280,7 @@ func autoBalloon(l *libvirt.Libvirt, memoryMin, adjustPercent uint64) {
|
||||||
table := tablewriter.NewWriter(os.Stdout)
|
table := tablewriter.NewWriter(os.Stdout)
|
||||||
table.SetHeader([]string{"Application VM", "Used memory", "Current memory", "Max memory", "New memory"})
|
table.SetHeader([]string{"Application VM", "Used memory", "Current memory", "Max memory", "New memory"})
|
||||||
for _, d := range domains {
|
for _, d := range domains {
|
||||||
if d.Name[0:5] == "appvm" {
|
if strings.HasPrefix(d.Name, "appvm_") {
|
||||||
name := d.Name[6:]
|
name := d.Name[6:]
|
||||||
|
|
||||||
memoryUsedRaw, err := ioutil.ReadFile(os.Getenv("HOME") + "/appvm/" + name + "/.memory_used")
|
memoryUsedRaw, err := ioutil.ReadFile(os.Getenv("HOME") + "/appvm/" + name + "/.memory_used")
|
||||||
|
|
Loading…
Reference in a new issue