上报硬盘写入速度

This commit is contained in:
GoEdgeLab
2023-08-02 12:00:19 +08:00
parent 74e64e8717
commit 57c5f0cc15

View File

@@ -82,8 +82,7 @@ func (this *NodeStatusExecutor) update() {
status.BuildVersionCode = utils.VersionToLong(teaconst.Version)
status.OS = runtime.GOOS
status.Arch = runtime.GOARCH
exe, _ := os.Executable()
status.ExePath = exe
status.ExePath, _ = os.Executable()
status.ConfigVersion = sharedNodeConfig.Version
status.IsActive = true
status.ConnectionCount = sharedListenerManager.TotalActiveConnections()
@@ -208,6 +207,8 @@ func (this *NodeStatusExecutor) updateCPU(status *nodeconfigs.NodeStatus) {
// 更新硬盘
func (this *NodeStatusExecutor) updateDisk(status *nodeconfigs.NodeStatus) {
status.DiskWritingSpeedMB = int(fsutils.DiskSpeedMB)
partitions, err := disk.Partitions(false)
if err != nil {
remotelogs.Error("NODE_STATUS", err.Error())