-
-
Notifications
You must be signed in to change notification settings - Fork 885
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
OpenBSD support #1466
OpenBSD support #1466
Conversation
I went ahead and did a mass copy of all the other files. Let me know what doesn't work and I can help you sort it out. |
OK, so I did manage to get a minimal openbsd VM set up and see what you mean with JNA -- I can't for the life of me figure out how to load the C library. |
OK, at this point SystemInfoTest runs without crashing. All those nulls and empty arrays you added were causing headaches. :) I will call that a win for now. Let me know which data is most important for you. |
OK, I've got the C library loading. It was just confusion trying to open the "FreeBSD" library with poorly linked structures. OpenBSD does have |
Cool! Will give it a shot in the morning |
Current status:
Next up is memory, available from sysctl |
I think I'm mostly done with processor and memory. Next big thing to tackle is the process listing. There may be a way to do it natively, but I keep running into problems with those (possibly due to OpenBSD's famed security measures) so parsing ps is probably the way to go. The existing code produces something but it's clearly out of sync on the columns, so you might take a look at where the FreeBSD and OpenBSD commands differ and tweak the process (and possibly thread) code. |
OK, not quite done. For non-root HW disk store I think we can parse
or
or
|
I think this is ready to merge. Anything else you think needs doing? |
Heh, I just fixed those spaces and tried to push and it yelled at me. Thanks. :) |
attached results of running So I think all the functionality is there, I still see a test failure while running install:
And on a vbox vm the cpu stuff was odd yesterday, but may also be caused by vbox. |
Hmm, interesting with non-root you still don't get the disk model and size. Can you post your As for the test error, apparently thread count is 0. This may be a race condition for a process which ended before |
I'll look up my laptop dmesg tonight. here's the vbox oddity...
while
while
perhaps we should go with the number reported by |
Does that change during operation? Why do we keep fetching the sysctl value when getting cpu frequency? (And per earlier comment rather than using modulo 2 we should line up with smt threads from dmesg if we continue to do it that way, which I'm not sure we should.) Whichever we choose we should pick the same one for counting CPUs as for cpu frequency... we can just fill an array with In this case, it looks like the vm is running the single-threaded kernel and not |
Also I found another format for disk size in another dmesg so I'll try to add that.
|
So I think we're all done now except for determining the array size of the cpu frequency array, and whether to fill it all with the same number or to be complex and figure out which might be smt threads and set them to 0. My preference is to just go simple. Create an array of size |
# Conflicts: # oshi-core/src/main/java/oshi/SystemInfo.java # oshi-core/src/test/java/oshi/util/LsofUtilTest.java
On consumer hardware probably no way to turn off processors, on enterprise level hardware like sparc64 maybe you can |
Any update on whether my disk name and size non-root backup worked for you? I think this is ready to merge. If you do, click "Ready for review" above! Or click squash and merge yourself! :) |
# Conflicts: # oshi-core/src/main/java/oshi/hardware/platform/linux/LinuxDisplay.java
LGTM
|
OpenBSD support
resolve #1465