Open Ed3n18 opened 3 months ago
Your server likely doesn't have WMIC or PS enabled.
This is not a txadmin bug.
edit: yes, it's a txAdmin bug
Do you mean the Windows Management Instrumentation Service and PowerShell?
Yes.
For further support, please join discord.gg/txAdmin
I have no problem going to Discord, but don't you want other people to find this in the future?
I have the WMI service up and running and tried using PowerShell to run FXServer.exe and it still shows the error
If you go to System -> Console Log it will show you more information.
This is a known issue for servers where pidusage cannot get the information.
This is caused by linux servers not having procps (ps util) installed, and on windows when there is some error accessing PS or WMIC.
Unless you find out the issue is something else, there is not really much for me to add.
Its strange cause i have both, but i have read that WMIC is deprecated so maybe thats it? but im not sure i you can enable it manually. I will investigate "Error: spawn wmic ENOENT" further.
This is the error, which says wmic.
Ahh I see...
Beginning with Windows Server 2025, WMIC is available as a feature on demand (FoD) which can be added with the DISM /Add-Capability command.
Apparently the same applies to Windows 11.
The bad news is that the libraries that I use are abandoned and they wont be updated to support the new PS WMI thingy, meaning a fix for this issue is really not expected in the short or near future.
The good news is that for the next update, I already changed the svRuntime monitoring thingy to not print errors, and to only call WMIC once instead of twice, so it should not spam these errors.
And I think WMIC is not used anywhere else other than the diagnostics page, and to detect the OS name (with PS fallback).
So, althought this issue is solvable, I guess no reason to prioritize doing any changes other than what was already done.
Thank you for letting me know, I'm adding adding this to the infinitely growing TO-DO list.
For now, I recommend you just install the additional windows feature.
Okay so there are 3 ways to fix this;
After that I added "%SystemRoot%\System32\Wbem" to User PATH
Now txAdmin shows "FXServer Memory" which before it didn't. Also would be nice to see CPU Usage? :)
Thank you for helping!
Wanted to post here because I know others are going to be searching for this. Also put this in the txAdmin Discord.
Hey all, in case anyone is looking for the fix to having this error on a pterodactyl linux branch: [tx:WebServer:DiagnosticsFuncs] Error getting processes tree usage data.
I have found a fix. Just use this fivem egg from Luxxy-GF (it's a bit different from the base parkervcp version) It appears her docker image fixes things. (I've modified the variables slightly for my own ease of use, but the egg is perfectly fine by itself.) https://github.com/Luxxy-GF/pterodactyl-fivem
Hope this helps someone! I've seen a lot of people asking about this issue in this server, wanted to point to a solution for all.
Perker's version fixes the issue, but most hosts haven't updated their egg in years.
Perker's version fixes the issue, but most hosts haven't updated their egg in years.
I am my own host and was not able to replicate the fix with parker's egg unfortunately. I don't know if that's a me thing or not, but this new one seems to work for me. 🤷
I guess I should highlight that "parker's egg" is now on another link. Looks like he moved the repo.
This is the referenced commit: https://github.com/pelican-eggs/yolks/commit/57e3ef41ed05109f5e693d2e0d648cf4b161f72c
But Luxxy-GF's image sounds way leaner, so might be worth trying to use it as well.
Who knows... one day I might roll out my own dockerfile and egg.
(note to future self)
How to use Get-WmiObject
to get the data:
Get-WmiObject Win32_Process -Filter 'ProcessId=18340 or ProcessId=29624' |
Select-Object Name,CommandLine,CreationDate,KernelModeTime,ParentProcessId,ProcessId,UserModeTime,WorkingSetSize |
ConvertTo-Json
Calculating (consider the values are in 100ns intervals)
CPU Usage (%) = [((UserModeTime2 + KernelModeTime2) - (UserModeTime1 + KernelModeTime1)) / 10,000,000] / (Total Time Elapsed * Number of Cores) * 100
Instead of calculating using the number of cores available, perhaps it's worth to calculate using the max number of cores used by fxserver?
txAdmin/FXServer versions: txAdmin: v7.2.2 FxServer: b9073
Describe the bug An error appears on the CMD console after server loads correctly "[tx:WebServer:DiagnosticsFuncs] Error getting processes tree usage data."
To Reproduce Steps to reproduce the behavior:
Expected behavior Shouldn't be any errors
Screenshots
Additional context Server is hosted on Windows Server 2025, might be a problem getting system info?