Skip to content

Commit dfc734d

Browse files
committed
chore: skip providers on local flare
1 parent 7d4beb5 commit dfc734d

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

pkg/flare/archive_aix.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ import (
2121
// resource limits are enforced per segment and RSS/VSZ alone don't show which
2222
// segment is close to its ulimit.
2323
func getSvmonData(ctx context.Context, fb flaretypes.FlareBuilder) error {
24+
if fb.IsLocal() {
25+
return nil
26+
}
27+
2428
pid := strconv.Itoa(os.Getpid())
2529
cmd := exec.CommandContext(ctx, "svmon", "-P", pid, "-O", "unit=KB,segment=on")
2630
out, err := cmd.CombinedOutput()

pkg/flare/archive_nix.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ func getWindowsData(_ context.Context, _ flaretypes.FlareBuilder) error {
2424
// output reflects the Agent's actual limits, not an unrelated login shell's.
2525
// Both the soft (currently enforced) and hard (ceiling) limits are captured.
2626
func getUlimitData(ctx context.Context, fb flaretypes.FlareBuilder) error {
27+
if fb.IsLocal() {
28+
return nil
29+
}
30+
2731
cmd := exec.CommandContext(ctx, "sh", "-c",
2832
`echo "=== Soft limits (ulimit -aS) ==="; ulimit -aS; echo; echo "=== Hard limits (ulimit -aH) ==="; ulimit -aH`)
2933
out, err := cmd.CombinedOutput()

0 commit comments

Comments
 (0)