diff options
Diffstat (limited to 'filter/global.go')
-rw-r--r-- | filter/global.go | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/filter/global.go b/filter/global.go index 45706d4..37af52b 100644 --- a/filter/global.go +++ b/filter/global.go | |||
@@ -28,9 +28,16 @@ type Process struct { | |||
28 | ExitTimestamp time.Time `bson:"exit_timestamp"` | 28 | ExitTimestamp time.Time `bson:"exit_timestamp"` |
29 | } | 29 | } |
30 | 30 | ||
31 | type tgidNode struct { | ||
32 | Tgid int `bson:"tgid"` | ||
33 | FindPid map[int]int `bson:"findPid"` | ||
34 | Threads []Process `bson:"threads"` | ||
35 | ChildTgid []int `bson:"child_tgid"` | ||
36 | } | ||
37 | |||
31 | func (p Process) String() string { | 38 | func (p Process) String() string { |
32 | var res string | 39 | var res string |
33 | res = "" | 40 | res = "---------------------\n" |
34 | res += fmt.Sprintf("timestamp\t%v\n", p.StartTimestamp) | 41 | res += fmt.Sprintf("timestamp\t%v\n", p.StartTimestamp) |
35 | res += fmt.Sprintf("ppid\t%d\nparentTgid\t%d\n", p.Ppid, p.ParentTgid) | 42 | res += fmt.Sprintf("ppid\t%d\nparentTgid\t%d\n", p.Ppid, p.ParentTgid) |
36 | res += fmt.Sprintf("pid\t%d\ntgid\t%d\nargs: ", p.Pid, p.Tgid) | 43 | res += fmt.Sprintf("pid\t%d\ntgid\t%d\nargs: ", p.Pid, p.Tgid) |
@@ -53,9 +60,20 @@ func (p Process) String() string { | |||
53 | res += fmt.Sprintf("%d ", p.Children[i]) | 60 | res += fmt.Sprintf("%d ", p.Children[i]) |
54 | } | 61 | } |
55 | res += fmt.Sprintf("\n") | 62 | res += fmt.Sprintf("\n") |
63 | res += fmt.Sprintf("exit_timestamp:\t%v\nexit_code:\t%d\nexit_signal:\t%d\n", p.ExitTimestamp, p.ExitCode, p.ExitSignal) | ||
56 | return res | 64 | return res |
57 | } | 65 | } |
58 | 66 | ||
67 | type File struct { | ||
68 | OpenTimestamp time.Time `bson:"timestamp"` | ||
69 | FileName string `bson:"fileName"` | ||
70 | Pid int `bson:"pid"` | ||
71 | Fd int `bson:"fd"` | ||
72 | Flags [4]uint64 `bson:"flags"` | ||
73 | Written []time.Time `bson:"written"` | ||
74 | CloseTimestamp time.Time `bson:"close_timestamp"` | ||
75 | } | ||
76 | |||
59 | // Queue 定义一个队列结构体 | 77 | // Queue 定义一个队列结构体 |
60 | type Queue struct { | 78 | type Queue struct { |
61 | items []interface{} | 79 | items []interface{} |