NEWS
(Gelöst) Auslesen ioBroker Hosts Systeminformationen?
-
@mcu wo hast du das hergezaubert ?
-
@liv-in-sky
https://github.com/ioBroker/ioBroker.admin/blob/master/packages/admin/src/src/tabs/Hosts.tsx#L122Es wäre sinnvoll ein Feature Request für iobroker.js-controller zu erstellen, so dass auch die Docker Infos in dem richtigen OS-Pfad landen?
-
aber ich finde die info nicht - ist die unter system.adapter.admin ?
ich habe proxmox, daher kann ich nicht suchen
-
@liv-in-sky Nein. Das war nur ein Hinweis, wo es im Admin gesetzt wird. Da kommt man aber so nicht dran.
Deswegen ist da ein Feature Request für den js-controller bzw. Admin sinnvoll.
Je nach dem wer die Daten in die system-Pfade schreibt. -
danke dir
aber ich schätze mal, das man sich die "image" version anzeigen lassen kann, welches gerade läuft - auf consolen ebene
aber das soll sich jmd ansehen, der docker nutzt - sowas kommt mir nicht ins haus
-
@oli Was zeigt dies an?
const { exec } = require('child_process'); exec('cat /opt/scripts/.docker_config/.thisisdocker', (error, stdout, stderr) => { if (error) { console.error(`Fehler: ${error.message}`); return; } if (stderr) { console.error(`stderr: ${stderr}`); return; } console.log(`CPU-Informationen:\n${stdout}`); }); exec('cat /proc/cpuinfo', (error, stdout, stderr) => { if (error) { console.error(`Fehler: ${error.message}`); return; } if (stderr) { console.error(`stderr: ${stderr}`); return; } console.log(`CPU-Informationen:\n${stdout}`); });
-
@liv-in-sky sagte in Auslesen ioBroker Hosts Systeminformationen?:
aber ich schätze mal, das man sich die "image" version anzeigen lassen kann, welches gerade läuft - auf consolen ebene
Ja, die Version kann man auslesen.
Steht u.a. im Code zu 'iob diag' drin, welche Datei die Info drin hat. -
@mcu
hier kommt folgende Ausgabe:script.js.common.System.Skript_1: CPU-Informationen: processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 55 model name : Intel(R) Celeron(R) CPU J1900 @ 1.99GHz stepping : 8 microcode : 0x82d cpu MHz : 2000.002 cache size : 1024 KB physical id : 0 siblings : 4 core id : 0 cpu cores : 4 apicid : 0 initial apicid : 0 fpu : yes fpu_exception : yes cpuid level : 11 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology tsc_reliable nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 movbe popcnt tsc_deadline_timer rdrand lahf_lm 3dnowprefetch epb pti tpr_shadow vnmi flexpriority ept vpid tsc_adjust smep erms dtherm arat vmx flags : vnmi preemption_timer invvpid ept_x_only flexpriority tsc_offset vtpr mtf vapic ept vpid unrestricted_guest bugs : cpu_meltdown spectre_v1 spectre_v2 mds msbds_only bogomips : 4000.00 clflush size : 64 cache_alignment : 64 address sizes : 36 bits physical, 48 bits virtual power management: processor : 1 vendor_id : GenuineIntel cpu family : 6 model : 55 model name : Intel(R) Celeron(R) CPU J1900 @ 1.99GHz stepping : 8 microcode : 0x82d cpu MHz : 2000.000 cache size : 1024 KB physical id : 0 siblings : 4 core id : 1 cpu cores : 4 apicid : 2 initial apicid : 2 fpu : yes fpu_exception : yes cpuid level : 11 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology tsc_reliable nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 movbe popcnt tsc_deadline_timer rdrand lahf_lm 3dnowprefetch epb pti tpr_shadow vnmi flexpriority ept vpid tsc_adjust smep erms dtherm arat vmx flags : vnmi preemption_timer invvpid ept_x_only flexpriority tsc_offset vtpr mtf vapic ept vpid unrestricted_guest bugs : cpu_meltdown spectre_v1 spectre_v2 mds msbds_only bogomips : 4000.00 clflush size : 64 cache_alignment : 64 address sizes : 36 bits physical, 48 bits virtual power management: processor : 2 vendor_id : GenuineIntel cpu family : 6 model : 55 model name : Intel(R) Celeron(R) CPU J1900 @ 1.99GHz stepping : 8 microcode : 0x82d cpu MHz : 2000.002 cache size : 1024 KB physical id : 0 siblings : 4 core id : 2 cpu cores : 4 apicid : 4 initial apicid : 4 fpu : yes fpu_exception : yes cpuid level : 11 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology tsc_reliable nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 movbe popcnt tsc_deadline_timer rdrand lahf_lm 3dnowprefetch epb pti tpr_shadow vnmi flexpriority ept vpid tsc_adjust smep erms dtherm arat vmx flags : vnmi preemption_timer invvpid ept_x_only flexpriority tsc_offset vtpr mtf vapic ept vpid unrestricted_guest bugs : cpu_meltdown spectre_v1 spectre_v2 mds msbds_only bogomips : 4000.00 clflush size : 64 cache_alignment : 64 address sizes : 36 bits physical, 48 bits virtual power management: processor : 3 vendor_id : GenuineIntel cpu family : 6 model : 55 model name : Intel(R) Celeron(R) CPU J1900 @ 1.99GHz stepping : 8 microcode : 0x82d cpu MHz : 2000.000 cache size : 1024 KB physical id : 0 siblings : 4 core id : 3 cpu cores : 4 apicid : 6 initial apicid : 6 fpu : yes fpu_exception : yes cpuid level : 11 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology tsc_reliable nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 movbe popcnt tsc_deadline_timer rdrand lahf_lm 3dnowprefetch epb pti tpr_shadow vnmi flexpriority ept vpid tsc_adjust smep erms dtherm arat vmx flags : vnmi preemption_timer invvpid ept_x_only flexpriority tsc_offset vtpr mtf vapic ept vpid unrestricted_guest bugs : cpu_meltdown spectre_v1 spectre_v2 mds msbds_only bogomips : 4000.00 clflush size : 64 cache_alignment : 64 address sizes : 36 bits physical, 48 bits virtual power management:
-
@oli Mal nur das
const { exec } = require('child_process'); exec('cat /opt/scripts/.docker_config/.thisisdocker', (error, stdout, stderr) => { if (error) { console.error(`Fehler: ${error.message}`); return; } if (stderr) { console.error(`stderr: ${stderr}`); return; } console.log(`CPU-Informationen:\n${stdout}`); });
-
@mcu
hier kommt folgenden:script.js.common.System.Skript_1: CPU-Informationen: v9.1.1
Super, das ist es, vielen herzlichen Dank!!!
-
@oli sagte in (Gelöst) Auslesen ioBroker Hosts Systeminformationen?:
Hallo zusammen,
in den Reiter "Hosts" werden Systeminformationen angezeigt, welche teilweise als Datenpunkte aufgeführt werden, leider fehlen mir da ein paar Infos.Ist es möglich folgende Informationen über ein Skript auszulesen?
Plattform: docker (official image - v9.1.1) Betriebssystem: linux Architektur: x64 CPUs: 4 Geschwindigkeit: 2000 MHz Modell: Intel(R) Celeron(R) CPU J1900 @ 1.99GHz RAM: 7.6 GB
Hier mal wieder eine JSONATA Lösung, um aus dem Text ein Objekt zu erstellen:
-
@mickym sagte in (Gelöst) Auslesen ioBroker Hosts Systeminformationen?:
Hier mal wieder eine JSONATA Lösung,
Der Knackpunkt ist aber diese Informationen, die du jetzt als Text vorgibst, dem System zu entlocken
-
@homoran Na ja er hat das ja im Anfangspost so vorgegeben. Im Prinzip funktioniert der Code, solange die Ausgabe mit Zeilenumbrüchen - also jeder Parameter eine Zeile ist und nach dem Schema im Text - Eigenschaft: Wert
Aber gut - das ist dann ein anderes Problem - ich dachte ohne jetzt alles zu lesen, dass diese Ausgabe gegeben sei.
-
@oli Hab es mal beim Admin als Feature rein gesetzt.
https://github.com/ioBroker/ioBroker.admin/issues/2476 -
@mickym
ich wollte die Informationen dem System entlocken, aber trotzdem Danke für deine Unterstützung -
@mcu
Vielen Dank