Skip to content

Commit

Permalink
dnf5 for installed packages, makes swap warn so it will run on deskto…
Browse files Browse the repository at this point in the history
…p computers
  • Loading branch information
ribalba committed Jan 27, 2025
1 parent caf23a2 commit ca9ee09
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/hardware_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
[rpwr, 'Docker Info', 'docker info', r'(?P<o>.*)', re.IGNORECASE | re.DOTALL],
[rpwr, 'Docker Version', 'docker version', r'(?P<o>.*)', re.IGNORECASE | re.DOTALL],
[rpwr, 'Docker Containers', 'docker ps -a', r'(?P<o>.*)'],
#[rpwr, 'Installed System Packages', 'if [ -f /etc/lsb-release ]; then dpkg -l ; elif [ -f /etc/redhat-release ]; then dnf list installed ; fi', r'(?P<o>.*)', re.IGNORECASE | re.DOTALL],
[rpwr, 'Installed System Packages', 'if [ -f /etc/lsb-release ]; then dpkg -l ; elif [ -f /etc/redhat-release ]; then dnf list --installed -y; fi', r'(?P<o>.*)', re.IGNORECASE | re.DOTALL],
[rpwr, 'Installed Python Packages', f"{sys.executable} -m pip freeze", r'(?P<o>.*)', re.IGNORECASE | re.DOTALL],
[rpwr, 'Processes', '/usr/bin/ps -aux', r'(?P<o>.*)', re.IGNORECASE | re.DOTALL],
[
Expand Down
2 changes: 1 addition & 1 deletion lib/system_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def check_swap_disabled():
(check_docker_daemon, Status.ERROR, 'docker daemon', 'The docker daemon could not be reached. Are you running in rootless mode or have added yourself to the docker group? See installation: [See https://docs.green-coding.io/docs/installation/]'),
(check_containers_running, Status.WARN, 'running containers', 'You have other containers running on the system. This is usually what you want in local development, but for undisturbed measurements consider going for a measurement cluster [See https://docs.green-coding.io/docs/installation/installation-cluster/].'),
(check_utf_encoding, Status.ERROR, 'utf file encoding', 'Your system encoding is not set to utf-8. This is needed as we need to parse console output.'),
(check_swap_disabled, Status.ERROR, 'swap disabled', 'Your system uses a swap filesystem. This can lead to very instable measurements. Please disable swap.'),
(check_swap_disabled, Status.WARN, 'swap disabled', 'Your system uses a swap filesystem. This can lead to very instable measurements. Please disable swap.'),

]

Expand Down

0 comments on commit ca9ee09

Please sign in to comment.