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

arch linux host version "rolling" -> rolling #1502

Closed
1 of 5 tasks
jxsl13 opened this issue Aug 11, 2023 · 2 comments · Fixed by #1504
Closed
1 of 5 tasks

arch linux host version "rolling" -> rolling #1502

jxsl13 opened this issue Aug 11, 2023 · 2 comments · Fixed by #1504

Comments

@jxsl13
Copy link

jxsl13 commented Aug 11, 2023

Describe the bug

The string contains quotes.
Would be great if it did not contain those.

Arch Linux

{
 "hostname": "arch",
 "uptime": 29735,
 "bootTime": 1691724924,
 "procs": 228,
 "os": "linux",
 "platform": "arch",
 "platformFamily": "arch",
 "platformVersion": "\"rolling\"",
 "kernelVersion": "6.4.8-arch1-1",
 "kernelArch": "x86_64",
 "virtualizationSystem": "",
 "virtualizationRole": "",
 "hostId": "0aff3c62-383e-11ee-b15e-67cecb7ee508"
}

To Reproduce

package main

import (
	"encoding/json"
	"fmt"
	"log"

	"github.com/shirou/gopsutil/v3/host"
)

func main() {
	info, err := host.Info()
	if err != nil {
		log.Fatalln(err)
	}

	data, _ := json.MarshalIndent(info, "", " ")
	fmt.Println(string(data))

}

Expected behavior
[A clear and concise description of what you expected to happen.]

Environment (please complete the following information):

  • Windows: [paste the result of ver]
  • Linux: [paste contents of /etc/os-release and the result of uname -a]
  • Mac OS: [paste the result of sw_vers and uname -a
  • FreeBSD: [paste the result of freebsd-version -k -r -u and uname -a]
  • OpenBSD: [paste the result of uname -a]
$ cat /etc/os-release
NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://bugs.archlinux.org/"
PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/"
LOGO=archlinux-logo
$ uname -a
Linux arch 6.4.8-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 03 Aug 2023 16:02:01 +0000 x86_64 GNU/Linux

Additional context
[Cross-compiling? Paste the command you are using to cross-compile and the result of the corresponding go env]

@shirou
Copy link
Owner

shirou commented Aug 11, 2023

Could you show us the /etc/lsb-release file contents and the output of /usr/bin/lsb_release command?

@jxsl13
Copy link
Author

jxsl13 commented Aug 11, 2023

$ cat /etc/lsb-release
DISTRIB_ID="Arch"
DISTRIB_RELEASE="rolling"
DISTRIB_DESCRIPTION="Arch Linux"
$ /usr/bin/lsb_release
LSB Version:    n/a

Edit:
I parsed these files in my small project using godotenv
https://github.com/joho/godotenv

https://github.com/jxsl13/osfacts/tree/master/distro

chenjiandongx added a commit to TencentBlueKing/gopsutil that referenced this issue Aug 29, 2023
* fix some comments

Signed-off-by: cui fliter <imcusg@gmail.com>

* chore(deps): bump github.com/stretchr/testify from 1.8.2 to 1.8.3

Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.2 to 1.8.3.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](stretchr/testify@v1.8.2...v1.8.3)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix(mem): Correct capitalization of linux writeback

fixes: shirou#1471

* chore(deps): bump github.com/yusufpapurcu/wmi from 1.2.2 to 1.2.3

Bumps [github.com/yusufpapurcu/wmi](https://github.com/yusufpapurcu/wmi) from 1.2.2 to 1.2.3.
- [Release notes](https://github.com/yusufpapurcu/wmi/releases)
- [Commits](yusufpapurcu/wmi@v1.2.2...v1.2.3)

---
updated-dependencies:
- dependency-name: github.com/yusufpapurcu/wmi
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* [common]: fix potential leak on Sleep.

* chore(deps): bump github.com/stretchr/testify from 1.8.3 to 1.8.4

Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.3 to 1.8.4.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](stretchr/testify@v1.8.3...v1.8.4)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* allow to pass context values to override environment variables

* move the Env key out of internal packages

* change to use a typed map per code review

* lint fixes

* remove deprecation comments

* add more env keys

* apply code review

* fix more linting reports

* add(README): add passing context value document

which is introduced by shirou#1439.

* Ref actions by commit SHA in build_test.yml

It's important to make sure the SHA's are from the original repositories and not forks.

For reference:

https://github.com/actions/setup-go/releases/tag/v4.0.1
actions/setup-go@fac708d

https://github.com/actions/checkout/releases/tag/v3.5.2
actions/checkout@8e5e7e5

https://github.com/actions/cache/releases/tag/v3.3.1
actions/cache@88522ab


Signed-off-by: Gabriela Gutierrez <gabigutierrez@google.com>

* Ref actions by commit SHA in labeler.yml

It's important to make sure the SHA's are from the original repositories and not forks.

For reference:

https://github.com/actions/labeler/releases/tag/v4.1.0
actions/labeler@9fcb2c2


Signed-off-by: Gabriela Gutierrez <gabigutierrez@google.com>

* Ref actions by commit SHA in lint.yml

It's important to make sure the SHA's are from the original repositories and not forks.

For reference:

https://github.com/actions/setup-go/releases/tag/v4.0.1
actions/setup-go@fac708d

https://github.com/actions/checkout/releases/tag/v3.5.2
actions/checkout@8e5e7e5

https://github.com/golangci/golangci-lint-action/releases/tag/v3.5.0
golangci/golangci-lint-action@5f1fec7


Signed-off-by: Gabriela Gutierrez <gabigutierrez@google.com>

* Ref actions by commit SHA in release.yml

It's important to make sure the SHA's are from the original repositories and not forks.

For reference:

https://github.com/actions/checkout/releases/tag/v3.5.2
actions/checkout@8e5e7e5


Signed-off-by: Gabriela Gutierrez <gabigutierrez@google.com>

* Ref actions by commit SHA in sbom_generator.yml

It's important to make sure the SHA's are from the original repositories and not forks.

For reference:

https://github.com/actions/checkout/releases/tag/v3.5.2
actions/checkout@8e5e7e5

https://github.com/advanced-security/sbom-generator-action/releases/tag/v0.0.1
advanced-security/sbom-generator-action@375dee8

https://github.com/actions/upload-artifact/releases/tag/v3.1.2
actions/upload-artifact@0b7f8ab


Signed-off-by: Gabriela Gutierrez <gabigutierrez@google.com>

* Ref actions by commit SHA in shellcheck.yml

It's important to make sure the SHA's are from the original repositories and not forks.

For reference:

https://github.com/actions/checkout/releases/tag/v3.5.2
actions/checkout@8e5e7e5

https://github.com/ludeeus/action-shellcheck/releases/tag/2.0.0
ludeeus/action-shellcheck@00cae50


Signed-off-by: Gabriela Gutierrez <gabigutierrez@google.com>

* Ref actions by commit SHA in test.yml

It's important to make sure the SHA's are from the original repositories and not forks.

For reference:

https://github.com/actions/setup-go/releases/tag/v4.0.1
actions/setup-go@fac708d

https://github.com/actions/checkout/releases/tag/v3.5.2
actions/checkout@8e5e7e5

https://github.com/actions/cache/releases/tag/v3.3.1
actions/cache@88522ab


Signed-off-by: Gabriela Gutierrez <gabigutierrez@google.com>

* chore(deps): bump actions/checkout from 3.5.2 to 3.5.3

Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.2 to 3.5.3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@8e5e7e5...c85c95e)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): bump golangci/golangci-lint-action from 3.5.0 to 3.6.0

Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3.5.0 to 3.6.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](golangci/golangci-lint-action@5f1fec7...639cd34)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): bump golang.org/x/sys from 0.8.0 to 0.9.0

Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.8.0 to 0.9.0.
- [Commits](golang/sys@v0.8.0...v0.9.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* cpu_percent and memory_percent update

* chore(deps): bump actions/labeler from 4.1.0 to 4.2.0

Bumps [actions/labeler](https://github.com/actions/labeler) from 4.1.0 to 4.2.0.
- [Release notes](https://github.com/actions/labeler/releases)
- [Commits](actions/labeler@9fcb2c2...0967ca8)

---
updated-dependencies:
- dependency-name: actions/labeler
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* [process] Remove all noisy and useless Test_AllProcesses_X tests

These tests can't fail more than their invidiual counterparts and produce an incredibly verbose output

* chore(deps): bump golang.org/x/sys from 0.9.0 to 0.10.0

Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.9.0 to 0.10.0.
- [Commits](golang/sys@v0.9.0...v0.10.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* [process][posix] Realign process.Name() with python psutil to return same value on python3 scripts processes

e2c79a1 started to blindly set the process name to the full path (instead of the basename) of the cmdline exectuable
if the process name from the process comm was truncated on linux. Python psutil never did that, and this is just wrong
for python (or any executable interpreted script) where the process name is not the interpreter binary but the script
itself.

A new test to check process name value against psutil value is added here, which would hopefully catch any potential
future changes in psutil.

Reverts shirou#542

Fixes shirou#1485

* chore(deps): bump actions/labeler from 4.2.0 to 4.3.0

Bumps [actions/labeler](https://github.com/actions/labeler) from 4.2.0 to 4.3.0.
- [Release notes](https://github.com/actions/labeler/releases)
- [Commits](actions/labeler@0967ca8...ac9175f)

---
updated-dependencies:
- dependency-name: actions/labeler
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Enable setting of vendor and related information for all Power versions

* chore(deps): bump golang.org/x/sys from 0.10.0 to 0.11.0

Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.10.0 to 0.11.0.
- [Commits](golang/sys@v0.10.0...v0.11.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* mem: linux: fix vmstat field names

The field names are read from /proc/vmstat were capitalized as their
output fields by mistake

* chore(deps): bump github.com/tklauser/go-sysconf from 0.3.11 to 0.3.12

Bumps [github.com/tklauser/go-sysconf](https://github.com/tklauser/go-sysconf) from 0.3.11 to 0.3.12.
- [Release notes](https://github.com/tklauser/go-sysconf/releases)
- [Commits](tklauser/go-sysconf@v0.3.11...v0.3.12)

---
updated-dependencies:
- dependency-name: github.com/tklauser/go-sysconf
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): bump actions/setup-go from 4.0.1 to 4.1.0

Bumps [actions/setup-go](https://github.com/actions/setup-go) from 4.0.1 to 4.1.0.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](actions/setup-go@fac708d...93397be)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix: fixed windows disk package leaks
- fixed goroutine leak in PartitionsWithContext
- closed registry handle in init

* [host][linux]: remove double quote from lsb release info

fix: shirou#1502

* chore(deps): bump golangci/golangci-lint-action from 3.6.0 to 3.7.0

Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3.6.0 to 3.7.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](golangci/golangci-lint-action@639cd34...3a91952)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix IOCounters() SerialNumber enumeration

* Update disk/disk_linux.go

Co-authored-by: shirou <shirou.faw@gmail.com>

* update comment

* comment cleanup

* chore(deps): bump actions/checkout from 3.5.3 to 3.6.0

Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.3 to 3.6.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@c85c95e...f43a0e5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

---------

Signed-off-by: cui fliter <imcusg@gmail.com>
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Gabriela Gutierrez <gabigutierrez@google.com>
Co-authored-by: cui fliter <imcusg@gmail.com>
Co-authored-by: shirou <shirou.faw@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Josh Powers <powersj@fastmail.com>
Co-authored-by: Antoine Toulme <antoine@lunar-ocean.com>
Co-authored-by: Gabriela Gutierrez <gabigutierrez@google.com>
Co-authored-by: Elfranne <tom.braarup@gmail.com>
Co-authored-by: Lomanic <5020919+Lomanic@users.noreply.github.com>
Co-authored-by: Kishen V <kishen.viswanathan@ibm.com>
Co-authored-by: Hugo Beauzée-Luyssen <hugo.beauzee@datadoghq.com>
Co-authored-by: Ozan HACIBEKİROĞLU <ozanhaci@gmail.com>
Co-authored-by: Greg Dallavalle <greg.dallavalle@lightstep.com>
Co-authored-by: Greg <2582552+gdvalle@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants