Extend ServerInfo to Support FreeBSD#210
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 <mwener115@gmail.com>
Apply requested changes. Signed-off-by: Matthew Wener <mwener115@gmail.com>
Signed-off-by: Matthew Wener <mwener115@gmail.com>
Signed-off-by: Matthew Wener <mwener115@gmail.com>
Extend Serverinfo to Support FreeBSD
Signed-off-by: Matthew Wener <mwener115@gmail.com>
Signed-off-by: Matthew Wener <mwener115@gmail.com>
Signed-off-by: Matthew Wener <mwener115@gmail.com>
ghost
left a comment
There was a problem hiding this comment.
Small change to get all ipv6 addresses in the loopback address
Signed-off-by: Matthew Wener <mwener115@gmail.com>
Signed-off-by: Matthew Wener <mwener115@gmail.com>
kesselb
left a comment
There was a problem hiding this comment.
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 <mail@danielkesselberg.de> Signed-off-by: Matthew Wener <mwener115@gmail.com>
|
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