sciveo 0.0.45__tar.gz → 0.0.46__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sciveo-0.0.45 → sciveo-0.0.46}/PKG-INFO +1 -1
- {sciveo-0.0.45 → sciveo-0.0.46}/sciveo/common/tools/hardware.py +10 -4
- {sciveo-0.0.45 → sciveo-0.0.46}/sciveo/monitoring/monitor.py +2 -3
- sciveo-0.0.46/sciveo/version.py +2 -0
- {sciveo-0.0.45 → sciveo-0.0.46}/sciveo.egg-info/PKG-INFO +1 -1
- sciveo-0.0.45/sciveo/version.py +0 -2
- {sciveo-0.0.45 → sciveo-0.0.46}/README.md +0 -0
- {sciveo-0.0.45 → sciveo-0.0.46}/sciveo/__init__.py +0 -0
- {sciveo-0.0.45 → sciveo-0.0.46}/sciveo/api/__init__.py +0 -0
- {sciveo-0.0.45 → sciveo-0.0.46}/sciveo/api/base.py +0 -0
- {sciveo-0.0.45 → sciveo-0.0.46}/sciveo/api/upload.py +0 -0
- {sciveo-0.0.45 → sciveo-0.0.46}/sciveo/common/__init__.py +0 -0
- {sciveo-0.0.45 → sciveo-0.0.46}/sciveo/common/configuration.py +0 -0
- {sciveo-0.0.45 → sciveo-0.0.46}/sciveo/common/model.py +0 -0
- {sciveo-0.0.45 → sciveo-0.0.46}/sciveo/common/optimizers.py +0 -0
- {sciveo-0.0.45 → sciveo-0.0.46}/sciveo/common/sampling.py +0 -0
- {sciveo-0.0.45 → sciveo-0.0.46}/sciveo/common/tools/__init__.py +0 -0
- {sciveo-0.0.45 → sciveo-0.0.46}/sciveo/common/tools/daemon.py +0 -0
- {sciveo-0.0.45 → sciveo-0.0.46}/sciveo/common/tools/formating.py +0 -0
- {sciveo-0.0.45 → sciveo-0.0.46}/sciveo/common/tools/logger.py +0 -0
- {sciveo-0.0.45 → sciveo-0.0.46}/sciveo/common/tools/synchronized.py +0 -0
- {sciveo-0.0.45 → sciveo-0.0.46}/sciveo/content/__init__.py +0 -0
- {sciveo-0.0.45 → sciveo-0.0.46}/sciveo/content/dataset.py +0 -0
- {sciveo-0.0.45 → sciveo-0.0.46}/sciveo/content/experiment.py +0 -0
- {sciveo-0.0.45 → sciveo-0.0.46}/sciveo/content/project.py +0 -0
- {sciveo-0.0.45 → sciveo-0.0.46}/sciveo/content/runner.py +0 -0
- {sciveo-0.0.45 → sciveo-0.0.46}/sciveo/monitoring/__init__.py +0 -0
- {sciveo-0.0.45 → sciveo-0.0.46}/sciveo/monitoring/start.py +0 -0
- {sciveo-0.0.45 → sciveo-0.0.46}/sciveo.egg-info/SOURCES.txt +0 -0
- {sciveo-0.0.45 → sciveo-0.0.46}/sciveo.egg-info/dependency_links.txt +0 -0
- {sciveo-0.0.45 → sciveo-0.0.46}/sciveo.egg-info/requires.txt +0 -0
- {sciveo-0.0.45 → sciveo-0.0.46}/sciveo.egg-info/top_level.txt +0 -0
- {sciveo-0.0.45 → sciveo-0.0.46}/setup.cfg +0 -0
- {sciveo-0.0.45 → sciveo-0.0.46}/setup.py +0 -0
- {sciveo-0.0.45 → sciveo-0.0.46}/test/test_configuration.py +0 -0
- {sciveo-0.0.45 → sciveo-0.0.46}/test/test_monitoring.py +0 -0
- {sciveo-0.0.45 → sciveo-0.0.46}/test/test_runner.py +0 -0
- {sciveo-0.0.45 → sciveo-0.0.46}/test/test_sampling.py +0 -0
|
@@ -32,19 +32,25 @@ def new_guid(num_characters=32):
|
|
|
32
32
|
|
|
33
33
|
class HardwareInfo:
|
|
34
34
|
def __init__(self):
|
|
35
|
-
self.data = {
|
|
36
|
-
"CPU": {"count": os.cpu_count()},
|
|
37
|
-
"RAM": format_memory_size(os.sysconf('SC_PAGE_SIZE') * os.sysconf('SC_PHYS_PAGES'))
|
|
38
|
-
}
|
|
35
|
+
self.data = {}
|
|
39
36
|
|
|
40
37
|
self.get_cpu()
|
|
38
|
+
self.get_ram()
|
|
41
39
|
|
|
42
40
|
def __call__(self):
|
|
43
41
|
return self.data
|
|
44
42
|
|
|
43
|
+
def get_ram(self):
|
|
44
|
+
try:
|
|
45
|
+
self.data["RAM"] = format_memory_size(os.sysconf('SC_PAGE_SIZE') * os.sysconf('SC_PHYS_PAGES'))
|
|
46
|
+
except Exception:
|
|
47
|
+
pass
|
|
48
|
+
|
|
45
49
|
def get_cpu(self):
|
|
46
50
|
list_keys = ["model name", "stepping", "cpu MHz", "cache size", "siblings", "cpu cores", "bogomips"]
|
|
47
51
|
try:
|
|
52
|
+
self.data["CPU"] = {"count": os.cpu_count()}
|
|
53
|
+
|
|
48
54
|
cpu_info = {}
|
|
49
55
|
with open('/proc/cpuinfo', 'r') as file:
|
|
50
56
|
lines = file.readlines()
|
|
@@ -31,9 +31,7 @@ class BaseMonitor(DaemonBase):
|
|
|
31
31
|
|
|
32
32
|
self.data = HardwareInfo()()
|
|
33
33
|
self.data.setdefault("CPU", {})
|
|
34
|
-
self.data["RAM"] = {
|
|
35
|
-
"installed": self.data["RAM"]
|
|
36
|
-
}
|
|
34
|
+
self.data["RAM"] = {}
|
|
37
35
|
self.data["LOG"] = {}
|
|
38
36
|
self.list_logs = []
|
|
39
37
|
|
|
@@ -77,6 +75,7 @@ class BaseMonitor(DaemonBase):
|
|
|
77
75
|
self.data["RAM"]["used"] = memory.used
|
|
78
76
|
self.data["RAM"]["total"] = memory.total
|
|
79
77
|
self.data["RAM"]["free"] = memory.free
|
|
78
|
+
self.data["RAM"]["installed"] = format_memory_size(memory.total)
|
|
80
79
|
self.data["RAM"]["print"] = f"total: {format_memory_size(memory.total)} used: {format_memory_size(memory.used)}"
|
|
81
80
|
|
|
82
81
|
def getserial(self):
|
sciveo-0.0.45/sciveo/version.py
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|