Skip to content

Commit

Permalink
修复识别运行kvm虚拟机的独服为虚拟机 (#6)
Browse files Browse the repository at this point in the history
* fix distinguish kvm host as guset

* Fix spelling errors

* Update .gitignore

* update contributors[no ci]

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
wwng2333 and github-actions[bot] authored Dec 19, 2023
1 parent abf3a71 commit 4c7faec
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
.DS_Store
/agent
*.pprof
*.pprof
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ Agent of Nezha Monitoring
<!--GAMFC_DELIMITER--><a href="https://github.com/naiba" title="naiba">
<img src="https://avatars.githubusercontent.com/u/29243953?v=4" width="50;" alt="naiba"/>
</a>
<a href="https://github.com/wwng2333" title="Crazy">
<img src="https://avatars.githubusercontent.com/u/17147265?v=4" width="50;" alt="Crazy"/>
</a>
<a href="https://github.com/zhangnew" title="zhangnew">
<img src="https://avatars.githubusercontent.com/u/9146834?v=4" width="50;" alt="zhangnew"/>
</a>
Expand Down
2 changes: 1 addition & 1 deletion pkg/monitor/monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func GetHost(agentConfig *model.AgentConfig) *model.Host {
if err != nil {
println("host.Info error:", err)
} else {
if hi.VirtualizationSystem != "" {
if hi.VirtualizationRole == "guest" {
cpuType = "Virtual"
} else {
cpuType = "Physical"
Expand Down

0 comments on commit 4c7faec

Please sign in to comment.