Skip to content

Commit

Permalink
update 1.0.1 net ifname
Browse files Browse the repository at this point in the history
  • Loading branch information
freedomkk-qfeng committed Dec 7, 2016
1 parent 714c0aa commit 514e837
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ MsSQL
"backdoor": false
},
"collector": {
"ifacePrefix": ["Intel"] //所采集的网卡描述信息关键词,例如Intel(R)PRO/1000 MT NetworkConnection
"ifacePrefix": ["本地连接"] //所采集的网卡名,注意 falcon 默认不支持中文名的tag,因此需要修改 graph 表的编码为 uft8
},
"ignore": {
"cpu.busy": true,
Expand Down
18 changes: 14 additions & 4 deletions funcs/func_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func Test_disk(t *testing.T) {
}

func Test_net_status(t *testing.T) {
var ifacePrefix = []string{"Intel"}
var ifacePrefix = []string{"本地连接", "Loop"}
netifs, err := net_status(ifacePrefix)
t.Log(netifs)
t.Error(err)
Expand All @@ -55,9 +55,19 @@ func Test_TestIOCounters(t *testing.T) {
}

func Test_Process(t *testing.T) {
// p, err := Processes()
// t.Log(p)
// t.Error(err)
p, err := Processes()
t.Log(p)
t.Error(err)
cnt := 0
m := map[int]string{
1: "smss.exe",
}
for i := 0; i < len(p); i++ {
if is_a(p[i], m) {
cnt++
}
}
t.Log(cnt)
}
func Test_tcpip(t *testing.T) {
ret, _ := TcpipCounters()
Expand Down
3 changes: 2 additions & 1 deletion g/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ import (

// changelog:
// 1.0.0 windows-agent
// 1.0.1 ifstat use ifname instead ifdescription
const (
VERSION = "1.0.0"
VERSION = "1.0.1"
COLLECT_INTERVAL = time.Second
NET_PORT_LISTEN = "net.port.listen"
DU_BS = "du.bs"
Expand Down

0 comments on commit 514e837

Please sign in to comment.