collect

package
v1.0.1-0...-a8ab2d6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 10, 2019 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package collect is a generated protocol buffer package.

It is generated from these files:

examples/collect/collect.proto

It has these top-level messages:

ThreadInfo
ProcessInfo
SystemInfo
SnapshotRequest
Result

Index

Constants

This section is empty.

Variables

View Source
var SnapshotRequest_Level_name = map[int32]string{
	0: "kSystemInfoOnly",
	1: "kSystemInfoAndProcesses",
	2: "kSystemInfoAndThreads",
	3: "kSystemInfoInitialSnapshot",
}
View Source
var SnapshotRequest_Level_value = map[string]int32{
	"kSystemInfoOnly":            0,
	"kSystemInfoAndProcesses":    1,
	"kSystemInfoAndThreads":      2,
	"kSystemInfoInitialSnapshot": 3,
}

Functions

func RegisterCollectService

func RegisterCollectService(service CollectService)

Types

type CollectService

type CollectService interface {
	GetSnapshot(req *SnapshotRequest, resp *SystemInfo) error
	FlushFile(req *rpc2.Empty, resp *rpc2.Empty) error
	RollFile(req *rpc2.Empty, resp *Result) error
	Version(req *rpc2.Empty, resp *Result) error
	Quit(req *rpc2.Empty, resp *Result) error
	Restart(req *rpc2.Empty, resp *Result) error
}

type CollectServiceClient

type CollectServiceClient struct {
	// contains filtered or unexported fields
}

func NewCollectServiceClient

func NewCollectServiceClient(conn io.ReadWriteCloser) *CollectServiceClient

func (*CollectServiceClient) Close

func (c *CollectServiceClient) Close() error

func (*CollectServiceClient) FlushFile

func (c *CollectServiceClient) FlushFile(req *rpc2.Empty, resp *rpc2.Empty) error

func (*CollectServiceClient) GetSnapshot

func (c *CollectServiceClient) GetSnapshot(req *SnapshotRequest, resp *SystemInfo) error

func (*CollectServiceClient) Quit

func (c *CollectServiceClient) Quit(req *rpc2.Empty, resp *Result) error

func (*CollectServiceClient) Restart

func (c *CollectServiceClient) Restart(req *rpc2.Empty, resp *Result) error

func (*CollectServiceClient) RollFile

func (c *CollectServiceClient) RollFile(req *rpc2.Empty, resp *Result) error

func (*CollectServiceClient) Version

func (c *CollectServiceClient) Version(req *rpc2.Empty, resp *Result) error

type ProcessInfo

type ProcessInfo struct {
	Pid              *int32             `protobuf:"varint,1,opt,name=pid" json:"pid,omitempty"`
	Basic            *ProcessInfo_Basic `protobuf:"bytes,2,opt,name=basic" json:"basic,omitempty"`
	UserCpuMs        *int64             `protobuf:"varint,3,opt,name=user_cpu_ms" json:"user_cpu_ms,omitempty"`
	SysCpuMs         *int64             `protobuf:"varint,4,opt,name=sys_cpu_ms" json:"sys_cpu_ms,omitempty"`
	LastProcessor    *int32             `protobuf:"varint,5,opt,name=last_processor" json:"last_processor,omitempty"`
	WaitChannel      *int32             `protobuf:"varint,6,opt,name=wait_channel" json:"wait_channel,omitempty"`
	VsizeKb          *int64             `protobuf:"varint,7,opt,name=vsize_kb" json:"vsize_kb,omitempty"`
	RssKb            *int64             `protobuf:"varint,8,opt,name=rss_kb" json:"rss_kb,omitempty"`
	State            *int32             `protobuf:"varint,9,opt,name=state" json:"state,omitempty"`
	MinorPageFaults  *int64             `protobuf:"varint,10,opt,name=minor_page_faults" json:"minor_page_faults,omitempty"`
	MajorPageFaults  *int64             `protobuf:"varint,11,opt,name=major_page_faults" json:"major_page_faults,omitempty"`
	NumThreads       *int32             `protobuf:"varint,12,opt,name=num_threads" json:"num_threads,omitempty"`
	Threads          []*ThreadInfo      `protobuf:"bytes,13,rep,name=threads" json:"threads,omitempty"`
	XXX_unrecognized []byte             `json:"-"`
}

func (*ProcessInfo) GetBasic

func (m *ProcessInfo) GetBasic() *ProcessInfo_Basic

func (*ProcessInfo) GetLastProcessor

func (m *ProcessInfo) GetLastProcessor() int32

func (*ProcessInfo) GetMajorPageFaults

func (m *ProcessInfo) GetMajorPageFaults() int64

func (*ProcessInfo) GetMinorPageFaults

func (m *ProcessInfo) GetMinorPageFaults() int64

func (*ProcessInfo) GetNumThreads

func (m *ProcessInfo) GetNumThreads() int32

func (*ProcessInfo) GetPid

func (m *ProcessInfo) GetPid() int32

func (*ProcessInfo) GetRssKb

func (m *ProcessInfo) GetRssKb() int64

func (*ProcessInfo) GetState

func (m *ProcessInfo) GetState() int32

func (*ProcessInfo) GetSysCpuMs

func (m *ProcessInfo) GetSysCpuMs() int64

func (*ProcessInfo) GetThreads

func (m *ProcessInfo) GetThreads() []*ThreadInfo

func (*ProcessInfo) GetUserCpuMs

func (m *ProcessInfo) GetUserCpuMs() int64

func (*ProcessInfo) GetVsizeKb

func (m *ProcessInfo) GetVsizeKb() int64

func (*ProcessInfo) GetWaitChannel

func (m *ProcessInfo) GetWaitChannel() int32

func (*ProcessInfo) ProtoMessage

func (*ProcessInfo) ProtoMessage()

func (*ProcessInfo) Reset

func (m *ProcessInfo) Reset()

func (*ProcessInfo) String

func (m *ProcessInfo) String() string

type ProcessInfo_Basic

type ProcessInfo_Basic struct {
	Uid              *int32   `protobuf:"varint,1,opt,name=uid" json:"uid,omitempty"`
	Euid             *int32   `protobuf:"varint,2,opt,name=euid" json:"euid,omitempty"`
	Ppid             *int32   `protobuf:"varint,3,opt,name=ppid" json:"ppid,omitempty"`
	Starttime        *int64   `protobuf:"varint,4,opt,name=starttime" json:"starttime,omitempty"`
	Name             *string  `protobuf:"bytes,5,opt,name=name" json:"name,omitempty"`
	Cmdline          []string `protobuf:"bytes,6,rep,name=cmdline" json:"cmdline,omitempty"`
	Executable       *string  `protobuf:"bytes,7,opt,name=executable" json:"executable,omitempty"`
	XXX_unrecognized []byte   `json:"-"`
}

func (*ProcessInfo_Basic) GetCmdline

func (m *ProcessInfo_Basic) GetCmdline() []string

func (*ProcessInfo_Basic) GetEuid

func (m *ProcessInfo_Basic) GetEuid() int32

func (*ProcessInfo_Basic) GetExecutable

func (m *ProcessInfo_Basic) GetExecutable() string

func (*ProcessInfo_Basic) GetName

func (m *ProcessInfo_Basic) GetName() string

func (*ProcessInfo_Basic) GetPpid

func (m *ProcessInfo_Basic) GetPpid() int32

func (*ProcessInfo_Basic) GetStarttime

func (m *ProcessInfo_Basic) GetStarttime() int64

func (*ProcessInfo_Basic) GetUid

func (m *ProcessInfo_Basic) GetUid() int32

func (*ProcessInfo_Basic) ProtoMessage

func (*ProcessInfo_Basic) ProtoMessage()

func (*ProcessInfo_Basic) Reset

func (m *ProcessInfo_Basic) Reset()

func (*ProcessInfo_Basic) String

func (m *ProcessInfo_Basic) String() string

type Result

type Result struct {
	Succeed          *bool   `protobuf:"varint,1,req,name=succeed" json:"succeed,omitempty"`
	Message          *string `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

func (*Result) GetMessage

func (m *Result) GetMessage() string

func (*Result) GetSucceed

func (m *Result) GetSucceed() bool

func (*Result) ProtoMessage

func (*Result) ProtoMessage()

func (*Result) Reset

func (m *Result) Reset()

func (*Result) String

func (m *Result) String() string

type SnapshotRequest

type SnapshotRequest struct {
	Level            *SnapshotRequest_Level `protobuf:"varint,1,opt,name=level,enum=collect.SnapshotRequest_Level,def=0" json:"level,omitempty"`
	XXX_unrecognized []byte                 `json:"-"`
}

func (*SnapshotRequest) GetLevel

func (m *SnapshotRequest) GetLevel() SnapshotRequest_Level

func (*SnapshotRequest) ProtoMessage

func (*SnapshotRequest) ProtoMessage()

func (*SnapshotRequest) Reset

func (m *SnapshotRequest) Reset()

func (*SnapshotRequest) String

func (m *SnapshotRequest) String() string

type SnapshotRequest_Level

type SnapshotRequest_Level int32
const (
	SnapshotRequest_kSystemInfoOnly            SnapshotRequest_Level = 0
	SnapshotRequest_kSystemInfoAndProcesses    SnapshotRequest_Level = 1
	SnapshotRequest_kSystemInfoAndThreads      SnapshotRequest_Level = 2
	SnapshotRequest_kSystemInfoInitialSnapshot SnapshotRequest_Level = 3
)
const Default_SnapshotRequest_Level SnapshotRequest_Level = SnapshotRequest_kSystemInfoOnly

func (SnapshotRequest_Level) Enum

func (SnapshotRequest_Level) String

func (x SnapshotRequest_Level) String() string

func (*SnapshotRequest_Level) UnmarshalJSON

func (x *SnapshotRequest_Level) UnmarshalJSON(data []byte) error

type SystemInfo

type SystemInfo struct {
	Basic            *SystemInfo_Basic       `protobuf:"bytes,1,opt,name=basic" json:"basic,omitempty"`
	Performance      *SystemInfo_Performance `protobuf:"bytes,2,opt,name=performance" json:"performance,omitempty"`
	AllCpu           *SystemInfo_Cpu         `protobuf:"bytes,3,opt,name=all_cpu" json:"all_cpu,omitempty"`
	Cpus             []*SystemInfo_Cpu       `protobuf:"bytes,4,rep,name=cpus" json:"cpus,omitempty"`
	MuduoTimestamp   *uint64                 `protobuf:"fixed64,5,opt,name=muduo_timestamp" json:"muduo_timestamp,omitempty"`
	Memory           *SystemInfo_Memory      `protobuf:"bytes,8,opt,name=memory" json:"memory,omitempty"`
	Processes        []*ProcessInfo          `protobuf:"bytes,14,rep,name=processes" json:"processes,omitempty"`
	UserCpuMs        *int64                  `protobuf:"varint,6,opt,name=user_cpu_ms" json:"user_cpu_ms,omitempty"`
	SysCpuMs         *int64                  `protobuf:"varint,7,opt,name=sys_cpu_ms" json:"sys_cpu_ms,omitempty"`
	XXX_unrecognized []byte                  `json:"-"`
}

func (*SystemInfo) GetAllCpu

func (m *SystemInfo) GetAllCpu() *SystemInfo_Cpu

func (*SystemInfo) GetBasic

func (m *SystemInfo) GetBasic() *SystemInfo_Basic

func (*SystemInfo) GetCpus

func (m *SystemInfo) GetCpus() []*SystemInfo_Cpu

func (*SystemInfo) GetMemory

func (m *SystemInfo) GetMemory() *SystemInfo_Memory

func (*SystemInfo) GetMuduoTimestamp

func (m *SystemInfo) GetMuduoTimestamp() uint64

func (*SystemInfo) GetPerformance

func (m *SystemInfo) GetPerformance() *SystemInfo_Performance

func (*SystemInfo) GetProcesses

func (m *SystemInfo) GetProcesses() []*ProcessInfo

func (*SystemInfo) GetSysCpuMs

func (m *SystemInfo) GetSysCpuMs() int64

func (*SystemInfo) GetUserCpuMs

func (m *SystemInfo) GetUserCpuMs() int64

func (*SystemInfo) ProtoMessage

func (*SystemInfo) ProtoMessage()

func (*SystemInfo) Reset

func (m *SystemInfo) Reset()

func (*SystemInfo) String

func (m *SystemInfo) String() string

type SystemInfo_Basic

type SystemInfo_Basic struct {
	KernelVersion    *string `protobuf:"bytes,1,opt,name=kernel_version" json:"kernel_version,omitempty"`
	KernelCmdline    *string `protobuf:"bytes,2,opt,name=kernel_cmdline" json:"kernel_cmdline,omitempty"`
	Cpuinfo          *string `protobuf:"bytes,3,opt,name=cpuinfo" json:"cpuinfo,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

func (*SystemInfo_Basic) GetCpuinfo

func (m *SystemInfo_Basic) GetCpuinfo() string

func (*SystemInfo_Basic) GetKernelCmdline

func (m *SystemInfo_Basic) GetKernelCmdline() string

func (*SystemInfo_Basic) GetKernelVersion

func (m *SystemInfo_Basic) GetKernelVersion() string

func (*SystemInfo_Basic) ProtoMessage

func (*SystemInfo_Basic) ProtoMessage()

func (*SystemInfo_Basic) Reset

func (m *SystemInfo_Basic) Reset()

func (*SystemInfo_Basic) String

func (m *SystemInfo_Basic) String() string

type SystemInfo_Cpu

type SystemInfo_Cpu struct {
	UserMs           *int64 `protobuf:"varint,1,opt,name=user_ms" json:"user_ms,omitempty"`
	NiceMs           *int64 `protobuf:"varint,2,opt,name=nice_ms" json:"nice_ms,omitempty"`
	SysMs            *int64 `protobuf:"varint,3,opt,name=sys_ms" json:"sys_ms,omitempty"`
	IdleMs           *int64 `protobuf:"varint,4,opt,name=idle_ms" json:"idle_ms,omitempty"`
	IowaitMs         *int64 `protobuf:"varint,5,opt,name=iowait_ms" json:"iowait_ms,omitempty"`
	IrqMs            *int64 `protobuf:"varint,6,opt,name=irq_ms" json:"irq_ms,omitempty"`
	SoftirqMs        *int64 `protobuf:"varint,7,opt,name=softirq_ms" json:"softirq_ms,omitempty"`
	XXX_unrecognized []byte `json:"-"`
}

func (*SystemInfo_Cpu) GetIdleMs

func (m *SystemInfo_Cpu) GetIdleMs() int64

func (*SystemInfo_Cpu) GetIowaitMs

func (m *SystemInfo_Cpu) GetIowaitMs() int64

func (*SystemInfo_Cpu) GetIrqMs

func (m *SystemInfo_Cpu) GetIrqMs() int64

func (*SystemInfo_Cpu) GetNiceMs

func (m *SystemInfo_Cpu) GetNiceMs() int64

func (*SystemInfo_Cpu) GetSoftirqMs

func (m *SystemInfo_Cpu) GetSoftirqMs() int64

func (*SystemInfo_Cpu) GetSysMs

func (m *SystemInfo_Cpu) GetSysMs() int64

func (*SystemInfo_Cpu) GetUserMs

func (m *SystemInfo_Cpu) GetUserMs() int64

func (*SystemInfo_Cpu) ProtoMessage

func (*SystemInfo_Cpu) ProtoMessage()

func (*SystemInfo_Cpu) Reset

func (m *SystemInfo_Cpu) Reset()

func (*SystemInfo_Cpu) String

func (m *SystemInfo_Cpu) String() string

type SystemInfo_Memory

type SystemInfo_Memory struct {
	TotalKb          *int64 `protobuf:"varint,1,opt,name=total_kb" json:"total_kb,omitempty"`
	FreeKb           *int64 `protobuf:"varint,2,opt,name=free_kb" json:"free_kb,omitempty"`
	BuffersKb        *int64 `protobuf:"varint,3,opt,name=buffers_kb" json:"buffers_kb,omitempty"`
	CachedKb         *int64 `protobuf:"varint,4,opt,name=cached_kb" json:"cached_kb,omitempty"`
	SwapTotalKb      *int64 `protobuf:"varint,5,opt,name=swap_total_kb" json:"swap_total_kb,omitempty"`
	SwapFreeKb       *int64 `protobuf:"varint,6,opt,name=swap_free_kb" json:"swap_free_kb,omitempty"`
	SwapCachedKb     *int64 `protobuf:"varint,7,opt,name=swap_cached_kb" json:"swap_cached_kb,omitempty"`
	XXX_unrecognized []byte `json:"-"`
}

func (*SystemInfo_Memory) GetBuffersKb

func (m *SystemInfo_Memory) GetBuffersKb() int64

func (*SystemInfo_Memory) GetCachedKb

func (m *SystemInfo_Memory) GetCachedKb() int64

func (*SystemInfo_Memory) GetFreeKb

func (m *SystemInfo_Memory) GetFreeKb() int64

func (*SystemInfo_Memory) GetSwapCachedKb

func (m *SystemInfo_Memory) GetSwapCachedKb() int64

func (*SystemInfo_Memory) GetSwapFreeKb

func (m *SystemInfo_Memory) GetSwapFreeKb() int64

func (*SystemInfo_Memory) GetSwapTotalKb

func (m *SystemInfo_Memory) GetSwapTotalKb() int64

func (*SystemInfo_Memory) GetTotalKb

func (m *SystemInfo_Memory) GetTotalKb() int64

func (*SystemInfo_Memory) ProtoMessage

func (*SystemInfo_Memory) ProtoMessage()

func (*SystemInfo_Memory) Reset

func (m *SystemInfo_Memory) Reset()

func (*SystemInfo_Memory) String

func (m *SystemInfo_Memory) String() string

type SystemInfo_Performance

type SystemInfo_Performance struct {
	Loadavg_1MMilli  *int32 `protobuf:"varint,2,opt,name=loadavg_1m_milli" json:"loadavg_1m_milli,omitempty"`
	Loadavg_5MMilli  *int32 `protobuf:"varint,3,opt,name=loadavg_5m_milli" json:"loadavg_5m_milli,omitempty"`
	Loadavg_15MMilli *int32 `protobuf:"varint,4,opt,name=loadavg_15m_milli" json:"loadavg_15m_milli,omitempty"`
	RunningTasks     *int32 `protobuf:"varint,5,opt,name=running_tasks" json:"running_tasks,omitempty"`
	TotalTasks       *int32 `protobuf:"varint,6,opt,name=total_tasks" json:"total_tasks,omitempty"`
	LastPid          *int32 `protobuf:"varint,7,opt,name=last_pid" json:"last_pid,omitempty"`
	BootTime         *int64 `protobuf:"varint,9,opt,name=boot_time" json:"boot_time,omitempty"`
	ContextSwitches  *int64 `protobuf:"varint,10,opt,name=context_switches" json:"context_switches,omitempty"`
	ProcessesCreated *int64 `protobuf:"varint,11,opt,name=processes_created" json:"processes_created,omitempty"`
	ProcessesRunning *int32 `protobuf:"varint,12,opt,name=processes_running" json:"processes_running,omitempty"`
	ProcessesBlocked *int32 `protobuf:"varint,13,opt,name=processes_blocked" json:"processes_blocked,omitempty"`
	XXX_unrecognized []byte `json:"-"`
}

func (*SystemInfo_Performance) GetBootTime

func (m *SystemInfo_Performance) GetBootTime() int64

func (*SystemInfo_Performance) GetContextSwitches

func (m *SystemInfo_Performance) GetContextSwitches() int64

func (*SystemInfo_Performance) GetLastPid

func (m *SystemInfo_Performance) GetLastPid() int32

func (*SystemInfo_Performance) GetLoadavg_15MMilli

func (m *SystemInfo_Performance) GetLoadavg_15MMilli() int32

func (*SystemInfo_Performance) GetLoadavg_1MMilli

func (m *SystemInfo_Performance) GetLoadavg_1MMilli() int32

func (*SystemInfo_Performance) GetLoadavg_5MMilli

func (m *SystemInfo_Performance) GetLoadavg_5MMilli() int32

func (*SystemInfo_Performance) GetProcessesBlocked

func (m *SystemInfo_Performance) GetProcessesBlocked() int32

func (*SystemInfo_Performance) GetProcessesCreated

func (m *SystemInfo_Performance) GetProcessesCreated() int64

func (*SystemInfo_Performance) GetProcessesRunning

func (m *SystemInfo_Performance) GetProcessesRunning() int32

func (*SystemInfo_Performance) GetRunningTasks

func (m *SystemInfo_Performance) GetRunningTasks() int32

func (*SystemInfo_Performance) GetTotalTasks

func (m *SystemInfo_Performance) GetTotalTasks() int32

func (*SystemInfo_Performance) ProtoMessage

func (*SystemInfo_Performance) ProtoMessage()

func (*SystemInfo_Performance) Reset

func (m *SystemInfo_Performance) Reset()

func (*SystemInfo_Performance) String

func (m *SystemInfo_Performance) String() string

type ThreadInfo

type ThreadInfo struct {
	Tid              *int32  `protobuf:"varint,1,opt,name=tid" json:"tid,omitempty"`
	UserCpuMs        *int64  `protobuf:"varint,3,opt,name=user_cpu_ms" json:"user_cpu_ms,omitempty"`
	SysCpuMs         *int64  `protobuf:"varint,4,opt,name=sys_cpu_ms" json:"sys_cpu_ms,omitempty"`
	LastProcessor    *int32  `protobuf:"varint,5,opt,name=last_processor" json:"last_processor,omitempty"`
	WaitChannel      *int64  `protobuf:"varint,6,opt,name=wait_channel" json:"wait_channel,omitempty"`
	Name             *string `protobuf:"bytes,7,opt,name=name" json:"name,omitempty"`
	Starttime        *int64  `protobuf:"varint,8,opt,name=starttime" json:"starttime,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

func (*ThreadInfo) GetLastProcessor

func (m *ThreadInfo) GetLastProcessor() int32

func (*ThreadInfo) GetName

func (m *ThreadInfo) GetName() string

func (*ThreadInfo) GetStarttime

func (m *ThreadInfo) GetStarttime() int64

func (*ThreadInfo) GetSysCpuMs

func (m *ThreadInfo) GetSysCpuMs() int64

func (*ThreadInfo) GetTid

func (m *ThreadInfo) GetTid() int32

func (*ThreadInfo) GetUserCpuMs

func (m *ThreadInfo) GetUserCpuMs() int64

func (*ThreadInfo) GetWaitChannel

func (m *ThreadInfo) GetWaitChannel() int64

func (*ThreadInfo) ProtoMessage

func (*ThreadInfo) ProtoMessage()

func (*ThreadInfo) Reset

func (m *ThreadInfo) Reset()

func (*ThreadInfo) String

func (m *ThreadInfo) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL