Add additional system info (#1078)

This commit is contained in:
LordGrey 2020-11-14 16:34:31 +01:00 committed by GitHub
parent 758d9a70c5
commit d5a1e7d19d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 78 additions and 60 deletions

View File

@ -13,28 +13,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Provide additional details on Hardware/CPU information - Provide additional details on Hardware/CPU information
- Allow execution with option "--version", while another hyperion daemon is running - Allow execution with option "--version", while another hyperion daemon is running
- New language support: Russian and Chinese (simplified) (#1005) - New language support: Russian and Chinese (simplified) (#1005)
- added libcec to deb/rpm dependency list - Added libcec to deb/rpm dependency list
- updated some language files - Updated some language files
- New LED Device SK9822 (#1005) - New LED Device SK9822 (#1005)
- Support SK9822 type LEDs with adaptive brightness control via SPI (#1017) - Support SK9822 type LEDs with adaptive brightness control via SPI (#1017)
- Provide additional details on Hardware/CPU information (#1045) - Provide additional details on Hardware/CPU information (#1045)
Allow execution with option "--version", while another hyperion daemon is running - Allow execution with option "--version", while another hyperion daemon is running
- New blackbar detection mode "Letterbox", that considers only bars at the top and bottom of picture - New blackbar detection mode "Letterbox", that considers only bars at the top and bottom of picture
- Systray icons added - Issue #925 (#1040) - Systray icons added - Issue #925 (#1040)
- DirectX9 Grabber (#1039) - DirectX9 Grabber (#1039)
- Added DirectX SDK to CompileHowto - Added DirectX SDK to CompileHowto
- Hide Systray on exit & Install DirectX Redistributable - Hide Window Systray icon on Hyperion exit & Install DirectX Redistributable
- Read-Only configuration database suppor - Read-Only configuration database support
### Changed ### Changed
- boblight: reduce cpu time spent on memcopy and parsing rgb values (#1016) - boblight: reduce cpu time spent on memcopy and parsing rgb values (#1016)
- Windows Installer/Uninstaller notification when Hyperion is running (#1033) - Windows Installer/Uninstaller notification when Hyperion is running (#1033)
- Updated Windows Dependencies - Updated Windows Dependencies
- cleanup packages.cmake & extend NSIS plugin directory - Cleanup packages.cmake & extend NSIS plugin directory
- Optimize images (#1058) - Optimize images (#1058)
- Update LICENSE - Update LICENSE
- Change links from http to https (#1067) - Change links from http to https (#1067)
- UI: Separate LED-Layout creation from UI code - UI: Separate LED-Layout creation from UI code
- Docs: Refreshed EN JSON API documentation - Docs: Refreshed EN JSON API documentation
@ -45,7 +44,7 @@ Allow execution with option "--version", while another hyperion daemon is runnin
- Fix #1007 - LED's retain last state after clearing a source (#1008) - Fix #1007 - LED's retain last state after clearing a source (#1008)
- Fix Lightpack issue #1015 (#1049) - Fix Lightpack issue #1015 (#1049)
- Fix #771 color calibration for Kodi 18 (#1044) - Fix #771 color calibration for Kodi 18 (#1044)
- Fix various JSON API issues #1022, #1019, #997, #993, #992, #976, #969, #964, #980 (#1036) - Fix various JSON API issues (#1036)
- Fix issue #909, Have ratio correction first and then scale (#1047) - Fix issue #909, Have ratio correction first and then scale (#1047)
- Fix display argument in hyperion-qt (#1027) - Fix display argument in hyperion-qt (#1027)
- Fix typos (#1051) - Fix typos (#1051)

View File

@ -35,33 +35,35 @@
var sys = window.sysInfo.system; var sys = window.sysInfo.system;
var shy = window.sysInfo.hyperion; var shy = window.sysInfo.hyperion;
var info = "<pre>Hyperion Server: \n"; var info = "<pre>Hyperion Server: \n";
info += '- Build: ' + shy.build + '\n'; info += '- Build: ' + shy.build + '\n';
info += '- Build time: ' + shy.time + '\n'; info += '- Build time: ' + shy.time + '\n';
info += '- Git Remote: ' + shy.gitremote + '\n'; info += '- Git Remote: ' + shy.gitremote + '\n';
info += '- Version: ' + shy.version + '\n'; info += '- Version: ' + shy.version + '\n';
info += '- UI Lang: ' + storedLang + ' (BrowserLang: ' + navigator.language + ')\n'; info += '- UI Lang: ' + storedLang + ' (BrowserLang: ' + navigator.language + ')\n';
info += '- UI Access: ' + storedAccess + '\n'; info += '- UI Access: ' + storedAccess + '\n';
//info += 'Log lvl: ' + window.serverConfig.logger.level + '\n'; //info += '- Log lvl: ' + window.serverConfig.logger.level + '\n';
info += '- Avail Capt: ' + window.serverInfo.grabbers.available + '\n'; info += '- Avail Capt: ' + window.serverInfo.grabbers.available + '\n';
info += '- Database: ' + (shy.readOnlyMode ? "ready-only" : "read/write") + '\n'; info += '- Database: ' + (shy.readOnlyMode ? "ready-only" : "read/write") + '\n';
info += '\n'; info += '\n';
info += 'Hyperion Server OS: \n'; info += 'Hyperion Server OS: \n';
info += '- Distribution: ' + sys.prettyName + '\n'; info += '- Distribution: ' + sys.prettyName + '\n';
info += '- Architecture: ' + sys.architecture + '\n'; info += '- Architecture: ' + sys.architecture + '\n';
if (sys.cpuModelName) if (sys.cpuModelName)
info += '- CPU Model: ' + sys.cpuModelName + '\n'; info += '- CPU Model: ' + sys.cpuModelName + '\n';
if (sys.cpuModelType) if (sys.cpuModelType)
info += '- CPU Type: ' + sys.cpuModelType + '\n'; info += '- CPU Type: ' + sys.cpuModelType + '\n';
if (sys.cpuRevision) if (sys.cpuRevision)
info += '- CPU Revision: ' + sys.cpuRevision + '\n'; info += '- CPU Revision: ' + sys.cpuRevision + '\n';
if (sys.cpuHardware) if (sys.cpuHardware)
info += '- CPU Hardware: ' + sys.cpuHardware + '\n'; info += '- CPU Hardware: ' + sys.cpuHardware + '\n';
info += '- Kernel: ' + sys.kernelType + ' (' + sys.kernelVersion + ' (WS: ' + sys.wordSize + '))\n'; info += '- Kernel: ' + sys.kernelType + ' (' + sys.kernelVersion + ' (WS: ' + sys.wordSize + '))\n';
info += '- Browser: ' + navigator.userAgent + ' </pre>'; info += '- Qt Version: ' + sys.qtVersion + '\n';
info += '- Python Version: ' + sys.pyVersion + '\n';
info += '- Browser: ' + navigator.userAgent + ' </pre>';
var fc = ['<span id="danger_trig">' + $.i18n("about_version") + '<span>', $.i18n("about_build"), $.i18n("about_builddate"), $.i18n("about_translations"), $.i18n("about_resources", $.i18n("general_webui_title")), "System info (Github Issue)", $.i18n("about_3rd_party_licenses")]; var fc = ['<span id="danger_trig">' + $.i18n("about_version") + '<span>', $.i18n("about_build"), $.i18n("about_builddate"), $.i18n("about_translations"), $.i18n("about_resources", $.i18n("general_webui_title")), "System info (Github Issue)", $.i18n("about_3rd_party_licenses")];
var sc = [currentVersion, si.build, si.time, '(' + availLang.length + ')<p>' + lang + '</p><p><a href="https://github.com/hyperion-project/hyperion.ng" target="_blank">' + $.i18n("about_contribute") + '</a></p>', libh, info, '<pre><div id="3rdpartylicenses" style="overflow:scroll;max-height:400px"></div></pre>']; var sc = [currentVersion, si.build, si.time, '(' + availLang.length + ')<p>' + lang + '</p><p><a href="https://github.com/hyperion-project/hyperion.ng" target="_blank">' + $.i18n("about_contribute") + '</a></p>', libh, info, '<pre><div id="3rdpartylicenses" style="overflow:scroll;max-height:400px"></div></pre>'];

View File

@ -73,30 +73,32 @@ $(document).ready(function() {
//create general info //create general info
info = "### GENERAL ### \n"; info = "### GENERAL ### \n";
info += 'Build: '+shy.build+'\n'; info += 'Build: '+shy.build+'\n';
info += 'Build time: '+shy.time+'\n'; info += 'Build time: '+shy.time+'\n';
info += 'Version: '+shy.version+'\n'; info += 'Version: '+shy.version+'\n';
info += 'UI Lang: '+storedLang+' (BrowserL: '+navigator.language+')\n'; info += 'UI Lang: '+storedLang+' (BrowserL: '+navigator.language+')\n';
info += 'UI Access: '+storedAccess+'\n'; info += 'UI Access: '+storedAccess+'\n';
info += 'Log lvl: '+window.serverConfig.logger.level+'\n'; info += 'Log lvl: '+window.serverConfig.logger.level+'\n';
info += 'Avail Capt: '+window.serverInfo.grabbers.available+'\n'; info += 'Avail Capt: '+window.serverInfo.grabbers.available+'\n';
info += 'Database: '+(shy.readOnlyMode ? "ready-only" : "read/write")+'\n'; info += 'Database: '+(shy.readOnlyMode ? "ready-only" : "read/write")+'\n';
info += '\n'; info += '\n';
info += 'Distribution:'+sys.prettyName+'\n'; info += 'Distribution: '+sys.prettyName+'\n';
info += 'Architecture:'+sys.architecture+'\n'; info += 'Architecture: '+sys.architecture+'\n';
if (sys.cpuModelName) if (sys.cpuModelName)
info += 'CPU Model: ' + sys.cpuModelName + '\n'; info += 'CPU Model: ' + sys.cpuModelName + '\n';
if (sys.cpuModelType) if (sys.cpuModelType)
info += 'CPU Type: ' + sys.cpuModelType + '\n'; info += 'CPU Type: ' + sys.cpuModelType + '\n';
if (sys.cpuRevision) if (sys.cpuRevision)
info += 'CPU Revision:' + sys.cpuRevision + '\n'; info += 'CPU Revision: ' + sys.cpuRevision + '\n';
if (sys.cpuHardware) if (sys.cpuHardware)
info += 'CPU Hardware:' + sys.cpuHardware + '\n'; info += 'CPU Hardware: ' + sys.cpuHardware + '\n';
info += 'Kernel: '+sys.kernelType+' ('+sys.kernelVersion+' (WS: '+sys.wordSize+'))\n'; info += 'Kernel: ' + sys.kernelType+' ('+sys.kernelVersion+' (WS: '+sys.wordSize+'))' + '\n';
info += 'Browser/OS: '+navigator.userAgent+'\n\n'; info += 'Qt Version: ' + sys.qtVersion + '\n';
info += 'Python Version: ' + sys.pyVersion + '\n';
info += 'Browser/OS: ' + navigator.userAgent + '\n\n';
//create prios //create prios
info += "### PRIORITIES ### \n"; info += "### PRIORITIES ### \n";

View File

@ -21,6 +21,8 @@ public:
QString prettyName; QString prettyName;
QString hostName; QString hostName;
QString domainName; QString domainName;
QString qtVersion;
QString pyVersion;
}; };
static HyperionSysInfo get(); static HyperionSysInfo get();

View File

@ -285,6 +285,8 @@ void JsonAPI::handleSysInfoCommand(const QJsonObject &, const QString &command,
system["prettyName"] = data.prettyName; system["prettyName"] = data.prettyName;
system["hostName"] = data.hostName; system["hostName"] = data.hostName;
system["domainName"] = data.domainName; system["domainName"] = data.domainName;
system["qtVersion"] = data.qtVersion;
system["pyVersion"] = data.pyVersion;
info["system"] = system; info["system"] = system;
QJsonObject hyperion; QJsonObject hyperion;

View File

@ -1,5 +1,17 @@
# Define the current source locations # Define the current source locations
# Include the python directory. Also include the parent (which is for example /usr/include)
# which may be required when it is not includes by the (cross-) compiler by default.
if (NOT CMAKE_VERSION VERSION_LESS "3.12")
find_package(Python3 COMPONENTS Interpreter Development REQUIRED)
include_directories(${Python3_INCLUDE_DIRS} ${Python3_INCLUDE_DIRS}/..)
add_compile_definitions(PYTHON_VERSION_MAJOR_MINOR=${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR})
else()
find_package (PythonLibs ${PYTHON_VERSION_STRING} EXACT) # Maps PythonLibs to the PythonInterp version of the main cmake
include_directories(${PYTHON_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS}/..)
add_definitions(-DPYTHON_VERSION_MAJOR_MINOR=${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR})
endif()
SET(CURRENT_HEADER_DIR ${CMAKE_SOURCE_DIR}/include/utils) SET(CURRENT_HEADER_DIR ${CMAKE_SOURCE_DIR}/include/utils)
SET(CURRENT_SOURCE_DIR ${CMAKE_SOURCE_DIR}/libsrc/utils) SET(CURRENT_SOURCE_DIR ${CMAKE_SOURCE_DIR}/libsrc/utils)
@ -15,6 +27,7 @@ add_library(hyperion-utils
target_link_libraries(hyperion-utils target_link_libraries(hyperion-utils
hyperion hyperion
python
Qt5::Core Qt5::Core
Qt5::Gui Qt5::Gui
Qt5::Network Qt5::Network

View File

@ -1,3 +1,6 @@
// Python includes
#include <Python.h>
#include "utils/SysInfo.h" #include "utils/SysInfo.h"
#include "utils/FileUtils.h" #include "utils/FileUtils.h"
@ -23,6 +26,8 @@ SysInfo::SysInfo()
_sysinfo.hostName = QHostInfo::localHostName(); _sysinfo.hostName = QHostInfo::localHostName();
_sysinfo.domainName = QHostInfo::localDomainName(); _sysinfo.domainName = QHostInfo::localDomainName();
getCPUInfo(); getCPUInfo();
_sysinfo.qtVersion = QT_VERSION_STR;
_sysinfo.pyVersion = PY_VERSION;
} }
SysInfo::HyperionSysInfo SysInfo::get() SysInfo::HyperionSysInfo SysInfo::get()

View File

@ -137,7 +137,7 @@ HyperionDaemon::HyperionDaemon(const QString rootPath, QObject *parent, bool log
// ---- grabber ----- // ---- grabber -----
#if !defined(ENABLE_DISPMANX) && !defined(ENABLE_OSX) && !defined(ENABLE_FB) && !defined(ENABLE_X11) && !defined(ENABLE_XCB) && !defined(ENABLE_AMLOGIC) && !defined(ENABLE_QT) && !defined(ENABLE_DX) #if !defined(ENABLE_DISPMANX) && !defined(ENABLE_OSX) && !defined(ENABLE_FB) && !defined(ENABLE_X11) && !defined(ENABLE_XCB) && !defined(ENABLE_AMLOGIC) && !defined(ENABLE_QT) && !defined(ENABLE_DX)
Warning(_log, "No platform capture can be instantiated, because all grabbers have been left out from the build"); Info(_log, "No platform capture supported on this platform");
#endif #endif
// init system capture (framegrabber) // init system capture (framegrabber)
@ -595,7 +595,7 @@ void HyperionDaemon::handleSettingsUpdate(settings::type settingsType, const QJs
connect(this, &HyperionDaemon::videoMode, _v4l2Grabber, &V4L2Wrapper::setVideoMode); connect(this, &HyperionDaemon::videoMode, _v4l2Grabber, &V4L2Wrapper::setVideoMode);
connect(this, &HyperionDaemon::settingsChanged, _v4l2Grabber, &V4L2Wrapper::handleSettingsUpdate); connect(this, &HyperionDaemon::settingsChanged, _v4l2Grabber, &V4L2Wrapper::handleSettingsUpdate);
#else #else
Error(_log, "The v4l2 grabber can not be instantiated, because it has been left out from the build"); Debug(_log, "The v4l2 grabber is not supported on this platform");
#endif #endif
} }
} }
@ -612,7 +612,7 @@ void HyperionDaemon::createGrabberDispmanx()
Info(_log, "DISPMANX frame grabber created"); Info(_log, "DISPMANX frame grabber created");
#else #else
Error(_log, "The dispmanx framegrabber can not be instantiated, because it has been left out from the build"); Debug(_log, "The dispmanx framegrabber is not supported on this platform");
#endif #endif
} }
@ -628,7 +628,7 @@ void HyperionDaemon::createGrabberAmlogic()
Info(_log, "AMLOGIC grabber created"); Info(_log, "AMLOGIC grabber created");
#else #else
Error(_log, "The AMLOGIC grabber can not be instantiated, because it has been left out from the build"); Debug(_log, "The AMLOGIC grabber is not supported on this platform");
#endif #endif
} }
@ -647,7 +647,7 @@ void HyperionDaemon::createGrabberX11(const QJsonObject &grabberConfig)
Info(_log, "X11 grabber created"); Info(_log, "X11 grabber created");
#else #else
Error(_log, "The X11 grabber can not be instantiated, because it has been left out from the build"); Debug(_log, "The X11 grabber is not supported on this platform");
#endif #endif
} }
@ -666,7 +666,7 @@ void HyperionDaemon::createGrabberXcb(const QJsonObject &grabberConfig)
Info(_log, "XCB grabber created"); Info(_log, "XCB grabber created");
#else #else
Error(_log, "The XCB grabber can not be instantiated, because it has been left out from the build"); Debug(_log, "The XCB grabber is not supported on this platform");
#endif #endif
} }
@ -685,7 +685,7 @@ void HyperionDaemon::createGrabberQt(const QJsonObject &grabberConfig)
Info(_log, "Qt grabber created"); Info(_log, "Qt grabber created");
#else #else
Error(_log, "The Qt grabber can not be instantiated, because it has been left out from the build"); Debug(_log, "The Qt grabber is not supported on this platform");
#endif #endif
} }
@ -704,7 +704,7 @@ void HyperionDaemon::createGrabberDx(const QJsonObject &grabberConfig)
Info(_log, "DirectX grabber created"); Info(_log, "DirectX grabber created");
#else #else
Error(_log, "The DirectX grabber can not be instantiated, because it has been left out from the build"); Debug(_log, "The DirectX is not supported on this platform");
#endif #endif
} }
@ -722,7 +722,7 @@ void HyperionDaemon::createGrabberFramebuffer(const QJsonObject &grabberConfig)
Info(_log, "Framebuffer grabber created"); Info(_log, "Framebuffer grabber created");
#else #else
Error(_log, "The framebuffer grabber can not be instantiated, because it has been left out from the build"); Debug(_log, "The framebuffer is not supported on this platform");
#endif #endif
} }
@ -740,7 +740,7 @@ void HyperionDaemon::createGrabberOsx(const QJsonObject &grabberConfig)
Info(_log, "OSX grabber created"); Info(_log, "OSX grabber created");
#else #else
Error(_log, "The osx grabber can not be instantiated, because it has been left out from the build"); Debug(_log, "The osx grabber is not supported on this platform");
#endif #endif
} }
@ -761,6 +761,6 @@ void HyperionDaemon::createCecHandler()
Info(_log, "CEC handler created"); Info(_log, "CEC handler created");
#else #else
Error(_log, "The CEC handler can not be instantiated, because it has been left out from the build"); Debug(_log, "The CEC handler is not supported on this platform");
#endif #endif
} }

View File

@ -256,14 +256,6 @@ int main(int argc, char** argv)
return 0; return 0;
} }
if (parser.isSet(versionOption))
{
std::cout
<< "Hyperion Ambilight Daemon" << std::endl
<< "\tVersion : " << HYPERION_VERSION << " (" << HYPERION_BUILD_ID << ")" << std::endl
<< "\tBuild Time: " << __DATE__ << " " << __TIME__ << std::endl;
}
if (parser.isSet(exportEfxOption)) if (parser.isSet(exportEfxOption))
{ {
Q_INIT_RESOURCE(EffectEngine); Q_INIT_RESOURCE(EffectEngine);
@ -393,6 +385,7 @@ int main(int argc, char** argv)
} }
Info(log,"Starting Hyperion - %s, %s, built: %s:%s", HYPERION_VERSION, HYPERION_BUILD_ID, __DATE__, __TIME__); Info(log,"Starting Hyperion - %s, %s, built: %s:%s", HYPERION_VERSION, HYPERION_BUILD_ID, __DATE__, __TIME__);
Debug(log,"QtVersion [%s]", QT_VERSION_STR);
if ( !readonlyMode ) if ( !readonlyMode )
{ {