mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-06 18:10:26 +08:00
硬盘TRIM增加追踪统计
This commit is contained in:
@@ -5,6 +5,7 @@ package nodes
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/TeaOSLab/EdgeNode/internal/remotelogs"
|
||||
"github.com/TeaOSLab/EdgeNode/internal/trackers"
|
||||
executils "github.com/TeaOSLab/EdgeNode/internal/utils/exec"
|
||||
"github.com/TeaOSLab/EdgeNode/internal/utils/idles"
|
||||
"runtime"
|
||||
@@ -57,6 +58,8 @@ func (this *TrimDisksTask) loop() error {
|
||||
return fmt.Errorf("'fstrim' command not found: %w", err)
|
||||
}
|
||||
|
||||
defer trackers.Begin("TRIM_DISKS").End()
|
||||
|
||||
var cmd = executils.NewCmd(trimExe, "-a").
|
||||
WithStderr()
|
||||
err = cmd.Run()
|
||||
|
||||
Reference in New Issue
Block a user