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

Add support for PCI-E SSD Card #440

Merged
merged 2 commits into from
May 11, 2018
Merged

Conversation

ElevenShen
Copy link
Contributor

No description provided.

)

// 需要load libnvidia-ml.so.1库
func GpuMetrics() (L []*model.MetricValue) {

if err := gonvml.Initialize(); err != nil {
log.Println("Initialize error: ", err)
debug := g.Config().Debug
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

出错后, 在非debug模式下也应该打印日志吧? @ElevenShen

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@laiwei
现在是默认就会打error log,应该就是代码中提示需要load libnvidia-ml.so.1库,
实际情况绝大多数系统都没有用到gpu,
所以简单处理为正常情况非debug模式不打初始化错误日志,其他类型错误日志继续打:

2018/05/09 17:21:51 gpu.go:14: Initialize error: could not load NVML library
2018/05/09 17:22:51 gpu.go:14: Initialize error: could not load NVML library
2018/05/09 17:23:51 gpu.go:14: Initialize error: could not load NVML library
2018/05/09 17:24:51 gpu.go:14: Initialize error: could not load NVML library
2018/05/09 17:25:51 gpu.go:14: Initialize error: could not load NVML library
2018/05/09 17:26:51 gpu.go:14: Initialize error: could not load NVML library
2018/05/09 17:27:51 gpu.go:14: Initialize error: could not load NVML library
2018/05/09 17:28:51 gpu.go:14: Initialize error: could not load NVML library
2018/05/09 17:30:59 gpu.go:17: Initialize error: could not load NVML library

@laiwei laiwei merged commit 06f183b into open-falcon:master May 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants