-
Notifications
You must be signed in to change notification settings - Fork 17
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
Incorrect CPU usage on Windows #17
Comments
Thanks for the feedback. The counter seems to work normally on Windows 10, so there likely is something specific with Windows Server. I'll try to replicate the issue and fix it if possible. |
Does it require certain permissions or something? |
I've just installed the latest version of the app on a Windows Server 2019 and ran It using OpenJDK 19. I wasn't able to reproduce the issue, the CPU usage is showing correct values. Do you know which branch/commit were you using when you built the application? You may also try to set up the new version v0.2.0 I've just released to see if it solves the problem. As far as I know, there should be no requirement for special permissions. |
Running on the v0.2.0 release, on Windows Server 2022 under a non-admin user and CPU usage is shown as -100%. I am suspecting that this might either be due to the server running as a non-privileged user, though other than a privilege issue with creating symlinks which was fixed by a GPO edit, there have been no other issues with this. |
Thank you for the feedback! I've just tried with a non-privileged user and was able to temporarily reproduce the issue. However, it's acting pretty random - for the first few seconds upon viewing the dashboard, the value is stuck either at -100%, 0%, or 100%. After a few seconds, though, the counter catches up and starts showing proper values. After that, even restarting the application doesn't make the issue reappear. I need to sign out of the Windows account and log back in to reproduce it again temporarily. Are you experiencing similar behavior, or does the counter not work at all? I'll dig deeper and perhaps try adjusting the implementation of the system resource displays to avoid this issue. |
Thanks for the response. The counter does not move from -100% at all. Furthermore, I have attempted to test this by running the following program on both an administrator and an un-privileged account. import com.sun.management.OperatingSystemMXBean;
import java.lang.management.ManagementFactory;
class test {
public static void main(String[] args) {
OperatingSystemMXBean osBean = ManagementFactory.getPlatformMXBean(OperatingSystemMXBean.class);
System.out.println(osBean.getCpuLoad());
}
} Administrator:
User:
It appears that when running as a non-privileged user, Java is unable to retrieve the CPU usage (?). |
The CPU counter on the dashboard does not seem to be correct (at 0). Tested on Windows Server 2022 with OpenJDK 19.
The text was updated successfully, but these errors were encountered: