Skip to content

Commit fad5e68

Browse files
authored
Merge pull request #1551 from blinklabs-io/feat/use-lsof-freebsd-connections
feat: use lsof for net_connections on FreeBSD
2 parents e74324b + a8418df commit fad5e68

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ Some code is ported from Ohai. Many thanks.
190190
|users |x |x |x |x |x | | |
191191
|pids |x |x |x |x |x | | |
192192
|pid\_exists |x |x |x |x |x | | |
193-
|net\_connections |x | |x |x | | | |
193+
|net\_connections |x |x |x |x | | | |
194194
|net\_protocols |x | | | | | | |
195195
|net\_if\_addrs | | | | | | | |
196196
|net\_if\_stats | | | | | | | |

process/process_freebsd.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -286,11 +286,11 @@ func (p *Process) ChildrenWithContext(ctx context.Context) ([]*Process, error) {
286286
}
287287

288288
func (p *Process) ConnectionsWithContext(ctx context.Context) ([]net.ConnectionStat, error) {
289-
return nil, common.ErrNotImplementedError
289+
return net.ConnectionsPidWithContext(ctx, "all", p.Pid)
290290
}
291291

292292
func (p *Process) ConnectionsMaxWithContext(ctx context.Context, max int) ([]net.ConnectionStat, error) {
293-
return nil, common.ErrNotImplementedError
293+
return net.ConnectionsPidMaxWithContext(ctx, "all", p.Pid, max)
294294
}
295295

296296
func ProcessesWithContext(ctx context.Context) ([]*Process, error) {

0 commit comments

Comments
 (0)