Skip to content

Commit 09a2f4b

Browse files
committed
Rename M3PS var to PSGetProcessIds to free it for the upcoming m3 lp requirement
1 parent 01ecab5 commit 09a2f4b

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

internal/capture/executils/const_aix.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var (
44
NetState = Command{"netstat", "-a"}
55
PS = Command{"ps", "-ef"}
66
PS2 = Command{"ps", "-ef"}
7-
M3PS = Command{"ps", "-ef"}
7+
PSGetProcessIds = Command{"ps", "-ef"}
88
Disk = Command{"df"}
99
Top = Command{"topas", "-P"}
1010
Top2 = Command{"topas", "-P"}

internal/capture/executils/const_darwin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var (
44
NetState = Command{"netstat", "-an"}
55
PS = Command{"ps", "-ef"}
66
PS2 = Command{"ps", "-ef"}
7-
M3PS = Command{"ps", "-ef"}
7+
PSGetProcessIds = Command{"ps", "-ef"}
88
Disk = Command{"df", "-hk"}
99
Top = Command{WaitCommand, "/bin/sh", "-c", "for i in {1..3}; do top -l 5 ; sleep 10; done"}
1010
Top2 = NopCommand

internal/capture/executils/const_linux.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ var (
44
NetState = Command{"netstat", "-pan"}
55
PS = Command{"ps", "-eLf"}
66
PS2 = Command{"ps", "-eTf"}
7-
M3PS = Command{"ps", "-eLf"}
87
Disk = Command{"df", "-hk"}
98
Top = Command{WaitCommand, "top", "-bc",
109
"-d", "10",
@@ -30,6 +29,7 @@ var (
3029
OSVersion = Command{WaitCommand, "uname", "-a"}
3130
KernelParam = Command{WaitCommand, "sysctl", "-a"}
3231
Ping = Command{WaitCommand, "ping", "-c", "6"}
32+
PSGetProcessIds = Command{"ps", "-eLf"}
3333

3434
SHELL = Command{"/bin/sh", "-c"}
3535

internal/capture/executils/const_solaris.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ var (
88
NetState = Command{"netstat", "-pan"}
99
PS = Command{"ps", "-eLf"}
1010
PS2 = Command{"ps", "-eLf"}
11-
M3PS = Command{"ps", "-eLf"}
1211
Disk = Command{"df", "-hk"}
1312
Top = Command{WaitCommand, "top", "-bc",
1413
"-d", strconv.Itoa(TOP_INTERVAL),
@@ -34,6 +33,7 @@ var (
3433
OSVersion = Command{WaitCommand, "uname", "-a"}
3534
KernelParam = Command{WaitCommand, "sysctl", "-a"}
3635
JavaVersionCommand = Command{"java", "-XshowSettings:java", "-version"}
36+
PSGetProcessIds = Command{"ps", "-eLf"}
3737

3838
SHELL = Command{"/bin/sh", "-c"}
3939
)

internal/capture/executils/const_windows.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ var (
1212
NetState = Command{"netstat", "-an"}
1313
PS = Command{"tasklist"}
1414
PS2 = Command{"tasklist"}
15-
M3PS = Command{WaitCommand, "PowerShell.exe", "-Command", "Get-CimInstance -Class Win32_Process | ConvertTo-Json"}
1615

1716
Disk = Command{"wmic", "logicaldisk", "get", "size,freespace,caption"}
1817
Top = NopCommand
@@ -32,6 +31,7 @@ var (
3231
KernelParam = NopCommand
3332
Ping = Command{WaitCommand, "ping", "-n", "6"}
3433
JavaVersionCommand = Command{"java.exe", "-XshowSettings:java", "-version"}
34+
PSGetProcessIds = Command{WaitCommand, "PowerShell.exe", "-Command", "Get-CimInstance -Class Win32_Process | ConvertTo-Json"}
3535

3636
SHELL = Command{"cmd.exe", "/c"}
3737
)

internal/capture/proc_others.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ Next:
9292
}
9393

9494
func GetProcessIds(tokens config.ProcessTokens, excludes config.ProcessTokens) (pids map[int]string, err error) {
95-
output, err := executils.CommandCombinedOutput(executils.M3PS)
95+
output, err := executils.CommandCombinedOutput(executils.PSGetProcessIds)
9696
if err != nil {
9797
return
9898
}

internal/capture/proc_windows.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ type CIMProcess struct {
109109
type CIMProcessList []CIMProcess
110110

111111
func GetProcessIds(tokens config.ProcessTokens, excludes config.ProcessTokens) (pids map[int]string, err error) {
112-
output, err := executils.CommandCombinedOutput(executils.M3PS)
112+
output, err := executils.CommandCombinedOutput(executils.PSGetProcessIds)
113113
if err != nil {
114114
return
115115
}

0 commit comments

Comments
 (0)