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
09c341d8
Kaydet (Commit)
09c341d8
authored
Ara 05, 2021
tarafından
Hakan Dündar
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
New: limited support for ARM CPUs (System tab)
üst
49ddf5c0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
System.py
src/System.py
+15
-6
No files found.
src/System.py
Dosyayı görüntüle @
09c341d8
...
...
@@ -284,12 +284,21 @@ def system_initial_func():
break
# Get computer vendor, model, chassis information
with
open
(
"/sys/devices/virtual/dmi/id/sys_vendor"
)
as
reader
:
computer_vendor
=
reader
.
read
()
.
strip
()
with
open
(
"/sys/devices/virtual/dmi/id/product_name"
)
as
reader
:
computer_model
=
reader
.
read
()
.
strip
()
with
open
(
"/sys/devices/virtual/dmi/id/chassis_type"
)
as
reader
:
computer_chassis_type_value
=
reader
.
read
()
.
strip
()
try
:
# This information may not be available on some systems such as ARM CPU used motherboards.
with
open
(
"/sys/devices/virtual/dmi/id/sys_vendor"
)
as
reader
:
computer_vendor
=
reader
.
read
()
.
strip
()
except
FileNotFoundError
:
computer_vendor
=
"-"
try
:
# This information may not be available on some systems such as ARM CPU used motherboards.
with
open
(
"/sys/devices/virtual/dmi/id/product_name"
)
as
reader
:
computer_model
=
reader
.
read
()
.
strip
()
except
FileNotFoundError
:
computer_model
=
"-"
try
:
# This information may not be available on some systems such as ARM CPU used motherboards.
with
open
(
"/sys/devices/virtual/dmi/id/chassis_type"
)
as
reader
:
computer_chassis_type_value
=
reader
.
read
()
.
strip
()
except
FileNotFoundError
:
computer_chassis_type_value
=
2
# For more information about computer chassis types, see: "https://docs.microsoft.com/en-us/previous-versions/tn-archive/ee156537(v=technet.10)"
# "https://superuser.com/questions/877677/programatically-determine-if-an-script-is-being-executed-on-laptop-or-desktop"
...
...
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