blob: 0439df64702f1d6e8a5028d9d115777077e69ccf (
plain) (
blame)
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
|
package main
import (
"sync"
"time"
)
type Event struct {
timestamp time.Time
pid, ppid int
syscall int
argc int
argv []string
cwd string
}
type process struct {
timestamp time.Time
pid, ppid int
argv []string
cwd string
rootfs string
children []int
}
var pids sync.Map // 古希腊掌管进程的神,int->*process
var wg sync.WaitGroup // 掌管协程
var rawChan chan interface{} // 从接收到整理的管道
var cookedChan chan Event // 整理好的信息的管道
var syscallTable [500]string //记录一下系统调用
var containerdPid int
|