diff --git a/checks/linux.py b/checks/linux.py
index 016e659..ac5429e 100644
--- a/checks/linux.py
+++ b/checks/linux.py
@@ -222,4 +222,6 @@ def checkLinuxSystemInfo(lines):
desktopEnvironment = 'None'
linuxSystemInfoHelp += '
No Desktop Environment detected. This can lead to undefined behavior. Please consult your Desktop Environment\'s or Window Manager\'s support channels on how to fix this.'
- return [logLevel, linuxDistroOrFlatpak + ' | ' + displayServer + ' | ' + desktopEnvironment, linuxSystemInfoHelp]
+ if logLevel == LEVEL_WARNING:
+ linuxDistroOrFlatpak = 'Warning: ' + linuxDistroOrFlatpak
+ return [LEVEL_SYSTEM, linuxDistroOrFlatpak + ' | ' + displayServer + ' | ' + desktopEnvironment, linuxSystemInfoHelp]
diff --git a/checks/macos.py b/checks/macos.py
index 8a6d52c..ee72ddb 100644
--- a/checks/macos.py
+++ b/checks/macos.py
@@ -51,18 +51,18 @@ def checkMacVer(lines):
if (int(verinfo["major"]) <= 10 and "max" in verinfo):
msg = "You are running %s %s, which is multiple versions out of date and no longer supported by Apple or recent OBS versions. We recommend updating to the latest macOS release to ensure continued security, functionality and compatibility." % (mv, html.escape(verinfo["name"]))
mv += " (EOL)"
- return [LEVEL_WARNING, mv, msg]
+ return [LEVEL_SYSTEM, "Warning: " + mv, msg]
except (ValueError, OverflowError):
pass
if "latest" in verinfo:
msg = "You are running %s %s, which is currently supported by Apple and the most recent version of OBS." % (mv, html.escape(verinfo["name"]))
mv += " (OK)"
- return [LEVEL_INFO, mv, msg]
+ return [LEVEL_SYSTEM, mv, msg]
msg = "You are running %s %s, which is not officially supported by Apple but is compatible with the most recent version of OBS. Updating to a more recent version of macOS is recommended to ensure that you are able to install future versions of OBS." % (mv, html.escape(verinfo["name"]))
mv += " (OK)"
- return [LEVEL_INFO, mv, msg]
+ return [LEVEL_SYSTEM, mv, msg]
def checkRosettaTranslationStatus(lines):
diff --git a/checks/system.py b/checks/system.py
new file mode 100644
index 0000000..d7ee708
--- /dev/null
+++ b/checks/system.py
@@ -0,0 +1,45 @@
+import html
+import re
+
+from .vars import *
+from .utils.utils import *
+
+
+def checkCPUInfo(lines):
+ for label in ('CPU Name:', 'Processor:'):
+ cpuLines = search(label, lines)
+ for line in cpuLines:
+ name = line.split(label, 1)[1].strip()
+ if not name or (label == 'Processor:' and name.endswith(' logical cores')):
+ continue
+
+ name = html.escape(name)
+ return [LEVEL_SYSTEM, "CPU: " + name,
+ "CPU reported by OBS: " + name + "."]
+
+
+def checkGPUInfo(lines):
+ gpuLines = search('Loading up ', lines)
+ for line in reversed(gpuLines):
+ if 'Loading up D3D11 on adapter' not in line and 'Loading up OpenGL on adapter' not in line:
+ continue
+
+ name = line.split(' on adapter', 1)[1].strip()
+ if 'Loading up D3D11' in line:
+ name = re.sub(r'(^|\s+)\(\d+\)$', '', name).strip()
+ if not name:
+ continue
+
+ name = html.escape(name)
+ return [LEVEL_SYSTEM, "GPU: " + name,
+ "Adapter selected for OBS rendering: " + name + "."]
+
+
+def checkRAMInfo(lines):
+ memoryLines = search('Physical Memory:', lines)
+ for line in memoryLines:
+ match = re.search(r'Physical Memory:\s*([0-9]+)\s*MB\s+Total\b', line)
+ if match:
+ total = match.group(1)
+ return [LEVEL_SYSTEM, "RAM: " + total + " MB",
+ "Total physical memory reported by OBS: " + total + " MB."]
diff --git a/checks/vars.py b/checks/vars.py
index 969def6..eab48b2 100644
--- a/checks/vars.py
+++ b/checks/vars.py
@@ -14,5 +14,6 @@
LEVEL_WARNING = 2
LEVEL_CRITICAL = 3
LEVEL_NONE = 4
+LEVEL_SYSTEM = 5
cleanLog = "
To make a clean log file, please follow these steps:
1) Restart OBS.
2) Start your stream/recording for about 30 seconds. Make sure you replicate any issues as best you can, which means having any games/apps open and captured, etc.
3) Stop your stream/recording.
4) Select Help > Log Files > Upload Current Log File. Send that link via this troubleshooting tool or whichever support chat you are using."
diff --git a/checks/windows.py b/checks/windows.py
index c14b243..b6dff64 100644
--- a/checks/windows.py
+++ b/checks/windows.py
@@ -295,17 +295,17 @@ def checkWindowsVer(lines):
if verinfo["build"] > 22000:
msg = "You are running Windows 11 Insider build %d. Some checks that are applicable only to specific Windows versions will not be performed. Also, because Insider builds are test versions, you may have problems that would not happen with release versions of Windows 11." % (
verinfo["build"])
- return [LEVEL_WARNING, "Windows 11 Insider Build", msg]
+ return [LEVEL_SYSTEM, "Warning: Windows 11 Insider Build", msg]
else:
msg = "You are running an unknown Windows 10 release (build %d), which means you are probably using an Insider build. Some checks that are applicable only to specific Windows versions will not be performed. Also, because Insider builds are test versions, you may have problems that would not happen with release versions of Windows." % (
verinfo["build"])
- return [LEVEL_WARNING, "Windows 10 Version Unknown", msg]
+ return [LEVEL_SYSTEM, "Warning: Windows 10 Version Unknown", msg]
if "EoS" in verinfo and datetime.date.today() > verinfo["EoS"]:
wv = "%s (EOL)" % (html.escape(verinfo["name"]))
msg = "You are running %s, which has not been supported by Microsoft since %s. We recommend updating to the latest Windows release to ensure continued security, functionality, and compatibility." % (
html.escape(verinfo["name"]), verinfo["EoS"].strftime("%B %Y"))
- return [LEVEL_WARNING, wv, msg]
+ return [LEVEL_SYSTEM, "Warning: " + wv, msg]
# our windows version isn't out of support, so just say what version the user has and when
# it actually does go out of support
@@ -318,7 +318,7 @@ def checkWindowsVer(lines):
msg = "You are running %s, for which Microsoft has not yet announced an end of life date." % (
html.escape(verinfo["name"]))
- return [LEVEL_INFO, wv, msg]
+ return [LEVEL_SYSTEM, wv, msg]
def checkWindowsARM64(lines):
diff --git a/loganalyzer.py b/loganalyzer.py
index c19ec90..c261d24 100755
--- a/loganalyzer.py
+++ b/loganalyzer.py
@@ -12,6 +12,7 @@
from checks.network import *
from checks.plugins import *
from checks.sources import *
+from checks.system import *
from checks.linux import *
from checks.windows import *
@@ -34,6 +35,7 @@ def getSummary(messages):
critical = []
warning = []
info = []
+ system = []
for i in messages:
if (i[0] == LEVEL_CRITICAL):
critical.append(i[1])
@@ -41,9 +43,12 @@ def getSummary(messages):
warning.append(i[1])
elif (i[0] == LEVEL_INFO):
info.append(i[1])
+ elif (i[0] == LEVEL_SYSTEM):
+ system.append(i[1])
summary += "{}Critical: {}\n".format(RED, ", ".join(critical))
summary += "{}Warning: {}\n".format(YELLOW, ", ".join(warning))
summary += "{}Info: {}\n".format(CYAN, ", ".join(info))
+ summary += "{}System: {}\n".format(BLUE, ", ".join(system))
return summary
@@ -72,6 +77,13 @@ def getResults(messages):
results += "\n{}{}\n".format(CYAN, i[1])
results += textOutput(i[2])
+ results += "{} \n".format(RESET)
+ results += "\nSystem:"
+ for i in messages:
+ if (i[0] == 5):
+ results += "\n{}{}\n".format(BLUE, i[1])
+ results += textOutput(i[2])
+
results += "{} \n".format(RESET)
return results
@@ -128,6 +140,9 @@ def doAnalysis(url=None, filename=None):
messages.append(m)
if (not classic and not crash):
messages.extend([
+ checkCPUInfo(logLines),
+ checkGPUInfo(logLines),
+ checkRAMInfo(logLines),
checkObsVersion(logLines),
checkDual(logLines),
checkAutoconfig(logLines),
diff --git a/simplehttp.py b/simplehttp.py
index de48890..76f724f 100755
--- a/simplehttp.py
+++ b/simplehttp.py
@@ -13,6 +13,9 @@
with open("templates/detail.html", "r") as f: # Grab details page
htmlDetail = f.read()
+with open("templates/system-item.html", "r") as f:
+ htmlSystemItem = f.read()
+
def checkUrl(url):
"""Check if the incoming URL can be analyzed"""
@@ -24,6 +27,7 @@ def getSummaryHTML(messages):
critical = ""
warning = ""
info = ""
+ system = ""
for i in messages:
if (i[0] == 3):
critical = critical + """
""" + no_log + """
""") return response_body @@ -116,6 +135,7 @@ def genJsonResponse(url, detailed): critical = [] warning = [] info = [] + system = [] for i in msgs: entry = i[1] if detailed: @@ -126,7 +146,9 @@ def genJsonResponse(url, detailed): warning.append(entry) elif (i[0] == 1): info.append(entry) - return {"critical": critical, "warning": warning, "info": info} + elif (i[0] == 5): + system.append(entry) + return {"critical": critical, "warning": warning, "info": info, "system": system} def sync_request_handler(request): diff --git a/templates/index.html b/templates/index.html index 6fd5900..7c5c61e 100644 --- a/templates/index.html +++ b/templates/index.html @@ -46,6 +46,7 @@