parent
6120c65a5a
commit
74667cd681
|
@ -32,7 +32,7 @@ type Procstat struct {
|
||||||
SystemdUnit string
|
SystemdUnit string
|
||||||
CGroup string `toml:"cgroup"`
|
CGroup string `toml:"cgroup"`
|
||||||
PidTag bool
|
PidTag bool
|
||||||
WinService string `tom:"win_service"`
|
WinService string `toml:"win_service"`
|
||||||
|
|
||||||
finder PIDFinder
|
finder PIDFinder
|
||||||
|
|
||||||
|
@ -281,7 +281,6 @@ func (p *Procstat) updateProcesses(acc telegraf.Accumulator, prevInfo map[PID]Pr
|
||||||
|
|
||||||
// Create and return PIDGatherer lazily
|
// Create and return PIDGatherer lazily
|
||||||
func (p *Procstat) getPIDFinder() (PIDFinder, error) {
|
func (p *Procstat) getPIDFinder() (PIDFinder, error) {
|
||||||
|
|
||||||
if p.finder == nil {
|
if p.finder == nil {
|
||||||
f, err := p.createPIDFinder()
|
f, err := p.createPIDFinder()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -25,7 +25,6 @@ func getService(name string) (*mgr.Service, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func queryPidWithWinServiceName(winServiceName string) (uint32, error) {
|
func queryPidWithWinServiceName(winServiceName string) (uint32, error) {
|
||||||
|
|
||||||
srv, err := getService(winServiceName)
|
srv, err := getService(winServiceName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return 0, err
|
return 0, err
|
||||||
|
|
Loading…
Reference in New Issue