pvuchetich
Dabbler
- Joined
- Aug 23, 2012
- Messages
- 17
Asking how/where best to communicate a minor FreeBSD-specific (or at least a non-Linux-specific) fix (or perhaps it is fixed in most recent FreeNAS / Nextcloud):
System: FreeNAS-11.2-U7 (most recent version is 11.3-U1 at this time), I installed the plugin for nextcloud, which appears to be 17.0.1 (most recent stable is 18.0.2)
http://[nextcloud local IP]/index.php/settings/admin/logging
shows error message:
A non-numeric value encountered at /usr/local/www/nextcloud/apps-pkg/serverinfo/lib/OperatingSystems/DefaultOs.php#52
A quick internet search shows a github issue that is exactly the same issue:
github.com
The cause is simply that it is using a Linux-specific command
In the FreeNAS Nextcloud Jail, the Linux /proc directory is empty
The best solution would be to modify the upstream file to use the OS-specific command to get memory and other statistics.
So, the question for this plugin is whether that would be to put it as a github request or a modification to the plugin via FreeNAS?
Thanks,
-Phil
System: FreeNAS-11.2-U7 (most recent version is 11.3-U1 at this time), I installed the plugin for nextcloud, which appears to be 17.0.1 (most recent stable is 18.0.2)
http://[nextcloud local IP]/index.php/settings/admin/logging
shows error message:
A non-numeric value encountered at /usr/local/www/nextcloud/apps-pkg/serverinfo/lib/OperatingSystems/DefaultOs.php#52
A quick internet search shows a github issue that is exactly the same issue:
A non-numeric value encountered at DefaultOs.php#52 · Issue #172 · nextcloud/serverinfo
When browsing the /serverinfo section of my admin panel, I get on the error log: A non-numeric value encountered at /usr/local/www/nextcloud/apps/serverinfo/lib/OperatingSystems/DefaultOs.php#52 Th...
The cause is simply that it is using a Linux-specific command
Code:
public function getMemory() { $memory = shell_exec('cat /proc/meminfo | grep -i \'MemTotal\' | cut -f 2 -d ":" | awk \'{$1=$1}1\''); $memory = explode(' ', $memory); $memory = round($memory[0] / 1024); if ($memory < 1024) { $memory = $memory . ' MB'; } else { $memory = round($memory / 1024, 1) . ' GB'; } return $memory;
In the FreeNAS Nextcloud Jail, the Linux /proc directory is empty
Code:
FreeNAS#sudo iocage console nextcloud root@nextcloud:~ # cat /proc/meminfo cat: /proc/meminfo: No such file or directory root@nextcloud:/proc # ls -al total 9 dr-xr-xr-x 2 root wheel 2 Jun 21 2018 . drwxr-xr-x 18 root wheel 22 Mar 24 06:52 ..
The best solution would be to modify the upstream file to use the OS-specific command to get memory and other statistics.
So, the question for this plugin is whether that would be to put it as a github request or a modification to the plugin via FreeNAS?
Thanks,
-Phil