forked from ycrash/yc-data-script
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconst_solaris.go
38 lines (35 loc) · 1.42 KB
/
const_solaris.go
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
28
29
30
31
32
33
34
35
36
37
38
package shell
import (
"strconv"
)
var (
NetState = Command{"netstat", "-pan"}
PS = Command{"ps", "-eLf"}
PS2 = Command{"ps", "-eLf"}
M3PS = Command{"ps", "-eLf"}
Disk = Command{"df", "-hk"}
Top = Command{WaitCommand, "top", "-bc",
"-d", strconv.Itoa(TOP_INTERVAL),
"-n", strconv.Itoa(SCRIPT_SPAN/TOP_INTERVAL + 1)}
Top2 = Command{WaitCommand, "top", "-bc",
"-d", strconv.Itoa(TOP_INTERVAL),
"-n", strconv.Itoa(SCRIPT_SPAN/TOP_INTERVAL + 1)}
TopH = Command{WaitCommand, "top", "-bH",
"-n", "1",
"-p", DynamicArg}
TopH2 = Command{WaitCommand, "top", "-bH",
"-n", "1",
"-p", DynamicArg}
Top4M3 = Command{WaitCommand, "top", "-bc", "-n", "1"}
VMState = Command{WaitCommand, "vmstat", DynamicArg, DynamicArg, `| awk '{now=strftime("%T "); print now $0; fflush()}'`}
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,cmd,%cpu", "--sort=-%cpu"}
ProcessTopMEM = Command{"ps", "-eo", "pid,cmd,%mem", "--sort=-%mem"}
OSVersion = Command{WaitCommand, "uname", "-a"}
KernelParam = Command{WaitCommand, "sysctl", "-a"}
SHELL = Command{"/bin/sh", "-c"}
)