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.
Files changed (38) hide show
  1. {sciveo-0.0.45 → sciveo-0.0.46}/PKG-INFO +1 -1
  2. {sciveo-0.0.45 → sciveo-0.0.46}/sciveo/common/tools/hardware.py +10 -4
  3. {sciveo-0.0.45 → sciveo-0.0.46}/sciveo/monitoring/monitor.py +2 -3
  4. sciveo-0.0.46/sciveo/version.py +2 -0
  5. {sciveo-0.0.45 → sciveo-0.0.46}/sciveo.egg-info/PKG-INFO +1 -1
  6. sciveo-0.0.45/sciveo/version.py +0 -2
  7. {sciveo-0.0.45 → sciveo-0.0.46}/README.md +0 -0
  8. {sciveo-0.0.45 → sciveo-0.0.46}/sciveo/__init__.py +0 -0
  9. {sciveo-0.0.45 → sciveo-0.0.46}/sciveo/api/__init__.py +0 -0
  10. {sciveo-0.0.45 → sciveo-0.0.46}/sciveo/api/base.py +0 -0
  11. {sciveo-0.0.45 → sciveo-0.0.46}/sciveo/api/upload.py +0 -0
  12. {sciveo-0.0.45 → sciveo-0.0.46}/sciveo/common/__init__.py +0 -0
  13. {sciveo-0.0.45 → sciveo-0.0.46}/sciveo/common/configuration.py +0 -0
  14. {sciveo-0.0.45 → sciveo-0.0.46}/sciveo/common/model.py +0 -0
  15. {sciveo-0.0.45 → sciveo-0.0.46}/sciveo/common/optimizers.py +0 -0
  16. {sciveo-0.0.45 → sciveo-0.0.46}/sciveo/common/sampling.py +0 -0
  17. {sciveo-0.0.45 → sciveo-0.0.46}/sciveo/common/tools/__init__.py +0 -0
  18. {sciveo-0.0.45 → sciveo-0.0.46}/sciveo/common/tools/daemon.py +0 -0
  19. {sciveo-0.0.45 → sciveo-0.0.46}/sciveo/common/tools/formating.py +0 -0
  20. {sciveo-0.0.45 → sciveo-0.0.46}/sciveo/common/tools/logger.py +0 -0
  21. {sciveo-0.0.45 → sciveo-0.0.46}/sciveo/common/tools/synchronized.py +0 -0
  22. {sciveo-0.0.45 → sciveo-0.0.46}/sciveo/content/__init__.py +0 -0
  23. {sciveo-0.0.45 → sciveo-0.0.46}/sciveo/content/dataset.py +0 -0
  24. {sciveo-0.0.45 → sciveo-0.0.46}/sciveo/content/experiment.py +0 -0
  25. {sciveo-0.0.45 → sciveo-0.0.46}/sciveo/content/project.py +0 -0
  26. {sciveo-0.0.45 → sciveo-0.0.46}/sciveo/content/runner.py +0 -0
  27. {sciveo-0.0.45 → sciveo-0.0.46}/sciveo/monitoring/__init__.py +0 -0
  28. {sciveo-0.0.45 → sciveo-0.0.46}/sciveo/monitoring/start.py +0 -0
  29. {sciveo-0.0.45 → sciveo-0.0.46}/sciveo.egg-info/SOURCES.txt +0 -0
  30. {sciveo-0.0.45 → sciveo-0.0.46}/sciveo.egg-info/dependency_links.txt +0 -0
  31. {sciveo-0.0.45 → sciveo-0.0.46}/sciveo.egg-info/requires.txt +0 -0
  32. {sciveo-0.0.45 → sciveo-0.0.46}/sciveo.egg-info/top_level.txt +0 -0
  33. {sciveo-0.0.45 → sciveo-0.0.46}/setup.cfg +0 -0
  34. {sciveo-0.0.45 → sciveo-0.0.46}/setup.py +0 -0
  35. {sciveo-0.0.45 → sciveo-0.0.46}/test/test_configuration.py +0 -0
  36. {sciveo-0.0.45 → sciveo-0.0.46}/test/test_monitoring.py +0 -0
  37. {sciveo-0.0.45 → sciveo-0.0.46}/test/test_runner.py +0 -0
  38. {sciveo-0.0.45 → sciveo-0.0.46}/test/test_sampling.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sciveo
3
- Version: 0.0.45
3
+ Version: 0.0.46
4
4
  Description-Content-Type: text/markdown
5
5
  Provides-Extra: mon
6
6
 
@@ -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):
@@ -0,0 +1,2 @@
1
+
2
+ __version__ = '0.0.46'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sciveo
3
- Version: 0.0.45
3
+ Version: 0.0.46
4
4
  Description-Content-Type: text/markdown
5
5
  Provides-Extra: mon
6
6
 
@@ -1,2 +0,0 @@
1
-
2
- __version__ = '0.0.45'
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