forked from ycrash/yc-360-script
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconst_darwin.go
More file actions
27 lines (25 loc) · 1.23 KB
/
const_darwin.go
File metadata and controls
27 lines (25 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package shell
var (
NetState = Command{"netstat", "-an"}
PS = Command{"ps", "-ef"}
PS2 = Command{"ps", "-ef"}
M3PS = Command{"ps", "-ef"}
Disk = Command{"df", "-hk"}
Top = Command{WaitCommand, "/bin/sh", "-c", "for i in {1..3}; do top -l 1 ; sleep 10; done"}
Top2 = NopCommand
TopH = Command{WaitCommand, "top", "-l", "1", "-pid", DynamicArg}
TopH2 = NopCommand
Top4M3 = Command{"top", "-l", "1"}
VMState = Command{"vmstat"}
DMesg = Command{"dmesg"}
DMesg2 = Command{"dmesg"}
GC = Command{"ps", "-f", "-p", DynamicArg}
AppendJavaCoreFiles = Command{"/bin/sh", "-c", "cat javacore.* > threaddump.out"}
AppendTopHFiles = Command{"/bin/sh", "-c", "cat topdashH.* >> threaddump.out"}
ProcessTopCPU = Command{"ps", "-eo", "pid,command,%cpu", "-r"}
ProcessTopMEM = Command{"ps", "-eo", "pid,command,%mem", "-m"}
OSVersion = Command{WaitCommand, "uname", "-a"}
KernelParam = Command{WaitCommand, "sysctl", "-a"}
Ping = Command{WaitCommand, "ping", "-c", "6"}
SHELL = Command{"/bin/sh", "-c"}
)