-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
macOS Mojave 'stats' are broken #193
Comments
TO DO: Add a "default" RAM setting which can be changed by the user. When Monitorr can't get RAM total, will use default setting. |
Might be able to parse this command
sysctl hw.memsize
sysctl hw.ncpu
…Sent from my iPhone
On Mar 4, 2019, at 20:16, Sean Vreeland ***@***.***> wrote:
TO DO:
Add a "default" RAM setting which can be changed by the user. When Monitorr can't get RAM total, will use default setting.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
hey @Archigos can you send me a screenshot of your main settings page pls? |
To help out... I noticed you updated the Alpha branch a few hours ago so I made a second copy of Monitor from that branch and I'll do a better job documenting the changes I make to include my changes that worked above and will post here with the info later. |
@Archigos thanks my man. |
Your environment:
Describe your issue:Edit the file To fix CPU: Change: Lines 166-168
to: Lines 166-175
Marking To fix RAM: Add into
Add into
As you may notice, unlike the 'fix' I submitted prior, this one does To fix Uptime:
I think that's all of what I did before. Let me know if it all works or you need more info. |
I added the above lines into mine (also on Catalina) but it still throws out some errors. Granted I'm a total newbie to this. Any way you could upload your functions.php for me to copy? |
I'll provide the file, but curious at to what errors you're getting so I can try to fix those as well. Just rename this file or copy/paste over your existing one. Github won't let me put up a .php file, so I just renamed it to .txt in case you're wondering. |
Apologies for the late reply. When I had tried to edit the file I think I was putting a few things in the wrong lines... {} weren't closed properly etc. Whenever I use your .php file I get the following errors:
Also the Ram is at INF%, Uptime is 18336d:17h:50m (which is incorrect) and CPU is 4% which also doesn't seem right. |
I can't remember if I modified other files as well and if they are causing some of the issues, but I managed to at least track down some of the issues you're having. I'm not on my Mac right now, but if you can provide some more information I can attempt to fix these. The below aren't solutions to fix the current issues, just more info that can help me track down how to change the code. Open the "About My Mac" and tell me the macOS version listed and also let me know what your total system RAM is. Uptime
RAM CPU Sadly, with the exception of the CPU probably being wrong, all of these appear to work properly on my system so I'm not sure what else to try. I can package up my copy and give that to you to see if it helps, obviously either back up yours first, or use a different directory while testing. :) |
First of thanks for the help, and secondly apologies for the late replies! Here are the results of what you wanted: macOS version: 10.15.3 Uptime - result of sysctl kern.boottime: { sec = 1583634819, usec = 178477 } Sun Mar 8 02:33:39 2020 RAM - result of sysctl -n hw.memsize: 17179869184 |
Your environment:
Describe your issue:
This information isn't on the Wiki and I attempted to talk about this in Discord. (John told me to make this Issue). Monitorr stats do not work on macOS Mojave so I managed to alter the code and get most of the stats working. These first two screenshots show the error messages you'll get running it on Mojave before code changes.
While messing with the code, I posted the following screenshot showing that I managed to fix both Uptime and CPU%. In the screenshot itself, I just faked the RAM to get rid of the error.
As you can see, the uptime is in a slightly different format (Mojave uptime gives a string similar to:
14:20 up 2 days, 10:39, 3 users, load averages: 10.05 11.16 10.82
{Current Time, Uptime, User Count, etc.} They don't provide seconds so I tweaked it.After that screenshot, I managed to get the RAM more accurate by getting currently used memory and hard coding the total memory since I couldn't figure out a way to pull that and wanted to still give an accurate percent.
I'm not exactly sure of line numbers to reference since I was moving stuff around a bit while editing, but around line 425? in functions.php in regards to Uptime, I assume you'll have to do a system check, but when you determine it's a Mac, change the following:
to:
For CPU:
Instead of calling
getServerLoad()
(around line 160)Your two line:
Ignore that function and do:
For RAM, as of now, best I could do was hard code total memory:
In
getRamFree()
, again inside the 'else' from the systetem detect:I think that's it, if not, feel free to contact me.
The text was updated successfully, but these errors were encountered: