Code Monkey home page Code Monkey logo

archey4's People

Contributors

adjagu avatar airvue avatar alenbasic avatar czr137 avatar djmelik avatar e7p avatar gentlehoneylover avatar hayatehay avatar helmchen avatar horlogeskynet avatar ingrinder avatar lannuttia avatar lourinaldi avatar naragato avatar normcyr avatar nuclearphoenixx avatar omp avatar rev1si0n avatar sbz avatar serpent213 avatar si13n7 avatar somethinggeneric avatar taylorking avatar tobilike avatar tomru avatar wting avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

archey4's Issues

[FEATURE] MacOS support

There is an old version of archey still on Mac Homebrew, but it's listed as deprecated and brew doctor suggests finding an alternative. Posting here in case someone has already considered adding MacOS (Darwin, actually) support to this nice project.

In this particular instance, I'm still on Catalina 10.15.7 :

python3 -m distro -j
{
    "codename": "",
    "id": "darwin",
    "like": "",
    "version": "19.6.0",
    "version_parts": {
        "build_number": "0",
        "major": "19",
        "minor": "6"
    }
}

[BUG] `GPU` not detected on Raspberry Pi 4

on pi 4 gpu not detected, pcutils already at latest installed, up to date on everything, only thing not available to install is the alternative to pcutils-linux (Installed).

Expected behavior
displays gpu information in archey

Environment
Raspberry Pi 4 8GB,
Debian 12 bookworm

Additional context
missing gpu information

installed using latest archey4 .deb (all)

p.s. thankyou for fixing cpu detection, works perfectly

[FEATURE] Adds support for external configuration

Hi there, I would like to take benefit from the next 4.3.0 version to add support for (optional) external configuration with parameters defined by user.

See here for further information.

Comments are still welcome,
Bye ๐Ÿ‘‹

Temperature invalid on AMD platform

Archey4 is trying to report temp1_input However, on the AMD platform, this is used for Tctl (T_control temperature) which is highly inaccurate measurement. (often 10-20c higher than actual die temp) Effectively it's a smoothing mechanism, which reduces temp hysteria and smooths cooling curves.

Reading the Tdie (core/die temperature) is much more accurate.

I was unable to find a config option to specify this, quickly went over the temperature.py which is seems IMO overly complicated. and couldn't find a obvious place to modify this behavior.

NOTE: I'm already on the latest v4.13.3

{
   "k10temp-pci-00c3":{
      "Tctl":{
         "temp1_input": 42.000
      },
      "Tdie":{
         "temp2_input": 32.000
      }
   },
   "iwlwifi_1-virtual-0":{
      "temp1":{
ERROR: Can't get value of subfeature temp1_input: Can't read

      }
   }
}

Error when offline

Expected behavior

Archey works flawlessly when online but fails when no internet connect is available.

Current behavior

When I have no internet connection archey fails with the following error message:

Traceback (most recent call last):
  File "/usr/bin/archey4", line 936, in <module>
    output.append(key.name, key.value().value)
  File "/usr/bin/archey4", line 864, in __init__
    ], timeout=0.5, stderr=DEVNULL).decode().rstrip()
  File "/usr/lib/python3.6/subprocess.py", line 336, in check_output
    **kwargs).stdout
  File "/usr/lib/python3.6/subprocess.py", line 418, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['dig', '+short', '-6', 'aaaa', 'myip.opendns.com', '@resolver1.ipv6-sandbox.opendns.com']' returned non-zero exit status 10.

I have the latest versions of bind-utils and python3 and I am experiencing this for the AUR and (this) git version.

Possible solution

Your environment

  • Version used (4.x.y) : latest (AUR)
  • Operating System and version : Arch
  • Connectivity (Off-line, LAN only, Internet access, ...) : on- and offline

[FEATURE] Show multiple disks

Hello.

Thank you so much for this project.

There's a feature from archey3 that I'd like to see if we could port over here:

Is your feature request related to a problem? Please describe.
I have more than one disk in my laptop, each with more than one partition. And in archey3 it was possible to choose which partitions to display

Describe the solution you'd like
A way to display more than 1 disk / partition in the archey output. This should probabble be exposed to the users via a config option for listing which partitions to report.

Describe alternatives you've considered
I don't know enough of the project or python to consider myself able to suggest an approach.

Additional context
archey3 config
archey3 examples

EDIT: added archey3 examples page, which show better than the config one the way of displaying multiple partitions.

[BUG] [DISK] Soft-fails whith `df: [...]: Operation not permitted`

Describe the bug
System says df: /run/user/1000/doc: Operation not permitted, which as far as I know, means that it's trying to list the temp files related to your session.

Expected behavior
No error message, and be able to see the disk usage.

Screenshots
Screenshot from 2020-11-19 10-22-18

Environment

  • Version used (4.Y.Z) : 4.8.1
  • Method of installation (distribution package, PyPI, sources) : Arch .pkg.tar.xz
  • Hardware type (laptop, server, Raspberry, hyper-visor) : Custom built PC
  • Python version (3.Y.Z) : 3.8.6
  • Operating system and version : Arch Linux (rolling), Kernel v 5.9.8-arch1-1
  • Graphical environment name and version : Gnome Shell & Gnome DE. GNOME 3.38.1
  • Connectivity (off-line, LAN only, Internet access) : LAN & Internet over Ethernet

Additional context
I assume a package upgrade is at fault here, or something, because disk usage worked correctly until latest system update. Not sure what I'm missing.

[BUG] Uptime reported incorrectly on macOS

Describe the bug
The uptime displayed on macOS is incorrect and does not match the time reported by uptime.

Expected behavior
The uptime displayed matches the time reported by uptime.

Screenshots
Screen Shot 2021-11-11 at 8 08 09 PM

Environment

  • Version used (4.Y.Z) : v4.13.2
  • Method of installation (distribution package, PyPI, Homebrew, sources) : Homebrew
  • Hardware type (laptop, server, Raspberry, hyper-visor) : laptop
  • Python version (3.Y.Z) : 3.9.7
  • Operating system and version : macOS Catalina 10.15.7
  • Graphical environment name and version : macOS
  • Connectivity (off-line, LAN only, Internet access) : Internet access

Additional context
N/A

[BUG] [GPU] Avoid multiple `system_profiler` log display

I'm using a MacPro 2013 with two Graphic Cards, archey always return a log before the output, just like below:

2021-11-10 16:48:16.372 system_profiler[32818:899967] Device PreExisted [0000000100000802] AMD Radeon HD - FirePro D500
2021-11-10 16:48:16.372 system_profiler[32818:899967] Device PreExisted [00000001000007e8] AMD Radeon HD - FirePro D500

How can I remove this log or any option to ignore this?

compliant package naming

Hi,

I wanted to improve archey3 to my needs but then I first had a look on the many forks from the original archey and I found yours as the most advanced one.
I use Arch and I was surprised not to find your version in the AUR repository, so I'm preparing a package if that's ok for you (and that would be nice to make some .deb and .rpm too eventually).
Problem is, your repository naming doesn't fit well with the packaging naming convention.
Could you lowercase it to "archey4" so I can finish the PKGBUILD and propose you a pull request, please ?

[QUESTION] How to add support for new distributions ?

I was wondering how one would add their distro to the list along with the ascii art to the python script? I Run KDE Neon and when checking distro version it comes up as neon and when I use archey in terminal it comes up with the linux logo. So I would like to know how I would go about adding KDE Neon to the list of distros.

Wasn't sure where I would ask this, sorry if this isn't the correct way.

[macOS] ASCII art and entries aren't colored

Describe the bug
archey4 produces a correct output, however ascii art and categories are not colored.

Expected behavior
ascii art and categories are colored

Screenshots
archey4 output:
Screen Shot 2021-04-19 at 16 27 58

original archey output:
Screen Shot 2021-04-19 at 16 29 07

Environment

  • Version used: 4.11
  • Method of installation: brew install archey4
  • Hardware type: MacBook Pro (16-inch, 2019)
  • Python version: 3.9.4
  • Operating system and version: macOS Big Sur 11.2.3
  • Graphical environment name and version: Aqua
  • Connectivity: Internet access via Wi-Fi

error

~/ archey
ps: illegal option -- -
usage: ps [-AaCcEefhjlMmrSTvwXx] [-O fmt | -o fmt] [-G gid[,gid...]]
[-g grp[,grp...]] [-u [uid,uid...]]
[-p pid[,pid...]] [-t tty[,tty...]] [-U user[,user...]]
ps [-L]
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/bin/archey", line 7, in
from archey.archey import main
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/archey/archey.py", line 519, in
'-o', 'comm', '--no-headers'], universal_newlines=True
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 336, in check_output
**kwargs).stdout
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 418, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['ps', '-u501', '-o', 'comm', '--no-headers']' returned non-zero exit status 1.

[FEATURE] Configuration option to rearrange modules.

Is your feature request related to a problem? Please describe.
I would like to be able to change the order that the modules are printed in.

Describe the solution you'd like
Make the configuration file be able to define the order in which modules are printed - perhaps following the order of an array?

Describe alternatives you've considered
Using archey3 ๐Ÿ˜›

Additional context
Not sure how doable this is, and would probably require a pretty big rewrite to achieve too... Would be really nice to have, though.

[FEATURE] Publish to Mac Homebrew

Make this project available on Mac Homebrew, ideally in the default tap.

I have not published anything on homebrew before, but as I understand it, there are multiple steps to it.

  1. Create a new (or pick an existing) release to publish
  2. Create a new repo called homebrew-archey4 (or some other name?)
  3. Create the right Ruby formula there and commit
  4. To get it on the default tap, create a pull request against the homebrew project

In the end, Mac install instructions should be simply

brew install archey4

In case you are thinking of a different project name, before publishing would be the time to do it. :)
I'm partial to the name 'archier' but have no skin in the game.

[BUG] Very verbose GPU output

Describe the bug
The output of GPU entry for AMD 6900 XT is very verbose. It shows:

GPU: Advanced Micro Devices, Inc. [AMD/ATI] Navi 21 [Radeon RX 6800/6800 XT / 6900 XT] (rev c0)

Expected behavior
More concise GPU output, for example, neofetch shows this:

GPU: AMD ATI Radeon RX 6800/6800 XT / 6900 XT

Environment

  • Version used (4.Y.Z) : 4.13.4
  • Method of installation (distribution package, PyPI, Homebrew, sources) : AUR
  • Hardware type (laptop, server, Raspberry, hyper-visor) : Desktop
  • Python version (3.Y.Z) : 3.10.3
  • Operating system and version : Arch Linux (Linux 5.16.16-arch1-1)
  • Graphical environment name and version : Sway window manager
  • Connectivity (off-line, LAN only, Internet access) : Internet

[BUG] Can't get value of subfeature in0_input: Can't read

Describe the bug
When i run archey, it gives the following message:

WARNING: [lm-sensors]: ERROR: Can't get value of subfeature in0_input: Can't read
ERROR: Can't get value of subfeature in1_input: Can't read

And don't display the temperature correctly (it says Temperature: 47.3 C (Max. 47.5 C)).

Expected behavior
To show the temperature correctly and not give an error.

Environment

  • Version used (4.Y.Z) : v4.12.0
  • Method of installation (distribution package, PyPI, Homebrew, sources) : pip install
  • Hardware type (laptop, server, Raspberry, hyper-visor) : Desktop
  • Python version (3.Y.Z) : 3.9.6
  • Operating system and version : 5.11.22-2-MANJARO
  • Graphical environment name and version : KDE 5.22.3
  • Connectivity (off-line, LAN only, Internet access) : Internet access

Additional context
I have all dependencies installed.

This is the output of sensors -u:

amdgpu-pci-0700
Adapter: PCI adapter
vddgfx:
ERROR: Can't get value of subfeature in0_input: Can't read
vddnb:
ERROR: Can't get value of subfeature in1_input: Can't read
edge:
  temp1_input: 39.000

k10temp-pci-00c3
Adapter: PCI adapter
Tctl:
  temp1_input: 39.125
Tdie:
  temp2_input: 39.125

[FEATURE] An option to disable link local IPv6 addresses (fe80::) in LAN IP output

Love this tool โ€” use it on all my desktops, laptops and servers!

A great new option for "LAN_IP" would be to disable the display of link local addresses (the ones starting with fe80:) in the output. There are typically a lot of them (one for each interface) and they are not particularly useful or interesting to see but they make the script output very busy. If you limit the output to one line then you don't get addresses you are typically interested in (like local IPv4 and unique local IPv6)

How it looks now:

ะกะฝะธะผะพะบ ัะบั€ะฐะฝะฐ 2023-08-23 ะฒ 11 55 13

How it should look with link local addresses disabled:

ะกะฝะธะผะพะบ ัะบั€ะฐะฝะฐ 2023-08-23 ะฒ 12 00 46

No IPv6 with dnsutils (bind-tools)

Expected behavior

Sorry to spam you kind of but yeah, lol. Without dnsutils I get the following (somewhat) right output:

LAN_IP: 192.168.0.202
WAN_IP: <MY CORRECT IPv6>

Current behavior

The problem is now that after I installed dnsutils the output just goes full ipv4:

LAN_IP: 192.168.0.202
WAN_IP: <MY CORRECT IPv4>

Maybe this is intended to be like that? I'm genuinely confused, because both times it returns the correct IPs, but only one at a time and it changes between ipv4 and 6.

EDIT: Bind-Tools version: 9.11.2.P1-1

[BUG] `logo_style` ignored from configuration

Describe the bug
On macOS, retro logo isn't shown when config.json file is used even though it's correctly set in the json file.

	"logo_style": "retro",

But it works fine when set in the command line with --logo-style retro.

Expected behavior
When the retro logo_style is set in config.json file it should be shown with the command:
archey --config-path ~/.config/archey4/config.json

Screenshots

image

image

Environment

  • Version used : 4.14.0.1
  • Method of installation (distribution package, PyPI, Homebrew, sources) : Homebrew
  • Hardware type (laptop, server, Raspberry, hyper-visor) : MacBook Air M2
  • Python version (3.Y.Z) : Python 3.9.6
  • Operating system and version : macOS Ventura 13.1
  • Graphical environment name and version : --
  • Connectivity (off-line, LAN only, Internet access) : LAN and Internet access

Additional context

Custom configuration

Custom configuration

{
	"allow_overriding": true,
	"parallel_loading": true,
	"suppress_warnings": false,
	"entries_color": "",
	"honor_ansi_color": true,
	"logo_style": "retro",
	"entries": [
		{ "type": "User" },
		{ "type": "Hostname" },
		{ "type": "Model" },
		{ "type": "Distro" },
		{
			"type": "Kernel",
			"check_version": false
		},
		{ "type": "Uptime" },
		{
			"type": "LoadAverage",
			"decimal_places": 2,
			"warning_threshold": 1.0,
			"danger_threshold": 2.0
		},
		{ "type": "Processes" },
		{ "type": "WindowManager" },
		{ "type": "DesktopEnvironment" },
		{ "type": "Shell" },
		{
			"type": "Terminal",
			"use_unicode": true
		},
		{ "type": "Packages" },
		{
			"type": "Temperature",
			"char_before_unit": " ",
			"sensors_chipsets": [],
			"sensors_excluded_subfeatures": [],
			"use_fahrenheit": false
		},
		{
			"type": "CPU",
			"one_line": false,
			"show_cores": true
		},
		{
			"type": "GPU",
			"one_line": false,
			"max_count": 2
		},
		{
			"type": "RAM",
			"warning_use_percent": 33.3,
			"danger_use_percent": 66.7
		},
		{
			"type": "Disk",
			"show_filesystems": ["local"],
			"combine_total": true,
			"disk_labels": null,
			"hide_entry_name": null,
			"warning_use_percent": 50,
			"danger_use_percent": 75
		},
		{
			"type": "LAN_IP",
			"one_line": true,
			"max_count": 2,
			"show_global": false,
			"ipv6_support": false
		},
		{
			"type": "WAN_IP",
			"one_line": true,
			"ipv4": {
				"dns_query": "myip.opendns.com",
				"dns_resolver": "resolver1.opendns.com",
				"dns_timeout": 1,
				"http_url": "https://v4.ident.me/",
				"http_timeout": 1
			},
			"ipv6": {
				"dns_query": "myip.opendns.com",
				"dns_resolver": "resolver1.opendns.com",
				"dns_timeout": 1,
				"http_url": "https://v6.ident.me/",
				"http_timeout": 1
			}
		}
	],
	"default_strings": {
		"latest": "latest",
		"available": "available",
		"no_address": "No Address",
		"not_detected": "Not detected",
		"virtual_environment": "Virtual Environment"
	}
}

[QUESTION] Adds support for temperature ?

Hey visitor / user !

I'm thinking about adding a new entry for hardware temperature.


This is what it would do :

  • Try to reach for /opt/vc/bin/vcgencmd measure_temp for Raspberry (GPU temperature)
  • Try to gather information from /sys/class/thermal/thermal_zone*/temp files

Some questions still opened for you :

  1. Default unit ?
    • Celcius
    • Fahrenheit
  2. Do we let the user change it easily with a new constant in the header ?
    • Yes
    • No
  3. Do you know some other existing files to fetch interesting values ?
    • Yes
    • No
  4. Do we add a dependency to lm-sensors or would we be satisfied with files listed above ?
    • Yes and no
    • No and yes
  5. Do we average each existing value, or only keep the maximum ?
    • Yes
    • No
    • Both when possible
  6. Do you want such a feature ?
    • Yes
    • No

Authentic or future users, feel free to discuss this below ๐Ÿ‘Œ

Bye ๐Ÿ‘‹

[BUG] ERROR: archey.test.entries.test_archey_packages (unittest.loader._FailedTest)


From https://aur.archlinux.org/packages/archey4/?O=10&PP=10#comment-825146.


getting this when trying to upgrade or clean install the latest build, any help ? thanks

==> Starting check()...
.......................................................E......................................................................................
======================================================================
ERROR: archey.test.entries.test_archey_packages
(unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module:
archey.test.entries.test_archey_packages
Traceback (most recent call last):
  File "/usr/lib/python3.9/unittest/loader.py", line 436, in
_find_test_path
    module = self._get_module_from_name(name)
  File "/usr/lib/python3.9/unittest/loader.py", line 377, in
_get_module_from_name
    __import__(name)
  File
"/home/vas/.cache/yay/archey4/src/archey4-4.13.1/archey/test/entries/test_archey_packages.py",
line 9, in <module>
    from archey.entries.packages import Packages
  File
"/home/vas/.cache/yay/archey4/src/archey4-4.13.1/archey/entries/packages.py",
line 34, in <module>
    {'cmd': ('ls', '-1', get_homebrew_cellar_path())},  # HomeBrew.
  File
"/home/vas/.cache/yay/archey4/src/archey4-4.13.1/archey/entries/packages.py",
line 14, in get_homebrew_cellar_path
    return check_output(
  File "/usr/lib/python3.9/subprocess.py", line 424, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.9/subprocess.py", line 505, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.9/subprocess.py", line 951, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.9/subprocess.py", line 1821, in
_execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
PermissionError: [Errno 13] Permission denied: 'brew'


----------------------------------------------------------------------
Ran 142 tests in 1.304s

FAILED (errors=1)
==> ERROR: A failure occurred in check().
    Aborting...
error making: archey4

Hi @vasilejianu, thanks for your feedback. Have you got brew installed on your system ? Can you run brew --cellar manually ? I don't get why it would raise PermissionError exception, but we can catch it upstream in the future if needed... Bye, waiting for your input.


i don't have brew its weird is doing that
its a minimal arch install
Linux apex-main 5.13.13-arch1-1 #1
all i have is nginx,mariadb,php,named

which brew
which: no brew in
(/usr/local/sbin:/usr/local/bin:/usr/bin:/root/.dotnet/tools:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl)

@vasilejianu : so I've tried with yay myself against an Arch container, and the check() part is really doing well... I think something is to blamed on your system (noexec(?), yay configuration(?), somehow brew is available under PATH on your vas regular user(?), ...). If you find out, please let me know. If something is definitely wrong upstream, let me know too. Good luck


this is interesting
i have run the test manually under user priv it fails , under root privs it passes

[vas@apex-main archey4]$ python3 -m unittest
.......................................................E......................................................................................
======================================================================
ERROR: archey.test.entries.test_archey_packages
(unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module:
archey.test.entries.test_archey_packages
Traceback (most recent call last):
  File "/usr/lib/python3.9/unittest/loader.py", line 436, in
_find_test_path
    module = self._get_module_from_name(name)
  File "/usr/lib/python3.9/unittest/loader.py", line 377, in
_get_module_from_name
    __import__(name)
  File
"/home/vas/archey4/archey/test/entries/test_archey_packages.py", line
9, in <module>
    from archey.entries.packages import Packages
  File "/home/vas/archey4/archey/entries/packages.py", line 34, in
<module>
    {'cmd': ('ls', '-1', get_homebrew_cellar_path())},  # HomeBrew.
  File "/home/vas/archey4/archey/entries/packages.py", line 14, in
get_homebrew_cellar_path
    return check_output(
  File "/usr/lib/python3.9/subprocess.py", line 424, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.9/subprocess.py", line 505, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.9/subprocess.py", line 951, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.9/subprocess.py", line 1821, in
_execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
PermissionError: [Errno 13] Permission denied: 'brew'


----------------------------------------------------------------------
Ran 142 tests in 1.315s

FAILED (errors=1)
[vas@apex-main archey4]$ sudo python3 -m unittest
...........................................................................................................................................................
----------------------------------------------------------------------
Ran 155 tests in 1.302s

OK

@vasilejianu : could you try to run which brew under your regular user ? You can also use a (broad) find if nothing comes out; I'm pretty sure you got a brew (apparently not executable) somewhere. Almost there !


find . -name "brew*"
./root/.oh-my-bash/completions/brew.completion.sh
./root/.oh-my-bash/plugins/brew
./root/.oh-my-bash/plugins/brew/brew.plugin.sh

@vasilejianu : good one. Although I'm confused about catching PermissionError in this case, as all the other sub-process calls across the code base do not, whereas the same problem could occur. What do you think about that ? Do you think this exception should be caught elsewhere ?


idk although that was the only ref to brew in the system i have uninstalled oh my bash and still getting the error
i have tried under a diff user too

root@apex-main>  find . -name "brew*"
root@apex-main> which brew
brew not found

apex-main% printenv
USER=vas
LOGNAME=vas
HOME=/home/vas
PATH=/root/.local/bin:/other/things/in/path:/usr/local/sbin:/usr/local/bin:/usr/bin:/root/.dotnet/tools:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
SHELL=/bin/zsh
TERM=xterm-256color
MOTD_SHOWN=pam
MAIL=/var/spool/mail/root
XDG_SESSION_ID=12
XDG_RUNTIME_DIR=/run/user/0
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/0/bus
XDG_SESSION_TYPE=tty
XDG_SESSION_CLASS=user
SSH_CLIENT=...
SSH_CONNECTION=...
SSH_TTY=/dev/pts/0
SHLVL=2
PWD=/
OLDPWD=/
DOTNET_ROOT=/usr/share/dotnet
DOTNET_BUNDLE_EXTRACT_BASE_DIR=/root/.cache/dotnet_bundle_extract
LANG=en_US.UTF-8
_=/usr/bin/printenv

@vasilejianu : have you tried under another BASH session without brew symbol exported by your previous plugin ? [...]


yeah i have installed zsh, was previously using bash i have removed the user and added it again with a new zsh shell

[BUG]: In a WSL environment, Ubuntu is reported as Windows

Describe the bug
In a WSL environment, Ubuntu (or kali for example) is reported as Windows OS.

Expected behavior
same as neofetch or screenfetch reporting

Screenshots
image

image

Environment

  • Version used (4.Y.Z) :
  • Method of installation (distribution package, PyPI, Homebrew, sources) : pip3 install archey4
  • Hardware type (laptop, server, Raspberry, hyper-visor) : laptop - WSL 2.0 environment with Ubuntu (or Kali)
  • Python version (3.Y.Z) : 3
  • Operating system and version : WSL 2.0 environment with Ubuntu (or Kali); Ubuntu 20
  • Graphical environment name and version :
  • Connectivity (off-line, LAN only, Internet access) :

Additional context

[BUG] archey4 can't handle filesystems with spaces

Describe the bug
archey4 does not support filesystems with spaces in their names. rclone (a tool to work with and mount cloud storage) allows to create filesystems with spaces in their names and archey4 fails to parse df's output. Furthermore, rclone always puts a : at the end of the filesystems name, maybe this helps in some way.

rclone configuration:

[OneDrive Business]
type = onedrive
...

df output:

Dateisystem                1K-Blรถcke   Benutzt     Verfรผgbar Verw% Eingehรคngt auf
OneDrive Business:        1073741824   1511724    1072230100    1% /home/[USER]/rclone/OneDrive Business

archey4 output:

WARNING: [archey.entries.temperature] [lm-sensors]: ERROR: Can't get value of subfeature temp1_input: Can't read
Traceback (most recent call last):
  File "/usr/bin/archey", line 33, in <module>
    sys.exit(load_entry_point('archey4==4.13.1', 'console_scripts', 'archey')())
  File "/usr/lib/python3.9/site-packages/archey/__main__.py", line 168, in main
    for entry_instance in mapper(_entry_instantiator, available_entries):
  File "/usr/lib/python3.9/concurrent/futures/_base.py", line 608, in result_iterator
    yield fs.pop().result()
  File "/usr/lib/python3.9/concurrent/futures/_base.py", line 438, in result
    return self.__get_result()
  File "/usr/lib/python3.9/concurrent/futures/_base.py", line 390, in __get_result
    raise self._exception
  File "/usr/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/lib/python3.9/site-packages/archey/__main__.py", line 144, in _entry_instantiator
    return Entries[entry.pop('type')].value(
  File "/usr/lib/python3.9/site-packages/archey/entries/disk.py", line 18, in __init__
    self._disk_dict = self._get_df_output_dict()
  File "/usr/lib/python3.9/site-packages/archey/entries/disk.py", line 133, in _get_df_output_dict
    'total_blocks': int(columns[1])
ValueError: invalid literal for int() with base 10: 'Business:'

Expected behavior
archey4 shouldn't fail. Maybe display local storage only and print a warning that some filesystems were ignored.

Screenshots
Please see the error message above.

Environment

  • Version used (4.Y.Z) : v4.13.1
  • Method of installation (distribution package, PyPI, Homebrew, sources) : AUR package
  • Hardware type (laptop, server, Raspberry, hyper-visor) : laptop
  • Python version (3.Y.Z) : 3.9.7
  • Operating system and version : Manjaro Linux (rolling, up2date)
  • Graphical environment name and version : GNOME 40.4.0
  • Connectivity (off-line, LAN only, Internet access) : LAN

Additional context

Consider using os-release instead of lsb_release

lsb_release is not always installed on a system, and requires running a subprocess in order to get information from it. The /etc/os-release file is required by any system booting with systemd, and encouraged as a distro-neutral and init-neutral identification method used by a number of non-systemd distros too. It's purpose is to replace the multitude of distro-specific foo-release files, as well as to provide something documented to be readable by any programming language without, say, depending on the implementation of a CLI command like lsb_release.

See for details:
http://0pointer.de/blog/projects/os-release
https://www.freedesktop.org/software/systemd/man/os-release.html

[BUG] Doesn't fit terminal size

Describe the bug
Some lines of archey system info wrap to next line on Ubuntu 20.04 80col x 24row

Expected behavior
Regular system info display

Screenshots
(note: "Reminders" is my own program. I'm talking about archey above it.)
Screenshot from 2020-04-26 14-35-27

Environment

  • Version used (4.Y.Z) : 4.7.1
  • Method of installation (distribution package, PyPI, sources) : .deb package
  • Hardware type (laptop, server, Raspberry, hyper-visor) : Custom built desktop tower
  • Python version (3.Y.Z) : 3.8.2
  • Operating system and version : Ubuntu 20.04
  • Graphical environment name and version : Gnome 3.34 (I think, per Ubuntu "Software")
  • Connectivity (off-line, LAN only, Internet access) : Ethernet access

Additional context
Just installed 20.04 "the debian way" so maybe this is a OS issue, but I figured I'd report anyway.

[QUESTION] [FEATURE] Multithreading?

Is your feature request related to a problem? Please describe.
Maybe this is overkill, but on my system Archey typically runs in around 300-350ms. Some profiling reveals that quite a lot of this is waiting on I/O from commands, files, or internet requests.

I wondered whether multithreading would help make some good use of this CPU wait time, and it does! I pushed a commit to ingrinder/archey4/optimisation implementing multithreading with the builtin concurrent.futures library, and I get runtimes of around 130-150ms (<100ms with WAN_IP disabled). Since I have archey in my .bashrc this is quite a noticeable difference ๐Ÿ˜ƒ

Additional context
Things to consider:

  • ๐Ÿ‘ Quicker execution time!
  • ๐Ÿ‘ Spawning threads is lightweight compared to processes.
  • ๐Ÿ‘ Due to our new Output format we get to keep the same order-of-entries even if they are instantiated asynchronously(-ish).
  • ๐Ÿ‘Ž Profiling is now less accurate since we end up just profiling the thread pool.
  • ๐Ÿ‘Ž It's possible Python doesn't support multithreading on all platforms? For example, I know multiprocessing isn't supported on Android, but multithreading appears to be. Not sure where I can find more info on this? Surely most platforms implement threads... right?!

Perhaps given the above downsides, it could be a configurable option? This may give the benefit of compatibility and speed ๐Ÿš€. Let me know what you think about this anyway.

Better temperature detection

Temperature is not detected

Can you please fix this by adding more temperature detection methods or using lm-sensor

Is there any way to use grep and put it on there?

  • Version used archey 4.6
  • laptop
  • Operating system : Archlinux

hostname: invalid option -- 'I'

After updating to the most recent version I received the following error when running archey.

hostname: invalid option -- 'I'... etc...

I am on Arch Linux and on my machine hostname has an 'i' option not an 'I' option. hostname -i returns a value of 127.0.1.1 on my machine (personal home computer without web accessible servers).

The attached photograph shows the entire error message that I received.

screenshot_2017-08-04_01-26-50

Wifi IP listed as LAN IP - No LAN on laptop

โ•ญโ”€me@my-pc ~/build/Archey4  โ€นmasterโ€บ 
โ•ฐโ”€$ archey

 $$$$$$$$$$$$$$$$  $$$$$$$   User: me
 M77777777777777M  M77777M   Hostname: my-pc
 M77777777777777M  M77777M   Model: MacBookAir4,2
 M77777MMMMMMMMMM  M77777M   Distro: "Manjaro Linux" x86_64
 M77777M           M77777M   Kernel: 4.12.8-1-MANJARO
 M77777M  $$$$$$$  M77777M   Uptime: 11 hours and 36 minutes
 MMMMMMM  M77777M  M77777M   WindowManager: i3
          M77777M  M77777M   DesktopEnvironment: i3
 $$$$$$$  M77777M  M77777M   Shell: /usr/bin/zsh
 M77777M  M77777M  M77777M   Terminal: xterm-256color
 M77777M  M77777M  M77777M   Packages: 882
 M77777M  M77777M  M77777M   CPU: Intel(R) Core(TM) i7-2677M CPU @ 1.80GHz
 M77777M  M77777M  M77777M   GPU: Intel Corporation 2nd Generation Core [...]
 M77777M  M77777M  M77777M   RAM: 1095 MB / 3868 MB
 M77777M  M77777M  M77777M   Disk: 13 GB / 162 GB
 M77777M  M77777M  M77777M   LAN_IP: xx.xx.xx.xx
 M77777M  M77777M  M77777M   WAN_IP: No Address
 MMMMMMM  MMMMMMM  MMMMMMM   

Disk: reports incorrect information for tempfs and BTRFS

Disk utilisation and total includes tempfs when stored in RAM and duplicates btrfs subvolumes.

Expected behavior

My system is installed on 11GB partition with /, /home, /swap, /var/log and /var/cache/pacman/pkg in separate subvolumes. I would expect disk utilisation not to duplicate subvolume usage and exclude file systems in RAM (as Arch defines tempfs by default).

Current behavior

archey4 reports 21GB used of 100GB for my 11GB partition.

The problem is the summing output from df which sums all tmpfs and btrfs resulting in excessive utilisation and space numbers.

This is what "class disk" does:

[hali@Linux ~]$ df -Tlh -B GB --total -t ext4 -t ext3 -t ext2 -t reiserfs -t jfs -t zfs -t ntfs -t fat32 -t btrfs -t fuseblk -t xfs -t simfs -t tmpfs -t lxfs
Filesystem     Type  1GB-blocks  Used Available Use% Mounted on
run            tmpfs        9GB   1GB       9GB   1% /run
/dev/sda7      btrfs       11GB   4GB       8GB  33% /
tmpfs          tmpfs        9GB   1GB       9GB   2% /dev/shm
tmpfs          tmpfs        9GB   0GB       9GB   0% /sys/fs/cgroup
/dev/sda7      btrfs       11GB   4GB       8GB  33% /var/cache/pacman/pkg
/dev/sda7      btrfs       11GB   4GB       8GB  33% /var/log
/dev/sda7      btrfs       11GB   4GB       8GB  33% /var/swap
/dev/sda7      btrfs       11GB   4GB       8GB  33% /home
/dev/sda7      btrfs       11GB   4GB       8GB  33% /.snapshots
tmpfs          tmpfs        9GB   1GB       9GB   1% /tmp
tmpfs          tmpfs        2GB   1GB       2GB   1% /run/user/1000
total          -          100GB  21GB      79GB  21% -
[hali@Linux ~]$

While this is btrfs utilisation

[root@Linux hali]# btrfs filesystem usage /
Overall:
    Device size:		  10.00GiB
    Device allocated:		   4.27GiB
    Device unallocated:		   5.73GiB
    Device missing:		     0.00B
    Used:			   3.18GiB
    Free (estimated):		   6.67GiB	(min: 6.67GiB)
    Data ratio:			      1.00
    Metadata ratio:		      1.00
    Global reserve:		  16.00MiB	(used: 0.00B)

Data,single: Size:4.01GiB, Used:3.06GiB
   /dev/sda7	   4.01GiB

Metadata,single: Size:264.00MiB, Used:121.36MiB
   /dev/sda7	 264.00MiB

System,single: Size:4.00MiB, Used:16.00KiB
   /dev/sda7	   4.00MiB

Unallocated:
   /dev/sda7	   5.73GiB
[root@Linux hali]#

Possible solution

Perhaps just show Root like archey3?

The 'btrfs fi usage' figure "Used:" of 3.18GB is the same as one instance of df figure for /dev/sda7 (although less than allocated).

Your environment

[hali@Linux ~]$ archey4

               +                 User: hali
               #                 Hostname: Linux
              ###                Model: MacBookPro11,2
             #####               Distro: Arch Linux [x86_64]
             ######              Kernel: 5.0.7-arch1-1-ARCH
            ; #####;             Uptime: 2 minutes
           +##.#####             WindowManager: i3
          +##########            DesktopEnvironment: i3
         #############;          Shell: /bin/bash
        ###############+         Terminal: rxvt-unicode-256color ## ## ## ## ## ## ##
       #######   #######         Packages: 437
     .######;     ;###;`".       Temperature: 42.0 C (Max. 51.0 C)
    .#######;     ;#####.        CPU: Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
    #########.   .########`      GPU: Intel Corporation Crystal Well Integrated...
   ######'           '######     RAM: 222 MB / 15947 MB
  ;####                 ####;    Disk: 21 GB / 100 GB
  ##'                     '##    LAN_IP: 192.168.1.19
 #'                         `#   WAN_IP: xxxxxxxxxxxx

/etc/fstab

LABEL=Linux             /                       btrfs   rw,relatime,compress=lzo,ssd,space_cache,subvolid=258,subvol=A1398_volume/arch                                  0 0
LABEL=Linux             /home                   btrfs   rw,relatime,compress=lzo,ssd,space_cache,subvolid=259,subvol=A1398_volume/home                                  0 0

# No snapshots
LABEL=Linux             /var/cache/pacman/pkg   btrfs   rw,relatime,compress=lzo,ssd,space_cache,subvolid=273,subvol=A1398_volume/var-cache-pacman-pkg                  0 0
LABEL=Linux             /var/log                btrfs   rw,relatime,compress=lzo,ssd,space_cache,subvolid=274,subvol=A1398_volume/var-log                               0 0
LABEL=Linux             /.snapshots             btrfs   rw,relatime,compress=lzo,ssd,space_cache,subvolid=260,subvol=A1398_volume/.snapshots                            0 0

LABEL=EFI               /boot                   vfat    rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro       0 2

# Swap
LABEL=Linux             /var/swap               btrfs   rw,relatime,ssd,space_cache,subvolid=272,subvol=A1398_volume/swap                                               0 0
/var/swap/swapfile      none                    swap    defaults 0 0

Subvolumes

[root@Arch-A1398 hali]# btrfs subvolume list /
ID 257 gen 1004 top level 5 path A1398_volume
ID 258 gen 995 top level 257 path arch
ID 259 gen 993 top level 257 path home
ID 260 gen 975 top level 257 path .snapshots
ID 262 gen 27 top level 258 path arch/var/lib/portables
ID 263 gen 28 top level 258 path arch/var/lib/machines
ID 266 gen 975 top level 259 path home/.snapshots
ID 272 gen 1002 top level 257 path swap
ID 273 gen 1003 top level 257 path var-cache-pacman-pkg
ID 274 gen 1004 top level 257 path var-log

[BUG] [DISK] [BUSYBOX] Entry is not detected

Describe the bug
On Alpine Linux, for instance, the Disk entry is left undetected.
See d676b0b#diff-e6076e0f8c9ab0586c8909ec8d6832beR67.

Additional context
When fixing this (let's say with a simpler df -P -B M call and a proper columns parsing), we've to think about an optimized approach, as while checking for BTRFS mount-points, the second df call would also fail...
Maybe this fix could be thought over while reworking Disk for #55.

[FEATURE] Add option to disable OpenDNS lookups

Is your feature request related to a problem? Please describe.
For some reason my employer blocks OpenDNS lookups, so these always timeout causing substantial delays.

Describe the solution you'd like
An option that skips OpenDNS lookup and goes straight for ident.me would solve this problem.

[BUG] uptime: /dev/ttys010: No such file or directory

Describe the bug
When launching archey, this message is shown at the very beginning output:

uptime: /dev/ttys010: No such file or directory

Expected behavior
Not show this error.

Screenshots
image

Environment

  • Version used (4.X.Y.Z) : 4.14.1.0
  • Method of installation (distribution package, PyPI, Homebrew, sources) : homebrew
  • Hardware type (laptop, server, Raspberry, hyper-visor) : Macbook Air M2
  • Python version (3.Y.Z) : Python 3.11.3
  • Operating system and version : macOS Ventura 13.3.1 (22E261)
  • Graphical environment name and version : --
  • Connectivity (off-line, LAN only, Internet access) : LAN/Wifi/Internet

Additional context

Custom configuration

Custom configuration

{
	"allow_overriding": true,
	"parallel_loading": true,
	"suppress_warnings": false,
	"entries_color": "",
	"honor_ansi_color": true,
	"logo_style": "retro",
	"entries": [
		{ "type": "User" },
		{ "type": "Hostname" },
		{ "type": "Model" },
		{ "type": "Distro" },
		{
			"type": "Kernel",
			"check_version": false
		},
		{ "type": "Uptime" },
		{
			"type": "LoadAverage",
			"decimal_places": 2,
			"warning_threshold": 1.0,
			"danger_threshold": 2.0
		},
		{ "type": "Processes" },
		{ "type": "WindowManager" },
		{ "type": "DesktopEnvironment" },
		{ "type": "Shell" },
		{
			"type": "Terminal",
			"use_unicode": true
		},
		{ "type": "Packages" },
		{
			"type": "Temperature",
			"char_before_unit": " ",
			"sensors_chipsets": [],
			"sensors_excluded_subfeatures": [],
			"use_fahrenheit": false
		},
		{
			"type": "CPU",
			"one_line": false,
			"show_cores": true
		},
		{
			"type": "GPU",
			"one_line": false,
			"max_count": 2
		},
		{
			"type": "RAM",
			"warning_use_percent": 33.3,
			"danger_use_percent": 66.7
		},
		{
			"type": "Disk",
			"show_filesystems": ["local"],
			"combine_total": true,
			"disk_labels": null,
			"hide_entry_name": null,
			"warning_use_percent": 50,
			"danger_use_percent": 75
		},
		{
			"type": "LAN_IP",
			"one_line": true,
			"max_count": 2,
			"show_global": false,
			"ipv6_support": false
		},
		{
			"type": "WAN_IP",
			"one_line": true,
			"ipv4": {
				"dns_query": "myip.opendns.com",
				"dns_resolver": "resolver1.opendns.com",
				"dns_timeout": 1,
				"http_url": "https://v4.ident.me/",
				"http_timeout": 1
			},
			"ipv6": {
				"dns_query": "myip.opendns.com",
				"dns_resolver": "resolver1.opendns.com",
				"dns_timeout": 1,
				"http_url": "https://v6.ident.me/",
				"http_timeout": 1
			}
		}
	],
	"default_strings": {
		"latest": "latest",
		"available": "available",
		"no_address": "No Address",
		"not_detected": "Not detected",
		"virtual_environment": "Virtual Environment"
	}
}

[FEATURE] GPU support when multiple GPUs are present

Is your feature request related to a problem? Please describe.
Currently only one GPU appears in Archey's output. For example, my PC has a dedicated Nvidia GTX 970 + the integrated Intel UHD 630 GPU. When I run Archey, it displays GPU: Intel Corporation UHD Graphics 630 (Desktop), with no mention of my Nvidia GPU.

Describe the solution you'd like
One of these would be ideal:

  • Display both GPUs (this might be what someone with multiple discrete GPUs wants)
  • Have the ability to display the GPU of my choice (i.e. the dedicated one in my case).

Describe alternatives you've considered
I could disable the integrated graphics, however I use it with IOMMU for virtual machines so I would prefer to keep it enabled and have the ability to display my dedicated GPU.

Additional context
The output of lspci | egrep "3D|VGA|Display" is:

00:02.0 Display controller: Intel Corporation UHD Graphics 630 (Desktop)
01:00.0 VGA compatible controller: NVIDIA Corporation GM204 [GeForce GTX 970] (rev a1)

[BUG] Nonfatal warning "WARNING: [root] One entry (misses or) uses an invalid `type` field ('command')."

Describe the bug
Recently, archey on MacOS Monterey 12.6 started reporting the following error:

WARNING: [root] One entry (misses or) uses an invalid `type` field ('command').

No configuration file is being provided. Command line is:

archey -l retro

Archey4 was installed via HomeBrew.

> brew info archey4
==> archey4: stable 4.14.0.0 (bottled)
Simple system information tool written in Python
https://github.com/HorlogeSkynet/archey4
Conflicts with:
  archey (because both install `archey` binaries)
/opt/homebrew/Cellar/archey4/4.14.0.0 (910 files, 10.9MB) *
  Poured from bottle on 2022-09-30 at 18:46:49
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/archey4.rb
License: GPL-3.0-or-later
==> Dependencies
Required: [email protected] โœ”

Note that the HomeBrew output reference to "archey" (vs. "archey4") is not relevant; "archey" has never been installed on this system:

> brew install archey
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).

Error: archey has been disabled because it has an archived upstream repository!

> brew remove archey
Error: No such keg: /opt/homebrew/Cellar/archey

Expected behavior
No error

Screenshots

> archey -l retro
WARNING: [root] One entry (misses or) uses an invalid `type` field ('command').
                            User: xxx
                            Hostname: xxx-mbp-m2.local
                            Model: Mac14.7
               ###          Distro: macOS 12.6 arm64
             ####           Kernel: Darwin 21.6.0
             ###            Uptime: 2 days and 2 minutes
     #######    #######     Load Average: 1.07 1.41 2.15
   ######################   Processes: 546
  #####################     Window Manager: Quartz Compositor
  ####################      Desktop Environment: Aqua
  ####################      Shell: /bin/zsh
  #####################     Terminal: iTerm.app 3.4.16 โ–ˆโ–ˆ โ–ˆโ–ˆ โ–ˆโ–ˆ โ–ˆโ–ˆ โ–ˆโ–ˆ โ–ˆโ–ˆ โ–ˆโ–ˆ
   ######################   Packages: 117
    ####################    Temperature: Not detected
      ################      CPU: 8 x Apple M2
       ####     #####       GPU: Apple M2
                            RAM: 6054 MiB / 24576 MiB
                            Disk: 109.4 GiB / 2.8 TiB
                            LAN IP: fe80::1, fe80::...
                            WAN IP: 47.x.y.z

Environment

  • Version used (4.X.Y.Z) : 4.14.0.0
  • Method of installation (distribution package, PyPI, Homebrew, sources) : Homebrew
  • Hardware type (laptop, server, Raspberry, hyper-visor) : MacBook Pro (13-inch, M2, 2022)
  • Python version (3.Y.Z) : 3.10.7
  • Operating system and version : MacOS Monterey 12.6
  • Graphical environment name and version : iTerm2
  • Connectivity (off-line, LAN only, Internet access) : Internet access

Additional context
n/a

Custom configuration
n/a

[BUG] critical error on macOS today

Describe the bug
Traceback (most recent call last):
File "/usr/local/bin/archey", line 8, in
sys.exit(main())
^^^^^^
File "/usr/local/Cellar/archey4/4.14.2.0/libexec/lib/python3.12/site-packages/archey/main.py", line 185, in main
for entry_instance in mapper(_entry_instantiator, available_entries):
File "/usr/local/Cellar/[email protected]/3.12.0/Frameworks/Python.framework/Versions/3.12/lib/python3.12/concurrent/futures/_base.py", line 619, in result_iterator
yield _result_or_cancel(fs.pop())
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/[email protected]/3.12.0/Frameworks/Python.framework/Versions/3.12/lib/python3.12/concurrent/futures/_base.py", line 317, in _result_or_cancel
return fut.result(timeout)
^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/[email protected]/3.12.0/Frameworks/Python.framework/Versions/3.12/lib/python3.12/concurrent/futures/_base.py", line 449, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/[email protected]/3.12.0/Frameworks/Python.framework/Versions/3.12/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
File "/usr/local/Cellar/[email protected]/3.12.0/Frameworks/Python.framework/Versions/3.12/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/archey4/4.14.2.0/libexec/lib/python3.12/site-packages/archey/main.py", line 159, in _entry_instantiator
return Entries[entry.pop("type")].value(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/archey4/4.14.2.0/libexec/lib/python3.12/site-packages/archey/entries/disk.py", line 20, in init
self._disk_dict = self._get_df_output_dict()
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/archey4/4.14.2.0/libexec/lib/python3.12/site-packages/archey/entries/disk.py", line 175, in _get_df_output_dict
df_output = run(
^^^^
File "/usr/local/Cellar/[email protected]/3.12.0/Frameworks/Python.framework/Versions/3.12/lib/python3.12/subprocess.py", line 550, in run
stdout, stderr = process.communicate(input, timeout=timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/[email protected]/3.12.0/Frameworks/Python.framework/Versions/3.12/lib/python3.12/subprocess.py", line 1196, in communicate
stdout = self.stdout.read()
^^^^^^^^^^^^^^^^^^
File "", line 322, in decode
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa0 in position 1139: invalid start byte

Environment

  • Version used (4.X.Y.Z) : 4.14.2.0
  • Method of installation (distribution package, PyPI, Homebrew, sources) : Homebrew
  • Hardware type (laptop, server, Raspberry, hyper-visor) : MacBook Pro 16" 2019
  • Python version (3.Y.Z) : 3.12.0
  • Operating system and version : 14.0
  • Connectivity (off-line, LAN only, Internet access) : Internet access

Today I suddenly got this error.

bug?

I isntalled, but not working. Debian

root@madoka:~# archey
Traceback (most recent call last):
File "/usr/bin/archey", line 597, in
output.output()
File "/usr/bin/archey", line 398, in output
print(logosDict[self.distribution].format(c=colorDict[self.distribution], r=results) + colorDict['clear'])
UnicodeEncodeError: 'ascii' codec can't encode character '\u2205' in position 557: ordinal not in range(128)

[BUG] On macOS, total disk size is reported incorrectly for APFS drives

Describe the bug

On my M1 MacBook Pro, the latest archey4 from pip reports my total disk space as more than 5x what it actually is (5.4TiB instead of 1 TB).

From a quick skim of the relevant source it looks like archey is written to automatically add together the sizes of different volumes, and since df on macOS appears to report the same disk multiple times (presumably a quirk of how macOS handles logical volumes) my guess is archey is accidentally summing these all together. Note that I haven't done anything fancy with my partitioning, my drive is exactly as it was formatted/partitioned from the factory.

Expected behavior

I expected it to correctly report the size of my internal drive.

Screenshots

Screen Shot 2022-08-06 at 12 56 02 PM

Here's what `df` returns on my Mac. As you can see, there's a lot of exact duplicates of the same drive. I guess the simplest fix would be to ignore all disks that aren't mounted as `/` or don't have mount points in `/Volumes` (where normal internal/external partitions are mounted)?

Screen Shot 2022-08-06 at 1 05 21 PM

Thanks in advance!

Environment

  • Version used (4.Y.Z) : 4.13.4
  • Method of installation (distribution package, PyPI, Homebrew, sources) : PyPI
  • Hardware type (laptop, server, Raspberry, hyper-visor) : 14" MacBook Pro (2021, M1 Pro)
  • Python version (3.Y.Z) : 3.8.12
  • Operating system and version : macOS 12.4 Monterey
  • Graphical environment name and version : Aqua
  • Connectivity (off-line, LAN only, Internet access) : Internet access

Additional context

pkg_resources.DistributionNotFound: The 'archey4==4.7.0' distribution was not found and is required by the application

Screenshots
If applicable, add screenshots to help explain your problem.

Environment
Please complete the following information.

  • Version used (4.Y.Z) : archey4-4.7.0-2.noarch.rpm
  • Method of installation (distribution package, PIP, sources) : dnf install
  • Hardware type (laptop, server, Raspberry, hyper-visor) : Virtual Box
  • Python version (3.Y.Z) : python 3.8.2
  • Operating system and version : Fedora 32
  • Graphical environment name and version : KDE Plasma 5.18
  • Connectivity (off-line, LAN only, Internet access) : Internet access

Additional context

First, I download the .rpm file, then install it

sudo dnf install ./archey4-4.7.0-2.noarch.rpm

when I type archey in terminal, I occured following output:

Traceback (most recent call last):
  File "/usr/bin/archey4", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3259, in <module>
    def _initialize_master_working_set():
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3242, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3271, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 584, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 901, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 787, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'archey4==4.7.0' distribution was not found and is required by the application

Hope you can help me solve the problems

Script crashes in CPU class on ARM-based installs

Expected behavior

The archey script will run and display CPU information.

Current behavior

Archey crashes with the following traceback:

[petracvv@archrock lib]$ archey
Traceback (most recent call last):
  File "/usr/bin/archey", line 1081, in <module>
    main()
  File "/usr/bin/archey", line 1075, in main
    output.append(key.name, key.value().value)
  File "/usr/bin/archey", line 836, in __init__
    re.search('(?<=model name\t: ).*', file.read()).group(0)
AttributeError: 'NoneType' object has no attribute 'group'

Possible solution

Parse the lscpu program output instead of /proc/cpuinfo output as the output of /proc/cpuinfo is much less informative on ARM architectures.

Example output of /proc/cpuinfo on my hardware:

[petracvv@archrock lib]$ cat /proc/cpuinfo
processor       : 0
BogoMIPS        : 48.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd03
CPU revision    : 4

processor       : 1
BogoMIPS        : 48.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd03
CPU revision    : 4

processor       : 2
BogoMIPS        : 48.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd03
CPU revision    : 4

processor       : 3
BogoMIPS        : 48.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd03
CPU revision    : 4

Example output of lscpu:

[petracvv@archrock lib]$ lscpu
Architecture:        aarch64
Byte Order:          Little Endian
CPU(s):              4
On-line CPU(s) list: 0-3
Thread(s) per core:  1
Core(s) per socket:  4
Socket(s):           1
Vendor ID:           ARM
Model:               4
Model name:          Cortex-A53
Stepping:            r0p4
CPU max MHz:         1296.0000
CPU min MHz:         408.0000
BogoMIPS:            48.00
L1d cache:           unknown size
L1i cache:           unknown size
L2 cache:            unknown size
Flags:               fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid

Your environment

  • Version used (4.x.y) : 4.4.0
  • Hardware type (Laptop, Server, Raspberry, ...) : Rock64 ARM64 board
  • Operating System and version : ArchARM using a aarch64 build
  • Environment name and version :
  • Connectivity (Off-line, LAN only, Internet access, ...) : Internet access

Wrong hostname command parameter

Expected behavior

I looked through the code and especially the networking detection. I found that you want to primarily use hostname -I to check for the LAN IP.

Current behavior

However, after checking there is no such command as hostname -I and thus it will always choose the slow workaround.
I don't actually know what would be a nice and fast replacement though.

Possible solution

Use wget -qO- https://v4.ident.me/ to easily get the ipv4. That's the same method like the ipv6 workaround but is rather slow and crude.

Your environment

  • Version used (4.x.y) : Latest
  • Hardware type (Laptop, Server, Raspberry, ...) : Laptop
  • Operating System and version : Arch x86_64
  • Connectivity (Off-line, LAN only, Internet access, ...) : Standard Internet access

[FEATURE] BSD Support

Is your feature request related to a problem? Please describe.
Add official support for the BSDs (e.g. OpenBSD, FreeBSD, and maybe macOS since it's a BSD descendant and acts similar to the BSDs).

This pretty much means:

  • Fix bugs stopping Archey from running on BSD-based OSes.
  • Add ASCII art for those OSes (will be fixed by #78).
  • Add functionality to entries to ensure they still work in BSD.

I think starting with OpenBSD/FreeBSD support is a good baseline since these OSes and their derivatives make up the majority of BSD users.

Describe the solution you'd like
Currently, the following modules access /proc filesystems and cause Archey to crash running on a BSD-based OS:

  • Uptime - may will be fixed by #66.
  • Model - due to use of /proc/cpuinfo to check for a Raspberry Pi (fixed by a089b80).
  • CPU - due to use of /proc/cpuinfo for CPU info (fixed by aab4046)
  • RAM - due to fallback to /proc/meminfo since free is missing (fixed by a1d0f27).

These entries access information which is all contained within the sysctl command on BSD, therefore hopefully the fixes for these crashes are fairly easy.

These entries currently fail gracefully:

  • CPU - Undetected, we'll have to go through sysctl (fixed by a3b6d36)
  • Disk - occurs due to --args being an invalid format for the df implementation in BSD. Linked to #62, may be fixed by #67.
  • RAM - free is still... missing here ๐Ÿ™„ (fixed by 2047505)
  • Packages - the BSD package managers aren't present in the module ๐Ÿ˜ƒ (fixed by #77).
  • GPU (FreeBSD) - FreeBSD has pciconf but no pci-utils (so no lspci) (fixed by 162e608).
  • Temperature - need to use sysctl (and enable temperature driver on FreeBSD) (fixed by 93de654).

I haven't got a DE or WM running under BSD, so the DesktopEnvironment and WindowManager entries may or may not work.

And, of course, we could do with some nice art to go with this support ๐Ÿ˜. Of course, FreeBSD already has some suitable looking art on its boot screen:
image

Additional context

I'll do some experimentation with OpenBSD and FreeBSD and provide some more information on distro module output and sysctl values we will need.

[Question] What do you means with "iStats" for Highly recommended packages on macOS ?

Hello,
This is a question about what you wrote on Highly recommended packages section for macOS.
What do you mean with "iStats" ?
Do you mean iStats Menu ? If yes, how can I use it to get temperature on my MBA M2 ? (I don't really understand what to put in the config.json...

PS : I have already installed iStats Menu ;)

Thanks in advance.

Arch Linux identified as Linux

In the following screenshot you can see that Archey4 and lsb_release -d both return Arch Linux. This being the case why does Archey4 display the Linux penguin graphic instead of the Arch Linux one?

screenshot_2017-06-18_20-09-20

[FEATURE] Better terminal detection

Is your feature request related to a problem? Please describe.
At the moment the detected terminal for xterm-compliant terminal emulators is always xterm-256color. It would be nice if this could display the actual terminal emulator in use, e.g. Konsole, gnome-terminal, xterm, terminator, xfce4-terminal, etc...

Ideas for implementing this are:

  • Determine the terminal emulator based on parent processes of our process.
    • Could possibly require recursion (e.g. screen sessions)
    • Might not always give a desired result (SSH/mosh?)
  • Use known environment variables to determine the terminal emulator
    • e.g. Konsole has $KONSOLE_VERSION, I imagine other terminal emulators also have similar environment variables.
    • Messy! Would require a big list of all possibilities... ๐Ÿ˜ซ
  • Use X11 to determine current active window (and therefore terminal emulator)
    • e.g. xprop tool.
    • Brings in another dependency...
    • Won't work if the terminal emulator opens in the background.
    • Also won't work on headless systems, or via SSH/mosh.
    • Wayland incompatible (e.g. Fedora)

[FEATURE] Change the Color from the Output

Describe the solution you'd like

The possibility to adjust the color of the font of the output. Maybe in the Config file with hex color codes or something like that.
Something like
Default
[RED]Hostname: [White]Homeserver
Custom
[Cyan]Hostname: [Yellow]Homeserver

[BUG] in README

Describe the bug

Line 278 reads:

// Use `sensors -A` to list the available chipsets on your system (e.g. `coretemp-isa-0000`, `acpitz-acpi-0`, ...).

For it to actually work it needs to be:

// Use `sensors -A` to list the available chipsets on your system (e.g. "coretemp-isa-0000", "acpitz-acpi-0", ...).

(Note the double quotes around the chipset names)

This may be a stupid thing but it gave this non-programmer no end of trouble until I tried double quotes out of desperation. If this is something everyone else already understands then please ignore my ignorance.

[BUG] `CPU` not detected on Raspberry Pi 4

CPU not being detected by archey.

On Debian bookworm arm64 (pi4)

Installed with sudo pip3 install archey4

Installed lm-sensors with sudo apt install lm-sensors

Not sure what else to install as have went through the dependency list?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.