-
Notifications
You must be signed in to change notification settings - Fork 64
Extend ServerInfo to Support FreeBSD #210
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
Conversation
FreeBSD doesn't use /proc/ to store system information. Functions modified from DefaultOS.php Added constructer to use phpIni getMemory - use sysctl - mirror logic from SystemStatistics.php getCPUName - use sysctl -n hw.model getUptime - return kern.bootime subtracted from current time getTimeServers - remove /etc/systemd/timesyncd.conf as does not exist in FreeBSD getNetworkInfo - add gateway using netstat getNetworkInterfaces - modified to use ifconfig instead of /sys/class/net/* readContent - removed as now unused is_function_enabled - copied from SystemStatistics.php to verify exec() Signed-off-by: Matthew Wener <[email protected]>
kesselb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you 👍
Apply requested changes. Signed-off-by: Matthew Wener <[email protected]>
Signed-off-by: Matthew Wener <[email protected]>
Signed-off-by: Matthew Wener <[email protected]>
Extend Serverinfo to Support FreeBSD
Signed-off-by: Matthew Wener <[email protected]>
Signed-off-by: Matthew Wener <[email protected]>
Signed-off-by: Matthew Wener <[email protected]>
ghost
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small change to get all ipv6 addresses in the loopback address
Signed-off-by: Matthew Wener <[email protected]>
Signed-off-by: Matthew Wener <[email protected]>
kesselb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Did not test it.
|
Mind to share some of the command outputs here (like https://github.com/nextcloud/serverinfo/tree/master/tests/data)? I can add some tests later with it. Just post it as comments here. No need to add it as files yet ;) Thanks 👍 |
Co-authored-by: kesselb <[email protected]> Signed-off-by: Matthew Wener <[email protected]>
|
Sample Outputs
|
|
|
|
Thanks and don't forget to reopen the pr and merge :) |
|
|
Oops closed by accident. I cannot merge it myself. |
|
Thanks 👍 |
|
|
For the record the change is simple for FreeBSD.php |
@constrict, I wrote patch 2 months ago: #203. |
|
Does not seem to be an issue on my box but I have added -k to swapinfo, so that it is always shown in 1k-blocks. |
Issue is actually in SystemStatistics.php. The swap return is unused in FreeBSD.php. |
|
Hi all, I have FreeNAS (FreeBSD) system running Nextcloud 18.0.6 Thanks, |
|
I'm still getting an 'Internal Server Error' when I try to access settings/admin/serverinfo on FreeBSD 12.1 with NC20. |
FreeBSD doesn't use /proc/ to store system information, so multiple functions needed to be modified to support FreeBSD,
Modified Os.php to include new Class FreeBSD added check for when FreeBSD is the OS.
Created FreeBSD.php based on DefaultOS.php
Functions modified from DefaultOS.php