Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use lsof for net_connections on FreeBSD #1551

Merged

Conversation

wolf31o2
Copy link
Contributor

@wolf31o2 wolf31o2 commented Nov 9, 2023

Use net.ConnectionsPidWithContext on FreeBSD, similarly to how it is done on Darwin. This uses common.CallLsofWithContext underneath the hood, which will use lsof under the hood, if available.

Tested on FreeBSD 13.2-RELEASE

Use net.ConnectionsPidWithContext on FreeBSD, similarly to how it is done
on Darwin. This uses common.CallLsofWithContext underneath the hood, which
will use lsof under the hood, if available.

Tested on FreeBSD 13.2-RELEASE

Signed-off-by: Chris Gianelloni <wolf31o2@blinklabs.io>
Copy link
Owner

@shirou shirou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much! I have confirmed this awesome PR works on my FreeBSD-12.4.

@shirou shirou merged commit fad5e68 into shirou:master Nov 12, 2023
19 checks passed
@wolf31o2 wolf31o2 deleted the feat/use-lsof-freebsd-connections branch November 19, 2023 00:03
mx-psi referenced this pull request in open-telemetry/opentelemetry-collector-contrib Dec 5, 2023
…29647)

[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [github.com/shirou/gopsutil/v3](https://togithub.com/shirou/gopsutil)
| require | patch | `v3.23.10` -> `v3.23.11` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>shirou/gopsutil (github.com/shirou/gopsutil/v3)</summary>

###
[`v3.23.11`](https://togithub.com/shirou/gopsutil/releases/tag/v3.23.11)

[Compare
Source](https://togithub.com/shirou/gopsutil/compare/v3.23.10...v3.23.11)

<!-- Release notes generated using configuration in .github/release.yml
at v3.23.11 -->

#### What's Changed

##### process

- feat: use lsof for net_connections on FreeBSD by
[@&#8203;wolf31o2](https://togithub.com/wolf31o2) in
[https://github.com/shirou/gopsutil/pull/1551](https://togithub.com/shirou/gopsutil/pull/1551)

#### New Contributors

- [@&#8203;wolf31o2](https://togithub.com/wolf31o2) made their first
contribution in
[https://github.com/shirou/gopsutil/pull/1551](https://togithub.com/shirou/gopsutil/pull/1551)

**Full Changelog**:
shirou/gopsutil@v3.23.10...v3.23.11

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any
time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector-contrib).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy44MS4zIiwidXBkYXRlZEluVmVyIjoiMzcuODEuMyIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com>
codeboten referenced this pull request in open-telemetry/opentelemetry-collector Dec 5, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[github.com/klauspost/compress](https://togithub.com/klauspost/compress)
| require | patch | `v1.17.3` -> `v1.17.4` |
| [github.com/mikefarah/yq/v4](https://togithub.com/mikefarah/yq) |
require | patch | `v4.40.3` -> `v4.40.4` |
| [github.com/shirou/gopsutil/v3](https://togithub.com/shirou/gopsutil)
| require | patch | `v3.23.10` -> `v3.23.11` |
|
[go.opentelemetry.io/collector](https://togithub.com/open-telemetry/opentelemetry-collector)
| require | patch | `v0.90.0` -> `v0.90.1` |
|
[go.opentelemetry.io/collector/component](https://togithub.com/open-telemetry/opentelemetry-collector)
| require | patch | `v0.90.0` -> `v0.90.1` |
|
[go.opentelemetry.io/collector/config/configauth](https://togithub.com/open-telemetry/opentelemetry-collector)
| require | patch | `v0.90.0` -> `v0.90.1` |
|
[go.opentelemetry.io/collector/config/configcompression](https://togithub.com/open-telemetry/opentelemetry-collector)
| require | patch | `v0.90.0` -> `v0.90.1` |
|
[go.opentelemetry.io/collector/config/configgrpc](https://togithub.com/open-telemetry/opentelemetry-collector)
| require | patch | `v0.90.0` -> `v0.90.1` |
|
[go.opentelemetry.io/collector/config/confighttp](https://togithub.com/open-telemetry/opentelemetry-collector)
| require | patch | `v0.90.0` -> `v0.90.1` |
|
[go.opentelemetry.io/collector/config/confignet](https://togithub.com/open-telemetry/opentelemetry-collector)
| require | patch | `v0.90.0` -> `v0.90.1` |
|
[go.opentelemetry.io/collector/config/configopaque](https://togithub.com/open-telemetry/opentelemetry-collector)
| require | patch | `v0.90.0` -> `v0.90.1` |
|
[go.opentelemetry.io/collector/config/configtelemetry](https://togithub.com/open-telemetry/opentelemetry-collector)
| require | patch | `v0.90.0` -> `v0.90.1` |
|
[go.opentelemetry.io/collector/config/configtls](https://togithub.com/open-telemetry/opentelemetry-collector)
| require | patch | `v0.90.0` -> `v0.90.1` |
|
[go.opentelemetry.io/collector/config/internal](https://togithub.com/open-telemetry/opentelemetry-collector)
| require | patch | `v0.90.0` -> `v0.90.1` |
|
[go.opentelemetry.io/collector/confmap](https://togithub.com/open-telemetry/opentelemetry-collector)
| require | patch | `v0.90.0` -> `v0.90.1` |
|
[go.opentelemetry.io/collector/connector](https://togithub.com/open-telemetry/opentelemetry-collector)
| require | patch | `v0.90.0` -> `v0.90.1` |
|
[go.opentelemetry.io/collector/consumer](https://togithub.com/open-telemetry/opentelemetry-collector)
| require | patch | `v0.90.0` -> `v0.90.1` |
|
[go.opentelemetry.io/collector/exporter](https://togithub.com/open-telemetry/opentelemetry-collector)
| require | patch | `v0.90.0` -> `v0.90.1` |
|
[go.opentelemetry.io/collector/extension](https://togithub.com/open-telemetry/opentelemetry-collector)
| require | patch | `v0.90.0` -> `v0.90.1` |
|
[go.opentelemetry.io/collector/extension/auth](https://togithub.com/open-telemetry/opentelemetry-collector)
| require | patch | `v0.90.0` -> `v0.90.1` |
|
[go.opentelemetry.io/collector/extension/zpagesextension](https://togithub.com/open-telemetry/opentelemetry-collector)
| require | patch | `v0.90.0` -> `v0.90.1` |
|
[go.opentelemetry.io/collector/processor](https://togithub.com/open-telemetry/opentelemetry-collector)
| require | patch | `v0.90.0` -> `v0.90.1` |
|
[go.opentelemetry.io/collector/receiver](https://togithub.com/open-telemetry/opentelemetry-collector)
| require | patch | `v0.90.0` -> `v0.90.1` |
|
[go.opentelemetry.io/collector/receiver/otlpreceiver](https://togithub.com/open-telemetry/opentelemetry-collector)
| require | patch | `v0.90.0` -> `v0.90.1` |
|
[go.opentelemetry.io/collector/semconv](https://togithub.com/open-telemetry/opentelemetry-collector)
| require | patch | `v0.90.0` -> `v0.90.1` |
|
[go.opentelemetry.io/collector/service](https://togithub.com/open-telemetry/opentelemetry-collector)
| require | patch | `v0.90.0` -> `v0.90.1` |

---

### Release Notes

<details>
<summary>klauspost/compress (github.com/klauspost/compress)</summary>

###
[`v1.17.4`](https://togithub.com/klauspost/compress/releases/tag/v1.17.4)

[Compare
Source](https://togithub.com/klauspost/compress/compare/v1.17.3...v1.17.4)

#### What's Changed

- huff0: Speed up symbol counting by
[@&#8203;greatroar](https://togithub.com/greatroar) in
[https://github.com/klauspost/compress/pull/887](https://togithub.com/klauspost/compress/pull/887)
- huff0: Remove byteReader by
[@&#8203;greatroar](https://togithub.com/greatroar) in
[https://github.com/klauspost/compress/pull/886](https://togithub.com/klauspost/compress/pull/886)
- gzhttp: Allow overriding decompression on transport by
[@&#8203;klauspost](https://togithub.com/klauspost) in
[https://github.com/klauspost/compress/pull/892](https://togithub.com/klauspost/compress/pull/892)
- gzhttp: Clamp compression level by
[@&#8203;klauspost](https://togithub.com/klauspost) in
[https://github.com/klauspost/compress/pull/890](https://togithub.com/klauspost/compress/pull/890)
- gzip: Error out if reserved bits are set by
[@&#8203;klauspost](https://togithub.com/klauspost) in
[https://github.com/klauspost/compress/pull/891](https://togithub.com/klauspost/compress/pull/891)

#### New Contributors

- [@&#8203;teikjun](https://togithub.com/teikjun) made their first
contribution in
[https://github.com/klauspost/compress/pull/889](https://togithub.com/klauspost/compress/pull/889)

**Full Changelog**:
klauspost/compress@v1.17.3...v1.17.4

</details>

<details>
<summary>mikefarah/yq (github.com/mikefarah/yq/v4)</summary>

###
[`v4.40.4`](https://togithub.com/mikefarah/yq/compare/v4.40.3...v4.40.4)

[Compare
Source](https://togithub.com/mikefarah/yq/compare/v4.40.3...v4.40.4)

</details>

<details>
<summary>shirou/gopsutil (github.com/shirou/gopsutil/v3)</summary>

###
[`v3.23.11`](https://togithub.com/shirou/gopsutil/releases/tag/v3.23.11)

[Compare
Source](https://togithub.com/shirou/gopsutil/compare/v3.23.10...v3.23.11)

<!-- Release notes generated using configuration in .github/release.yml
at v3.23.11 -->

#### What's Changed

##### process

- feat: use lsof for net_connections on FreeBSD by
[@&#8203;wolf31o2](https://togithub.com/wolf31o2) in
[https://github.com/shirou/gopsutil/pull/1551](https://togithub.com/shirou/gopsutil/pull/1551)

#### New Contributors

- [@&#8203;wolf31o2](https://togithub.com/wolf31o2) made their first
contribution in
[https://github.com/shirou/gopsutil/pull/1551](https://togithub.com/shirou/gopsutil/pull/1551)

**Full Changelog**:
shirou/gopsutil@v3.23.10...v3.23.11

</details>

<details>
<summary>open-telemetry/opentelemetry-collector
(go.opentelemetry.io/collector)</summary>

###
[`v0.90.1`](https://togithub.com/open-telemetry/opentelemetry-collector/blob/HEAD/CHANGELOG.md#v0901)

[Compare
Source](https://togithub.com/open-telemetry/opentelemetry-collector/compare/v0.90.0...v0.90.1)

##### 🧰 Bug fixes 🧰

- `exporterhelper`: Remove noisy log
([#&#8203;9017](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9017))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any
time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy44MS4zIiwidXBkYXRlZEluVmVyIjoiMzcuODEuMyIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com>
pantuza referenced this pull request in pantuza/opentelemetry-collector Dec 8, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[github.com/klauspost/compress](https://togithub.com/klauspost/compress)
| require | patch | `v1.17.3` -> `v1.17.4` |
| [github.com/mikefarah/yq/v4](https://togithub.com/mikefarah/yq) |
require | patch | `v4.40.3` -> `v4.40.4` |
| [github.com/shirou/gopsutil/v3](https://togithub.com/shirou/gopsutil)
| require | patch | `v3.23.10` -> `v3.23.11` |
|
[go.opentelemetry.io/collector](https://togithub.com/open-telemetry/opentelemetry-collector)
| require | patch | `v0.90.0` -> `v0.90.1` |
|
[go.opentelemetry.io/collector/component](https://togithub.com/open-telemetry/opentelemetry-collector)
| require | patch | `v0.90.0` -> `v0.90.1` |
|
[go.opentelemetry.io/collector/config/configauth](https://togithub.com/open-telemetry/opentelemetry-collector)
| require | patch | `v0.90.0` -> `v0.90.1` |
|
[go.opentelemetry.io/collector/config/configcompression](https://togithub.com/open-telemetry/opentelemetry-collector)
| require | patch | `v0.90.0` -> `v0.90.1` |
|
[go.opentelemetry.io/collector/config/configgrpc](https://togithub.com/open-telemetry/opentelemetry-collector)
| require | patch | `v0.90.0` -> `v0.90.1` |
|
[go.opentelemetry.io/collector/config/confighttp](https://togithub.com/open-telemetry/opentelemetry-collector)
| require | patch | `v0.90.0` -> `v0.90.1` |
|
[go.opentelemetry.io/collector/config/confignet](https://togithub.com/open-telemetry/opentelemetry-collector)
| require | patch | `v0.90.0` -> `v0.90.1` |
|
[go.opentelemetry.io/collector/config/configopaque](https://togithub.com/open-telemetry/opentelemetry-collector)
| require | patch | `v0.90.0` -> `v0.90.1` |
|
[go.opentelemetry.io/collector/config/configtelemetry](https://togithub.com/open-telemetry/opentelemetry-collector)
| require | patch | `v0.90.0` -> `v0.90.1` |
|
[go.opentelemetry.io/collector/config/configtls](https://togithub.com/open-telemetry/opentelemetry-collector)
| require | patch | `v0.90.0` -> `v0.90.1` |
|
[go.opentelemetry.io/collector/config/internal](https://togithub.com/open-telemetry/opentelemetry-collector)
| require | patch | `v0.90.0` -> `v0.90.1` |
|
[go.opentelemetry.io/collector/confmap](https://togithub.com/open-telemetry/opentelemetry-collector)
| require | patch | `v0.90.0` -> `v0.90.1` |
|
[go.opentelemetry.io/collector/connector](https://togithub.com/open-telemetry/opentelemetry-collector)
| require | patch | `v0.90.0` -> `v0.90.1` |
|
[go.opentelemetry.io/collector/consumer](https://togithub.com/open-telemetry/opentelemetry-collector)
| require | patch | `v0.90.0` -> `v0.90.1` |
|
[go.opentelemetry.io/collector/exporter](https://togithub.com/open-telemetry/opentelemetry-collector)
| require | patch | `v0.90.0` -> `v0.90.1` |
|
[go.opentelemetry.io/collector/extension](https://togithub.com/open-telemetry/opentelemetry-collector)
| require | patch | `v0.90.0` -> `v0.90.1` |
|
[go.opentelemetry.io/collector/extension/auth](https://togithub.com/open-telemetry/opentelemetry-collector)
| require | patch | `v0.90.0` -> `v0.90.1` |
|
[go.opentelemetry.io/collector/extension/zpagesextension](https://togithub.com/open-telemetry/opentelemetry-collector)
| require | patch | `v0.90.0` -> `v0.90.1` |
|
[go.opentelemetry.io/collector/processor](https://togithub.com/open-telemetry/opentelemetry-collector)
| require | patch | `v0.90.0` -> `v0.90.1` |
|
[go.opentelemetry.io/collector/receiver](https://togithub.com/open-telemetry/opentelemetry-collector)
| require | patch | `v0.90.0` -> `v0.90.1` |
|
[go.opentelemetry.io/collector/receiver/otlpreceiver](https://togithub.com/open-telemetry/opentelemetry-collector)
| require | patch | `v0.90.0` -> `v0.90.1` |
|
[go.opentelemetry.io/collector/semconv](https://togithub.com/open-telemetry/opentelemetry-collector)
| require | patch | `v0.90.0` -> `v0.90.1` |
|
[go.opentelemetry.io/collector/service](https://togithub.com/open-telemetry/opentelemetry-collector)
| require | patch | `v0.90.0` -> `v0.90.1` |

---

<details>
<summary>klauspost/compress (github.com/klauspost/compress)</summary>

[`v1.17.4`](https://togithub.com/klauspost/compress/releases/tag/v1.17.4)

[Compare
Source](https://togithub.com/klauspost/compress/compare/v1.17.3...v1.17.4)

- huff0: Speed up symbol counting by
[@&open-telemetry#8203;greatroar](https://togithub.com/greatroar) in
[https://github.com/klauspost/compress/pull/887](https://togithub.com/klauspost/compress/pull/887)
- huff0: Remove byteReader by
[@&open-telemetry#8203;greatroar](https://togithub.com/greatroar) in
[https://github.com/klauspost/compress/pull/886](https://togithub.com/klauspost/compress/pull/886)
- gzhttp: Allow overriding decompression on transport by
[@&open-telemetry#8203;klauspost](https://togithub.com/klauspost) in
[https://github.com/klauspost/compress/pull/892](https://togithub.com/klauspost/compress/pull/892)
- gzhttp: Clamp compression level by
[@&open-telemetry#8203;klauspost](https://togithub.com/klauspost) in
[https://github.com/klauspost/compress/pull/890](https://togithub.com/klauspost/compress/pull/890)
- gzip: Error out if reserved bits are set by
[@&open-telemetry#8203;klauspost](https://togithub.com/klauspost) in
[https://github.com/klauspost/compress/pull/891](https://togithub.com/klauspost/compress/pull/891)

- [@&open-telemetry#8203;teikjun](https://togithub.com/teikjun) made their first
contribution in
[https://github.com/klauspost/compress/pull/889](https://togithub.com/klauspost/compress/pull/889)

**Full Changelog**:
klauspost/compress@v1.17.3...v1.17.4

</details>

<details>
<summary>mikefarah/yq (github.com/mikefarah/yq/v4)</summary>

[`v4.40.4`](https://togithub.com/mikefarah/yq/compare/v4.40.3...v4.40.4)

[Compare
Source](https://togithub.com/mikefarah/yq/compare/v4.40.3...v4.40.4)

</details>

<details>
<summary>shirou/gopsutil (github.com/shirou/gopsutil/v3)</summary>

[`v3.23.11`](https://togithub.com/shirou/gopsutil/releases/tag/v3.23.11)

[Compare
Source](https://togithub.com/shirou/gopsutil/compare/v3.23.10...v3.23.11)

<!-- Release notes generated using configuration in .github/release.yml
at v3.23.11 -->

- feat: use lsof for net_connections on FreeBSD by
[@&open-telemetry#8203;wolf31o2](https://togithub.com/wolf31o2) in
[https://github.com/shirou/gopsutil/pull/1551](https://togithub.com/shirou/gopsutil/pull/1551)

- [@&open-telemetry#8203;wolf31o2](https://togithub.com/wolf31o2) made their first
contribution in
[https://github.com/shirou/gopsutil/pull/1551](https://togithub.com/shirou/gopsutil/pull/1551)

**Full Changelog**:
shirou/gopsutil@v3.23.10...v3.23.11

</details>

<details>
<summary>open-telemetry/opentelemetry-collector
(go.opentelemetry.io/collector)</summary>

[`v0.90.1`](https://togithub.com/open-telemetry/opentelemetry-collector/blob/HEAD/CHANGELOG.md#v0901)

[Compare
Source](https://togithub.com/open-telemetry/opentelemetry-collector/compare/v0.90.0...v0.90.1)

- `exporterhelper`: Remove noisy log
([#&open-telemetry#8203;9017](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9017))

</details>

---

📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any
time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy44MS4zIiwidXBkYXRlZEluVmVyIjoiMzcuODEuMyIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants