-
Notifications
You must be signed in to change notification settings - Fork 26
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
Added python and system packages listing #430
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as off-topic.
This comment was marked as off-topic.
Eco-CI Output:
📈 Energy graph:
6.84 ┤ ╭───╮ ╭╮ ╭╮ ╭──╮ ╭╮╭─╮ ╭──╮ ╭─╮
6.35 ┤ │ │ ││ ╭╯│ ╭╮ │ ╰╮ ╭╮ ╭╮ │╰╯ ╰─╮ │ ╰╮│ │
5.86 ┤ │ │ ││ ╭╮ ╭─╮ ╭╯ │ ││ │ │ ╭╯╰─╯│ │ ╰╮ │ ╰╯ │ ╭╮
5.37 ┤ ╭─╯ │ ╭╮ ╭╯│ ╭╯╰╮ │ │ │ │ │╰╮ ╭╯ │ ╭╯ │ │ │╭╯ │ ╭╮╭╮││ ╭╮ ╭╮ ╭╮ ╭╮ ╭╮ ╭╮ ╭
4.88 ┤ │ ╰╮│╰──╮╭────╮ ╭╮╭╮╭╯ ╰──────────╮╭──╯ ╰─╯ │ ╭──╮╭╮╭─╮ ╭─╮ ╭──╮ ╭─╯ ╰─╯ │ ╭╮╭╮ │ │ │ │ │ ││ │ │││││╰─╮ ╭╮ ╭╮ ││ ││ ╭╮ ╭╮││ ││ ╭╮ ││ ╭╮ ╭╮ ╭╮ ╭╮ ││ ╭╮ ╭╮ │
4.39 ┤ ╭╯ ╰╯ ╰╯ ╰──╯╰╯╰╯ ╰╯ │╭╯ ╰╯╰╯ ╰─╯ ╰╮ │ ╰─╯ ╰╮││││╭╮│ ╰─╯ │ ╭╯ ╰╯ │ │││╰╯ │ ╭╯│ ╭╮ ││ ╭─╮ ╭─╮ ││ ╭╮ ╭─╮ ╭─╮ ││ ╭╮ │╰╮ ││││ ╭╮││ ╭╮││ ╭─╮ ╭╮ ╭─╯│ ╭╮ ││ ╭╮ ││ ╭╮ ╭╮ ││ │╰╮ ││╭╮ ╭─╮ ││ ╭──╯│ ╭╯
3.90 ┤ │ ││ │ │ ╰╯╰╯││╰╯ │╭╮│ │ ╭╯╰╯ ╰╮ ╭─╮ ╭╮ ╭╯ │ │╰╮ │╰╮ │ ╰╮ │ │ │╰╮ ╭╯│ │ │ │ │ │╰╮ ╭─╮ │╰╮ ╭─╮ │ │ │╰╯╰╮ ╭╮ ╭╯╰╯│ ╭╮ │╰╯│ ╭╮ ╭─╯ │ ╭╯│╭╮ ╭╮ │ │ ╭╯│ ╭╮ ╭─╯╰╮ ││╭╮ ╭╮ ╭─╯╰╮ ╭╮╭╮ ╭╮ ╭─╯│ ││ │╰╮ ╭╮ ╭╮ │ ╰╮ ╭╯╰╯│╭╮ │ │ ╭╯│ ╭─╮ ╭─╮ ╭╯ │ ╭─╮ ╭╮ ╭╯
3.41 ┤ ╭╯ ╰╯ │ │ ││ ││││ ╰╮ │ │ ╭╯ ╰─╮ │╰╮│ │ │ │ │ │ │ │ ╭╯ │ │ ╰╮ │ │ │ │ │ │ │ ╰╮ │ │ ╭╮ │ │ │ │ ╭╯ │ │ │ ╭─╮ │╰╮│ │ ╭╮ ╭╯│╭╯ │ ╭╮ │╰╮│ │ │ │││ ╭╯│ │ │ │ │╭╮ │╰╮│ │ ╭╯╰╯│ │╰╮│ │ ╭╯╰╯╰╮ │╰╮│ │ ││ │ ╰╮ ╭╯│ ││ │ │ │ ╰╯│ ╭╮ │ │ │ │╭╮ ╭╯ │ ╭╯ ╰╮ ╭╮│ │ │ ╰╮ │╰╮│
2.92 ┤ │ │ │ ╰╯ ╰╯││ │ │ │ │ │ │ ││ │ │ │ ╭╯ ╰╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╭╮ │ ╰╮ ││ │ │ │ │ │ │ │ │ │ │ │ ││ │ ││ │ ││ │ ╭╯│ │ ││ │ ╭╯ ╰╯│ │ │╭╯ │ │ ╰╯│ │ ││ │ │ ╰╮ │ ││ │ │ │ │ ││ │ ╭╯╰╮ │ │ │ │ ╭╯│ │ │ ╭╯ │ ││ │ ╰╮ │ │││ ╭╮│ │ │ ╰─╮ │││ │ ╭╯ ╰╮ ╭╮ │ ││
2.43 ┼╮ │ │ │ ││ │ │ │ ╭╮╭─╮ │ │ │ ││ ╰╮ ╭╮ ╭╯ │ ╭╮ ╭╯ │ │ ╰╮ │ │ ╭╯ │ ╭╯ │ │ │ ╭─╯ ╰─╮ │ │ ││╭╯ │ ╭╯│ ╭╯ │ ╭─╯ │ │ ╰╮ ╭╯ │ ╭╮ ╭╯ │ │ ││ │ ││ │ ││ │ │ │╭╮ │ ││ │ ╭╮ │ │ ╭╮ │ ╰╯ ╰╮╭╮ │ │ ╭╮ │ ││ │ │ │ │ ││ │ │ │ │ ││ │ ╭╯ │ ╭╯ │ ╭╯ │ ╭╮ │ │ ╭─╯ │ ╭╮│ │ │╰╮│ │ │ │││ │││ │ ╭╮ │ │ │││ │ │ │ ││ │ ││
1.94 ┤╰───╯ ╰────╯ ╰╯ ╰──────╯ ╰─╯╰╯ ╰─╯ ╰───────╯ ╰╯ ╰──╯╰───╯ ╰──╯╰───╯ ╰────────╯ ╰───────╯ ╰────────╯ ╰───────╯ ╰─────────╯ ╰───────╯ ╰───────╯ ╰─────╯╰╯ ╰─╯ ╰───╯ ╰───────╯ ╰────────╯ ╰───────╯ ╰───╯╰──╯ ╰───────╯ ╰╯ ╰─────────╯╰───────╯ ╰╯ ╰────────╯ ╰╯╰─────╯ ╰╯ ╰─╯╰────╯ ╰───╯╰──╯ ╰╯╰─────╯ ╰────╯╰─╯ ╰╯ ╰───────╯ ╰───────╯ ╰╯ ╰───────╯ ╰───────╯ ╰╯ ╰───────╯ ╰───────╯ ╰───────╯ ╰─────╯╰─╯ ╰───────╯ ╰─────╯╰╯ ╰───────╯ ╰╯ ╰───────╯ ╰╯╰───────╯╰╯ ╰─╯╰────╯ ╰──────╯╰╯ ╰───────╯ ╰─╯╰────╯ ╰╯
Watts over time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works on fedora. The only thing is why are you using the | cat ?
lib/hardware_info.py
Outdated
@@ -77,6 +78,9 @@ def read_directory_recursive(directory): | |||
[rpwr, 'Hardware Model', '/usr/bin/hostnamectl', r'Hardware Model:\s*(?P<o>.*)'], | |||
[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 | cat ; elif [ -f /etc/redhat-release ]; then dnf list installed | cat; fi', r'(?P<o>.*)', re.IGNORECASE | re.DOTALL], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you using | cat
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
happy to take recommendations here. dpkg -l
gives me an ncurses
window when I call it unpiped. This is why I feed it to cat just to get an output.
This test was only on the command line actually. I did not test if the implied pipe to Python is sufficient. Will post an update
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't check the ubuntu one only the fedora command. Here you don't need the cat
@ribalba Can you please check if this works on Fedora.
I was not sure if I should do
dnf list installed
orrpm -qa
.Also I hacked it into a bash query, which I think is nicer than doing it in python. Or did you plan already for a mechanism to make that if/else smoother in Python?
Demo Run with data: https://metrics.green-coding.berlin/stats.html?id=7b635c8e-5dbc-4bc2-b2c5-99d373cce558