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

Staging v0.2.1 #124

Merged
merged 2 commits into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
665 changes: 131 additions & 534 deletions api/docs.go

Large diffs are not rendered by default.

665 changes: 131 additions & 534 deletions api/swagger.json

Large diffs are not rendered by default.

476 changes: 110 additions & 366 deletions api/swagger.yaml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions deployments/docker-compose/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ networks:
services:
# cm-beetle
cm-beetle:
image: cloudbaristaorg/cm-beetle:0.2.0
image: cloudbaristaorg/cm-beetle:0.2.1
container_name: cm-beetle
pull_policy: missing
build:
Expand Down Expand Up @@ -55,7 +55,7 @@ services:

# CB-Tumblebug
cb-tumblebug:
image: cloudbaristaorg/cb-tumblebug:0.9.10
image: cloudbaristaorg/cb-tumblebug:0.9.11
container_name: cb-tumblebug
# build:
# context: .
Expand Down
9 changes: 7 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@ module github.com/cloud-barista/cm-beetle

go 1.23.0

// Keep this for cm-model contributors
// replace github.com/cloud-barista/cm-model => ../cm-model

require (
github.com/cloud-barista/cb-tumblebug v0.9.10
github.com/cloud-barista/cm-honeybee/agent v0.0.0-20240704080504-526db6b80b90
github.com/cloud-barista/cb-tumblebug v0.9.11
github.com/cloud-barista/cm-model v0.0.1
github.com/fsnotify/fsnotify v1.7.0
github.com/go-playground/validator/v10 v10.22.0
github.com/go-resty/resty/v2 v2.13.1
Expand Down Expand Up @@ -70,5 +73,7 @@ require (
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
modernc.org/gc/v3 v3.0.0-20240304020402-f0dba7c97c2b // indirect
modernc.org/libc v1.50.9 // indirect
modernc.org/sqlite v1.29.10 // indirect
xorm.io/builder v0.3.13 // indirect
)
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ gitea.com/xorm/sqlfiddle v0.0.0-20180821085327-62ce714f951a h1:lSA0F4e9A2NcQSqGq
gitea.com/xorm/sqlfiddle v0.0.0-20180821085327-62ce714f951a/go.mod h1:EXuID2Zs0pAQhH8yz+DNjUbjppKQzKFAn28TMYPB6IU=
github.com/KyleBanks/depth v1.2.1 h1:5h8fQADFrWtarTdtDudMmGsC7GPbOAu6RVB3ffsVFHc=
github.com/KyleBanks/depth v1.2.1/go.mod h1:jzSb9d0L43HxTQfT+oSA1EEp2q+ne2uh6XgeJcm8brE=
github.com/cloud-barista/cb-tumblebug v0.9.10 h1:mnXLczjwi6FMwmrZ0n1LMdvFfDFKbz9MJp3jHDJ78Zk=
github.com/cloud-barista/cb-tumblebug v0.9.10/go.mod h1:uXi+JmmdU+cqcIqpMgfomzZNbNdrLQ+WZgK9ZlOGjY0=
github.com/cloud-barista/cm-honeybee/agent v0.0.0-20240704080504-526db6b80b90 h1:qGFG4sMqwKw06Y0ZzK4L2Bm6M/WHNnLQGZ3r6qUAhR8=
github.com/cloud-barista/cm-honeybee/agent v0.0.0-20240704080504-526db6b80b90/go.mod h1:+h6UB1Z2qrpfizIillcppLuh8zRlmjLSpkl63XGi1Wc=
github.com/cloud-barista/cb-tumblebug v0.9.11 h1:PLqQ+OD4+Nec1xTHJ3Qde7C74t2XiY5D43UemMg838A=
github.com/cloud-barista/cb-tumblebug v0.9.11/go.mod h1:uXi+JmmdU+cqcIqpMgfomzZNbNdrLQ+WZgK9ZlOGjY0=
github.com/cloud-barista/cm-model v0.0.1 h1:tcj5KHacQYuoLgvcuFoA+Cp23pbQg1xoAYNGtVRJXiU=
github.com/cloud-barista/cm-model v0.0.1/go.mod h1:gSuMhQxD813KIdSvkp8uGptYOeyDik749sYcICZjhj8=
github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand Down
15 changes: 15 additions & 0 deletions go.work.sum
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,8 @@ github.com/cloud-barista/cb-tumblebug v0.0.0-20230724172618-8f225d0127e8/go.mod
github.com/cloud-barista/cm-beetle/src v0.0.0-20230724172618-8f225d0127e8/go.mod h1:XQuz7L64MNUu04FmG5gB0z41VcrfaLuQP80EGyQTDgo=
github.com/cloud-barista/cm-honeybee v0.1.3 h1:G9Gb2NiiDtw9nRn7v56bpUM5FEfyBYJ8kgIKxZJZSkI=
github.com/cloud-barista/cm-honeybee v0.1.3/go.mod h1:A0Qm1CY4O1hAMxDRnEWjXACztP2D2y/U9GNNJvYzyzM=
github.com/cloud-barista/cm-model v0.0.0-20240909022259-4ca4411340d6 h1:lxU1vjbUW3W3be+WTI91WX4KrXD5cDmBMFAvUhqh9cQ=
github.com/cloud-barista/cm-model v0.0.0-20240909022259-4ca4411340d6/go.mod h1:GRtJ+4HdzKwfZySj9/99fnmyfFeaoyA2P+NKvTtFNUY=
github.com/cloud-barista/mc-terrarium v0.0.6-0.20240516045927-43023b6a0e18/go.mod h1:qey9GFrJidyJ3tVfeL/gcImgWLqsF64j/fVmBfaddDI=
github.com/cloud-barista/mc-terrarium v0.0.7/go.mod h1:qey9GFrJidyJ3tVfeL/gcImgWLqsF64j/fVmBfaddDI=
github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI=
Expand Down Expand Up @@ -366,6 +368,7 @@ github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/google/pprof v0.0.0-20211214055906-6f57359322fd/go.mod h1:KgnwoLYCZ8IQu3XUZ8Nc/bM9CCZFOyjUNOSygVozoDg=
github.com/google/pprof v0.0.0-20230323073829-e72429f035bd/go.mod h1:79YE0hCXdHag9sBkw2o+N/YnZtTkXi0UT9Nnixa5eYk=
github.com/google/pprof v0.0.0-20240409012703-83162a5b38cd/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw=
github.com/google/s2a-go v0.1.3/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A=
github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw=
github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
Expand Down Expand Up @@ -408,6 +411,7 @@ github.com/jollaman999/utils v1.0.10/go.mod h1:fb4x+o0k105MFIBBaNRN+tat7F3Rbkoln
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=
github.com/klauspost/compress v1.17.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE=
github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE=
github.com/klauspost/cpuid/v2 v2.2.7/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=
github.com/knqyf263/go-rpmdb v0.0.0-20231206071317-a8af76a6220f/go.mod h1:9LQcoMCMQ9vrF7HcDtXfvqGO4+ddxFQ8+YF/0CVGDww=
github.com/knqyf263/go-rpmdb v0.1.0/go.mod h1:9LQcoMCMQ9vrF7HcDtXfvqGO4+ddxFQ8+YF/0CVGDww=
github.com/knqyf263/go-rpmdb v0.1.1/go.mod h1:9LQcoMCMQ9vrF7HcDtXfvqGO4+ddxFQ8+YF/0CVGDww=
Expand Down Expand Up @@ -520,14 +524,18 @@ go.etcd.io/etcd/client/v2 v2.305.12/go.mod h1:aQ/yhsxMu+Oht1FOupSr60oBvcS9cKXHrz
go.etcd.io/etcd/client/v3 v3.5.12/go.mod h1:tSbBCakoWmmddL+BKVAJHa9km+O/E+bumDe9mSbPiqw=
go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo=
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0/go.mod h1:Mjt1i1INqiaoZOMGR1RIUJN+i3ChKoFRqzrRQhlkbs0=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0/go.mod h1:vy+2G/6NvVMpwGX/NyLqcC41fxepnuKHk16E6IZUcJc=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0/go.mod h1:XLZfZboOJWHNKUv7eH0inh0E9VV6eWDFB/9yJyTLPp0=
go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo=
go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4=
go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.22.0/go.mod h1:hYwym2nDEeZfG/motx0p7L7J1N1vyzIThemQsb4g2qY=
go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco=
go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4=
go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak=
go.opentelemetry.io/otel/sdk v1.22.0/go.mod h1:iu7luyVGYovrRpe2fmj3CVKouQNdTOkxtLzPvPz1DOc=
go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU=
go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0=
go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4=
go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
Expand Down Expand Up @@ -583,8 +591,15 @@ howett.net/plist v1.0.0/go.mod h1:lqaXoTrLY4hg8tnEzNru53gicrbv7rrk+2xJA/7hw9g=
howett.net/plist v1.0.1/go.mod h1:lqaXoTrLY4hg8tnEzNru53gicrbv7rrk+2xJA/7hw9g=
lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk=
modernc.org/cc/v3 v3.40.0/go.mod h1:/bTg4dnWkSXowUO6ssQKnOV0yMVxDYNIsIrzqTFDGH0=
modernc.org/cc/v3 v3.41.0/go.mod h1:Ni4zjJYJ04CDOhG7dn640WGfwBzfE0ecX8TyMB0Fv0Y=
modernc.org/cc/v4 v4.21.2/go.mod h1:HM7VJTZbUCR3rV8EYBi9wxnJ0ZBRiGE5OeGXNA0IsLQ=
modernc.org/ccgo/v3 v3.16.13/go.mod h1:2Quk+5YgpImhPjv2Qsob1DnZ/4som1lJTodubIcoUkY=
modernc.org/ccgo/v3 v3.17.0/go.mod h1:Sg3fwVpmLvCUTaqEUjiBDAvshIaKDB0RXaf+zgqFu8I=
modernc.org/ccgo/v4 v4.17.8/go.mod h1:buJnJ6Fn0tyAdP/dqePbrrvLyr6qslFfTbFrCuaYvtA=
modernc.org/fileutil v1.3.0/go.mod h1:XatxS8fZi3pS8/hKG2GH/ArUogfxjpEKs3Ku3aK4JyQ=
modernc.org/gc/v2 v2.4.1/go.mod h1:wzN5dK1AzVGoH6XOzc3YZ+ey/jPgYHLuVckd62P0GYU=
modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0=
modernc.org/sortutil v1.2.0/go.mod h1:TKU2s7kJMf1AE84OoiGppNHJwvB753OYfNl2WRb++Ss=
pault.ag/go/modprobe v0.1.2/go.mod h1:afr2STC/2Maz/qi4+Bma1s0dszZgO/PcM8AKar9DWhM=
pault.ag/go/topsort v0.1.1/go.mod h1:r1kc/L0/FZ3HhjezBIPaNVhkqv8L0UJ9bxRuHRVZ0q4=
sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8=
8 changes: 5 additions & 3 deletions pkg/api/rest/controller/recommendation.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ import (
// cloudmodel "github.com/cloud-barista/cm-beetle/pkg/api/rest/model/cloud/infra"
// "github.com/cloud-barista/cm-beetle/pkg/api/rest/model/onprem/infra"

"github.com/cloud-barista/cm-honeybee/agent/pkg/api/rest/model/onprem/infra"
// "github.com/cloud-barista/cm-honeybee/agent/pkg/api/rest/model/onprem/infra"
onprem "github.com/cloud-barista/cm-model/infra/onprem"

"github.com/cloud-barista/cm-beetle/pkg/core/common"
"github.com/cloud-barista/cm-beetle/pkg/core/recommendation"
Expand All @@ -38,7 +39,8 @@ import (
// }

type RecommendInfraRequest struct {
Servers []infra.Infra `json:"servers" validate:"required"`
// Servers []infra.Infra `json:"servers" validate:"required"`
onprem.OnPremInfra
}

type RecommendInfraResponse struct {
Expand Down Expand Up @@ -70,7 +72,7 @@ func RecommendInfra(c echo.Context) error {
log.Trace().Msgf("req: %v\n", req)

// Process
recommendedInfraInfo, err := recommendation.Recommend(req.Servers)
recommendedInfraInfo, err := recommendation.Recommend(req.OnPremInfra)
recommendedInfraInfo.TargetInfra.Name = "mmci01"

// Ouput
Expand Down
10 changes: 5 additions & 5 deletions pkg/core/migration/migration.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,11 +224,11 @@ func DeleteVMInfra(nsId, infraId string) (common.SimpleMsg, error) {

// delete the infrastructure with terminate option
method = "DELETE"
url = fmt.Sprintf("%s/ns/%s/defaultResources", epTumblebug, nsId)
options = ""
if options != "" {
url += "?" + options
}
url = fmt.Sprintf("%s/ns/%s/sharedResources", epTumblebug, nsId)
// options = ""
// if options != "" {
// url += "?" + options
// }

// Set request body
requestBody = common.NoBody
Expand Down
33 changes: 17 additions & 16 deletions pkg/core/recommendation/recommendation.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,19 @@ import (

// cloudmodel "github.com/cloud-barista/cm-beetle/pkg/api/rest/model/cloud/infra"

"github.com/cloud-barista/cm-honeybee/agent/pkg/api/rest/model/onprem/infra"
// "github.com/cloud-barista/cm-honeybee/agent/pkg/api/rest/model/onprem/infra"
// "github.com/cloud-barista/cm-beetle/pkg/api/rest/model/onprem/infra"

onprem "github.com/cloud-barista/cm-model/infra/onprem"

"github.com/cloud-barista/cm-beetle/pkg/config"
"github.com/cloud-barista/cm-beetle/pkg/core/common"
"github.com/cloud-barista/cm-beetle/pkg/similarity"
"github.com/go-resty/resty/v2"
"github.com/rs/zerolog/log"
)

func Recommend(srcInfra []infra.Infra) (RecommendedInfraInfo, error) {
func Recommend(srcInfra onprem.OnPremInfra) (RecommendedInfraInfo, error) {

var emptyResp RecommendedInfraInfo
var recommendedInfraInfo RecommendedInfraInfo
Expand Down Expand Up @@ -103,7 +105,7 @@ func Recommend(srcInfra []infra.Infra) (RecommendedInfraInfo, error) {
}`

// Recommand VMs
for _, server := range srcInfra {
for _, server := range srcInfra.Servers {

// Set VM info
recommendedVm := tbmodel.TbVmDynamicReq{
Expand All @@ -112,7 +114,7 @@ func Recommend(srcInfra []infra.Infra) (RecommendedInfraInfo, error) {
CommonSpec: "", // Search and set an appropriate VM spec
Description: "a recommended virtual machine",
Label: "rehosted-vm",
Name: fmt.Sprintf("rehosted-%s", server.Compute.OS.Node.Hostname),
Name: fmt.Sprintf("rehosted-%s", server.Hostname),
RootDiskSize: "", // TBD
RootDiskType: "", // TBD
SubGroupSize: "",
Expand All @@ -124,11 +126,11 @@ func Recommend(srcInfra []infra.Infra) (RecommendedInfraInfo, error) {
*/

// Extract server info from source computing infra info
cores := server.Compute.ComputeResource.CPU.Cores
memory := MBtoGiB(float64(server.Compute.ComputeResource.Memory.Size))
cores := server.CPU.Cores
memory := MBtoGiB(float64(server.Memory.TotalSize))

coresMax := cores << 1
var coresMin uint
var coresMin uint32
if cores > 1 {
coresMin = cores >> 1
} else {
Expand All @@ -146,13 +148,12 @@ func Recommend(srcInfra []infra.Infra) (RecommendedInfraInfo, error) {
providerName := "aws"
regionName := "ap-northeast-2"

osVendor := server.Compute.OS.OS.Vendor
osVersion := server.Compute.OS.OS.Release
osNameWithVersion := strings.ToLower(osVendor + osVersion)
osNameAndVersion := server.OS.Name + " " + server.OS.Version
osNameWithVersion := strings.ToLower(osNameAndVersion)

log.Debug().
Uint("coreLowerLimit", coresMin).
Uint("coreUpperLimit", coresMax).
Uint32("coreLowerLimit", coresMin).
Uint32("coreUpperLimit", coresMax).
Uint32("memoryLowerLimit (GiB)", memoryMin).
Uint32("memoryUpperLimit (GiB)", memoryMax).
Str("providerName", providerName).
Expand Down Expand Up @@ -265,10 +266,10 @@ func Recommend(srcInfra []infra.Infra) (RecommendedInfraInfo, error) {
}

keywords := fmt.Sprintf("%s %s %s %s",
server.Compute.OS.OS.Vendor,
server.Compute.OS.OS.Version,
server.Compute.OS.OS.Architecture,
server.Compute.ComputeResource.RootDisk.Type)
server.OS.Name,
server.OS.Version,
server.CPU.Architecture,
server.RootDisk.Type)
log.Debug().Msg("keywords for the VM OS image recommendation: " + keywords)

// Select VM OS image via LevenshteinDistance-based text similarity
Expand Down
40 changes: 38 additions & 2 deletions scripts/system-info/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,17 @@ It can be useful for extracting and referencing the configuration of the source
This script helps to quickly understand the current state of the system and diagnose issues.
It is useful for checking and referencing the configuration of the source computing environment for the cloud migrator project.

## Prerequisites

Ensure the apt packages are intstalled.

```bash
sudo apt-get install python3-dev
```

## Tested on
- `Python 3.8.10`

- `Python 3.10.12`
- `pip 20.0.2`

## Dependencies
Expand All @@ -18,7 +27,22 @@ It is useful for checking and referencing the configuration of the source comput
- `GPUtil`
- `distro`

### Setup venv (optional)

```bash
cd [PROJECT_ROOT]/scripts/system-info
python3 -m venv .venv
source .venv/bin/activate
```

Note - deactivate venv

```bash
deactivate
```

### Install dependencies

```bash
pip3 install -r requirements.txt
```
Expand All @@ -32,6 +56,7 @@ python3 system_info.py
## Features

### 1. OS Information Collection

Collects OS name, version, architecture, platform, boot time, currently logged-in user, kernel version, and distribution information.

```python
Expand All @@ -45,6 +70,7 @@ def get_os_info():
```

### 2. CPU Information Collection

Collects CPU brand, core count, current frequency, context switches, interrupts, architecture, user time, system time, and idle time.

```python
Expand All @@ -58,6 +84,7 @@ def get_cpu_info():
```

### 3. Memory Information Collection

Collects total memory, available memory, used memory, cached memory, and swap memory information.

```python
Expand All @@ -71,6 +98,7 @@ def get_memory_info():
```

### 4. Disk Information Collection

Collects total disk capacity, available capacity, used capacity, read and write count.

```python
Expand All @@ -84,6 +112,7 @@ def get_disk_info():
```

### 5. Network Information Collection

Collects host name, IP address, MAC address, active network interfaces, gateway, and DNS information.

```python
Expand All @@ -97,6 +126,7 @@ def get_network_info():
```

### 6. Advanced Network Information Collection

Collects IP address, netmask, broadcast, and MAC address of each network interface.

```python
Expand All @@ -107,6 +137,7 @@ def get_advanced_network_info():
```

### 7. GPU Information Collection

Collects GPU name and driver version (if GPUtil is installed).

```python
Expand All @@ -117,6 +148,7 @@ def get_gpu_info():
```

### 8. Graphic Card Information Collection

Collects VGA compatible controller information.

```python
Expand All @@ -126,6 +158,7 @@ def get_graphic_card_info():
```

### 9. Process Information Collection

Collects information on all running processes and users on the system.

```python
Expand All @@ -136,6 +169,7 @@ def get_process_info():
```

### 10. Data Saving

Saves all collected system information to a YAML file.

```python
Expand All @@ -145,9 +179,11 @@ def save_to_yaml(data):
```

## Output

The collected information is printed to the console in a neat table format, and is also saved to a `system_info.yaml` file.

Example

```
System Information:
+-------+--------------+-----------------------+----------------------------------------------------------+
Expand Down Expand Up @@ -266,4 +302,4 @@ Process Information:
| systemd-resolve | systemd-resolved |
| whoopsie | whoopsie |
+-----------------+--------------------------------------------------------------------------------+
```
```