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