Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
System Monitoring Center
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Kayıtlar (commit)
Kenar çubuğunu aç
Hakan Dündar
System Monitoring Center
Commits
95214506
Kaydet (Commit)
95214506
authored
Eki 08, 2023
tarafından
Hakan Dündar
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Several improvements
üst
0fcbee72
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
50 deletions
+32
-50
README.md
README.md
+1
-1
system-monitoring-center.pot
po/system-monitoring-center.pot
+0
-0
Common.py
src/Common.py
+9
-21
Libsysmon.py
src/Libsysmon.py
+16
-22
SensorsMenu.py
src/SensorsMenu.py
+6
-6
No files found.
README.md
Dosyayı görüntüle @
95214506
...
...
@@ -95,7 +95,7 @@
-
Supports ARM architecture
-
Hardware accelerated GUI
-
Free and open source
-
Note: GPU columns on Processes tab require
`amdpu_top>v0.2.0`
or its build from latest source code.
-
Note: GPU columns on Processes tab require
`amd
g
pu_top>v0.2.0`
or its build from latest source code.
### Installation:
-
There are several options for using System Monitoring Center:
...
...
po/system-monitoring-center.pot
Dosyayı görüntüle @
95214506
This diff is collapsed.
Click to expand it.
src/Common.py
Dosyayı görüntüle @
95214506
...
...
@@ -417,10 +417,10 @@ def title_label(text):
def
menu_title_label
(
text
):
label
=
Gtk
.
Label
()
label
.
set_label
(
text
)
label
.
set_halign
(
Gtk
.
Align
.
CENTER
)
label
.
add_css_class
(
"heading"
)
label
.
set_margin_bottom
(
10
)
label
.
add_css_class
(
"heading"
)
label
.
set_label
(
text
)
return
label
...
...
@@ -454,9 +454,9 @@ def static_information_label(text):
"""
label
=
Gtk
.
Label
()
label
.
set_label
(
text
)
label
.
set_ellipsize
(
Pango
.
EllipsizeMode
.
END
)
label
.
set_halign
(
Gtk
.
Align
.
START
)
label
.
set_label
(
text
)
return
label
...
...
@@ -464,10 +464,10 @@ def static_information_label(text):
def
static_information_bold_label
(
text
):
label
=
Gtk
.
Label
()
label
.
set_label
(
text
)
label
.
set_ellipsize
(
Pango
.
EllipsizeMode
.
END
)
label
.
add_css_class
(
"heading"
)
label
.
set_halign
(
Gtk
.
Align
.
START
)
label
.
add_css_class
(
"heading"
)
label
.
set_label
(
text
)
return
label
...
...
@@ -478,8 +478,8 @@ def static_information_label_no_ellipsize(text):
"""
label
=
Gtk
.
Label
()
label
.
set_label
(
text
)
label
.
set_halign
(
Gtk
.
Align
.
START
)
label
.
set_label
(
text
)
return
label
...
...
@@ -492,8 +492,8 @@ def static_information_label_wrap_selectable(text):
label
=
Gtk
.
Label
()
label
.
set_wrap
(
True
)
label
.
set_selectable
(
True
)
label
.
set_label
(
text
)
label
.
set_halign
(
Gtk
.
Align
.
START
)
label
.
set_label
(
text
)
return
label
...
...
@@ -505,10 +505,10 @@ def dynamic_information_label():
label
=
Gtk
.
Label
()
label
.
set_selectable
(
True
)
label
.
set_label
(
"--"
)
label
.
set_ellipsize
(
Pango
.
EllipsizeMode
.
END
)
label
.
add_css_class
(
"heading"
)
label
.
set_halign
(
Gtk
.
Align
.
START
)
label
.
add_css_class
(
"heading"
)
label
.
set_label
(
"--"
)
return
label
...
...
@@ -552,9 +552,6 @@ def da_upper_lower_label(text, alignment):
def
performance_summary_headerbar_label
(
text
):
"""
Generate Label for performance summary on the window headerbar.
"""
label
=
Gtk
.
Label
()
label
.
set_halign
(
Gtk
.
Align
.
START
)
...
...
@@ -565,9 +562,6 @@ def performance_summary_headerbar_label(text):
def
menu_separator
():
"""
Generate horizontal separator for menus.
"""
separator
=
Gtk
.
Separator
(
orientation
=
Gtk
.
Orientation
.
HORIZONTAL
)
separator
.
set_margin_top
(
3
)
...
...
@@ -577,9 +571,6 @@ def menu_separator():
def
settings_window_separator
():
"""
Generate horizontal separator for menus.
"""
separator
=
Gtk
.
Separator
(
orientation
=
Gtk
.
Orientation
.
HORIZONTAL
)
separator
.
set_margin_top
(
5
)
...
...
@@ -836,9 +827,6 @@ def current_tab_refresh(action, parameter, main_window_object):
def
searchentry
(
function
):
"""
Generate SearchEntry.
"""
searchentry
=
Gtk
.
SearchEntry
()
searchentry
.
props
.
placeholder_text
=
_tr
(
"Search..."
)
...
...
src/Libsysmon.py
Dosyayı görüntüle @
95214506
...
...
@@ -27,13 +27,13 @@ memory_page_size = os.sysconf("SC_PAGE_SIZE")
disk_sector_size
=
512
# GPU Transfer rate (link speed) units are GT/s.
gpu_
transfer_rate_
pci_express_version_dict
=
{
"2.5"
:
"PCI-Express 1.0"
,
"5.0"
:
"PCI-Express 2.0"
,
"8.0"
:
"PCI-Express 3.0"
,
"16.0"
:
"PCI-Express 4.0"
,
"32.0"
:
"PCI-Express 5.0"
,
"64.0"
:
"PCI-Express 6.0"
,
"128.0"
:
"PCI-Express 7.0"
}
gpu_pci_express_version_dict
=
{
"2.5"
:
"PCI-Express 1.0"
,
"5.0"
:
"PCI-Express 2.0"
,
"8.0"
:
"PCI-Express 3.0"
,
"16.0"
:
"PCI-Express 4.0"
,
"32.0"
:
"PCI-Express 5.0"
,
"64.0"
:
"PCI-Express 6.0"
,
"128.0"
:
"PCI-Express 7.0"
}
# The content of the file is updated about 50-60 times in a second.
# 120 is used in order to get GPU load for AMD GPUs precisely.
...
...
@@ -3724,7 +3724,7 @@ def get_gpu_pci_express_version(gpu_device_path):
max_link_speed_unit
=
"-"
if
max_link_speed_unit
in
[
"GT/s"
,
"GT/S"
,
"gt/s"
]:
gpu_pci_express_version
=
gpu_
transfer_rate_
pci_express_version_dict
[
max_link_speed_number
]
gpu_pci_express_version
=
gpu_pci_express_version_dict
[
max_link_speed_number
]
else
:
gpu_pci_express_version
=
"-"
...
...
@@ -3866,7 +3866,10 @@ def get_sensors_information(temperature_unit="celsius"):
with
open
(
"/sys/class/hwmon/"
+
sensor_group
+
"/"
+
attribute
+
string_sensor_number
+
"_max"
)
as
reader
:
max_value
=
int
(
reader
.
read
()
.
strip
())
if
attribute
==
"temp"
:
max_value
=
f
'{(max_value / 1000):.0f} °C'
if
temperature_unit
==
"celsius"
:
max_value
=
f
'{(max_value / 1000):.0f} °C'
elif
temperature_unit
==
"fahrenheit"
:
max_value
=
f
'{((max_value / 1000)*9/5)+32:.0f} °F'
if
attribute
==
"fan"
:
max_value
=
f
'{max_value} RPM'
if
attribute
==
"in"
:
...
...
@@ -3883,7 +3886,10 @@ def get_sensors_information(temperature_unit="celsius"):
with
open
(
"/sys/class/hwmon/"
+
sensor_group
+
"/"
+
attribute
+
string_sensor_number
+
"_crit"
)
as
reader
:
critical_value
=
int
(
reader
.
read
()
.
strip
())
if
attribute
==
"temp"
:
critical_value
=
f
'{(critical_value / 1000):.0f} °C'
if
temperature_unit
==
"celsius"
:
critical_value
=
f
'{(critical_value / 1000):.0f} °C'
elif
temperature_unit
==
"fahrenheit"
:
critical_value
=
f
'{((critical_value / 1000)*9/5)+32:.0f} °F'
if
attribute
==
"fan"
:
critical_value
=
f
'{critical_value} RPM'
if
attribute
==
"in"
:
...
...
@@ -5145,18 +5151,6 @@ def get_current_gtk_version():
return
current_gtk_version
def
get_current_tk_version
():
"""
Get Tk (Tkinter) version which is used for this application.
"""
import
tkinter
as
tk
current_tk_version
=
tk
.
TkVersion
return
current_tk_version
def
get_installed_apt_rpm_pacman_apk_packages
():
"""
Get number of installed APT, RPM or pacman packages.
...
...
src/SensorsMenu.py
Dosyayı görüntüle @
95214506
...
...
@@ -45,20 +45,20 @@ class SensorsMenu:
main_grid
.
attach
(
label
,
0
,
2
,
1
,
1
)
# CheckButton (Celsius)
self
.
temperature_unit_celsius_cb
=
Common
.
checkbutton
(
_tr
(
"Celsius"
)
,
None
)
self
.
temperature_unit_celsius_cb
=
Common
.
checkbutton
(
"°C"
,
None
)
main_grid
.
attach
(
self
.
temperature_unit_celsius_cb
,
0
,
3
,
1
,
1
)
# CheckButton (Fahrenheit)
self
.
temperature_unit_fahrenheit_cb
=
Common
.
checkbutton
(
_tr
(
"Fahrenheit"
)
,
self
.
temperature_unit_celsius_cb
)
main_grid
.
attach
(
self
.
temperature_unit_fahrenheit_cb
,
0
,
4
,
1
,
1
)
self
.
temperature_unit_fahrenheit_cb
=
Common
.
checkbutton
(
"°F"
,
self
.
temperature_unit_celsius_cb
)
main_grid
.
attach
(
self
.
temperature_unit_fahrenheit_cb
,
1
,
3
,
1
,
1
)
# Separator
separator
=
Common
.
menu_separator
()
main_grid
.
attach
(
separator
,
0
,
5
,
2
,
1
)
main_grid
.
attach
(
separator
,
0
,
4
,
2
,
1
)
# Button (Reset)
self
.
reset_button
=
Common
.
reset_button
()
main_grid
.
attach
(
self
.
reset_button
,
0
,
6
,
2
,
1
)
main_grid
.
attach
(
self
.
reset_button
,
0
,
5
,
2
,
1
)
# Connect signals
self
.
reset_button
.
connect
(
"clicked"
,
self
.
on_reset_button_clicked
)
...
...
@@ -131,7 +131,7 @@ class SensorsMenu:
if
Config
.
temperature_unit
==
"celsius"
:
self
.
temperature_unit_celsius_cb
.
set_active
(
True
)
if
Config
.
temperature_unit
==
"fahrenheit"
:
self
.
temperature_unit_fahrenheit_cb
.
set_active
(
Fals
e
)
self
.
temperature_unit_fahrenheit_cb
.
set_active
(
Tru
e
)
SensorsMenu
=
SensorsMenu
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment