Giter Site home page Giter Site logo

nextcloud / serverinfo Goto Github PK

View Code? Open in Web Editor NEW
94.0 13.0 59.0 4.65 MB

📊 A monitoring app which creates a server info dashboard for admins

License: GNU Affero General Public License v3.0

PHP 28.99% JavaScript 69.90% CSS 1.10%
nextcloud admin-tools monitoring hacktoberfest

serverinfo's Introduction

Monitoring

REUSE status

This apps provides useful server information, such as CPU load, RAM usage, disk usage, number of users, etc. Check out the provided Example XML output for the details.

The admin can look up this information directly in Nextcloud (Settings -> Management-> Information) or connect an external monitoring tool to the provided end-points.

Installation

This app is part of the standard Nextcloud package and can be found in the directory nextcloud/apps/serverinfo

API

The API provides a lot of information about a running Nextcloud instance in XML or JSON format by using the following URL.

https://<nextcloud-fqdn>/ocs/v2.php/apps/serverinfo/api/v1/info
  • To request the information in JSON append the url parameter format=json
  • Use the url parameter skipUpdate=true to omit server updates.
  • Use the url parameter skipApps=true to omit app updates (including available app updates will send an external request to the app store).

Example XML output:

<?xml version="1.0"?>
<ocs>
	<meta>
		<status>ok</status>
		<statuscode>200</statuscode>
		<message>OK</message>
	</meta>
	<data>
		<nextcloud>
			<system>
				<version>30.0.0.1</version>
				<theme/>
				<enable_avatars>yes</enable_avatars>
				<enable_previews>yes</enable_previews>
				<memcache.local>OC\Memcache\APCu</memcache.local>
				<memcache.distributed>none</memcache.distributed>
				<filelocking.enabled>yes</filelocking.enabled>
				<memcache.locking>OC\Memcache\Redis</memcache.locking>
				<debug>no</debug>
				<freespace>48472801280</freespace>
				<cpuload>
					<element>1.81</element>
					<element>1.39</element>
					<element>1.24</element>
				</cpuload>
				<mem_total>8183664</mem_total>
				<mem_free>5877568</mem_free>
				<swap_total>0</swap_total>
				<swap_free>0</swap_free>
				<apps>
					<!-- only with skipApps=false -->
					<num_installed>53</num_installed>
					<num_updates_available>1</num_updates_available>
					<app_updates>
						<files_antivirus>2.0.1</files_antivirus>
					</app_updates>
				</apps>
				<update>
					<!-- only with skipUpdate=false -->
					<lastupdatedat>1719244666</lastupdatedat>
					<available/>
				</update>
			</system>
			<storage>
				<num_users>7</num_users>
				<num_files>708860</num_files>
				<num_storages>125</num_storages>
				<num_storages_local>7</num_storages_local>
				<num_storages_home>7</num_storages_home>
				<num_storages_other>111</num_storages_other>
			</storage>
			<shares>
				<num_shares>1</num_shares>
				<num_shares_user>0</num_shares_user>
				<num_shares_groups>0</num_shares_groups>
				<num_shares_link>0</num_shares_link>
				<num_shares_link_no_password>0</num_shares_link_no_password>
				<num_fed_shares_sent>0</num_fed_shares_sent>
				<num_fed_shares_received>0</num_fed_shares_received>
				<permissions_4_1>1</permissions_4_1>
			</shares>
		</nextcloud>
		<server>
			<webserver>Apache/2.4</webserver>
			<php>
				<version>7.2.14</version>
				<memory_limit>536870912</memory_limit>
				<max_execution_time>3600</max_execution_time>
				<upload_max_filesize>535822336</upload_max_filesize>
			</php>
			<database>
				<type>mysql</type>
				<version>10.2.21</version>
				<size>331382784</size>
			</database>
		</server>
		<activeUsers>
			<last5minutes>2</last5minutes>
			<last1hour>4</last1hour>
			<last24hours>5</last24hours>
		</activeUsers>
	</data>
</ocs>

Example JSON output:

{"ocs":{"meta":{"status":"ok","statuscode":200,"message":"OK"},"data":{"nextcloud":{"system":{"version":"30.0.0.1","theme":"","enable_avatars":"yes","enable_previews":"yes","memcache.local":"OC\\Memcache\\APCu","memcache.distributed":"none","filelocking.enabled":"yes","memcache.locking":"OC\\Memcache\\Redis","debug":"no","freespace":48472944640,"cpuload":[0.84999999999999997779553950749686919152736663818359375,1.04000000000000003552713678800500929355621337890625,1.1699999999999999289457264239899814128875732421875],"mem_total":8183664,"mem_free":5877156,"swap_total":0,"swap_free":0,"apps":{"num_installed":53,"num_updates_available":1,"app_updates":{"files_antivirus":"2.0.1"}}},"storage":{"num_users":7,"num_files":708860,"num_storages":125,"num_storages_local":7,"num_storages_home":7,"num_storages_other":111},"shares":{"num_shares":1,"num_shares_user":0,"num_shares_groups":0,"num_shares_link":0,"num_shares_link_no_password":0,"num_fed_shares_sent":0,"num_fed_shares_received":0,"permissions_4_1":"1"}},"server":{"webserver":"Apache\/2.4","php":{"version":"7.2.14","memory_limit":536870912,"max_execution_time":3600,"upload_max_filesize":535822336},"database":{"type":"mysql","version":"10.2.21","size":331382784}},"activeUsers":{"last5minutes":2,"last1hour":3,"last24hours":5}}}}

Configuration

Background job to update storage statistics

Since collecting storage statistics might take time and cause slow downs, they are updated in the background. A background job runs once every three hours to update the number of storages and files. The interval can be overridden per app settings (the value is specified in seconds):

php occ config:app:set --value=3600 serverinfo job_interval_storage_stats

It is also possible to trigger the update manually per occ call. With verbose mode enabled, the current values are being printed.

php occ serverinfo:update-storage-statistics -v --output=json_pretty
{
    "num_users": 80,
    "num_files": 3934,
    "num_storages": 2545,
    "num_storages_local": 2,
    "num_storages_home": 2510,
    "num_storages_other": 33
}
Restricted mode (>= Nextcloud 28)

To obtain information about your server, the serverinfo app reads files outside the application directory (e.g. /proc on Linux) or executes shell commands (e.g. df on Linux).

If you don't want that (for example, to avoid open_basedir warnings) enable the restricted mode.

Enable:

php occ config:app:set --value=yes serverinfo restricted_mode

Disable:

php occ config:app:delete serverinfo restricted_mode

Show phpinfo (>= Nextcloud 28)

Enable:

php occ config:app:set --value=yes serverinfo phpinfo

Disable:

php occ config:app:delete serverinfo phpinfo

serverinfo's People

Contributors

andyscherzinger avatar blizzz avatar carlschwan avatar come-nc avatar constrictm avatar dependabot[bot] avatar github-actions[bot] avatar ivansss avatar j0wi avatar juliakirschenheuter avatar juliushaertl avatar karlitschek avatar kesselb avatar lordsimal avatar lukasreschke avatar morrisjobke avatar nextcloud-bot avatar nextcloud-command avatar nickvergessen avatar patschi avatar pvince81 avatar r0wi avatar rakekniven avatar rullzer avatar schiessle avatar skjnldsv avatar szaimen avatar tflidd avatar totalcaos avatar valdnet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

serverinfo's Issues

Memory usage shows "NaN undefined"

bildschirmfoto 2016-08-17 um 10 55 58

@schiessle @leonklingele What else do you need here?

Update response looks like this:

{
    "activeUsers": {
        "last1hour": 1,
        "last24hours": 1,
        "last5minutes": 1
    },
    "database": {
        "size": "N/A",
        "type": "sqlite3",
        "version": "3.8.10"
    },
    "php": {
        "max_execution_time": 3600,
        "memory_limit": 536870912,
        "upload_max_filesize": 537919488,
        "version": "5.6.24"
    },
    "shares": {
        "num_fed_shares_received": 0,
        "num_fed_shares_sent": 0,
        "num_shares": 0,
        "num_shares_groups": 0,
        "num_shares_link": 0,
        "num_shares_link_no_password": 0,
        "num_shares_user": 0
    },
    "storage": {
        "num_files": 10,
        "num_storages": 2,
        "num_storages_home": 1,
        "num_storages_local": 1,
        "num_storages_other": 0,
        "num_users": 1
    },
    "system": {
        "cpuload": [
            1.69580078125,
            1.765625,
            1.7578125
        ],
        "debug": "yes",
        "enable_avatars": "yes",
        "enable_previews": "yes",
        "filelocking.enabled": "yes",
        "freespace": 14204596224,
        "mem_free": "N/A",
        "mem_total": "N/A",
        "memcache.distributed": "none",
        "memcache.local": "none",
        "memcache.locking": "none",
        "theme": "",
        "version": "9.2.0.2"
    }
}

export storage usage, including per-user

It would be great if there was an API call which can return the used storage space for a given user as shown on the personal page! Doing this manually with 'du' or such is quite a pain.

Cannot enable app on NC 9.0.52

Cannot enable the serverinfo application.

Attempted to modify info.xml

<dependencies> <owncloud min-version="8.0" max-version="9.2" /> </dependencies>

Error Message

image

NC Version 9.0.52
OS: Debian 8
PHP: 5.6

Show connected users

Hi, is there any possibility to see who are online ? I'm only able to see how much users are connected.

Error in FreeBSD (Swap)

On NC13beta1.

Use serverinfo on a FreeBSD system.

{"reqId":"QKrCFayFmbKiLz4RuNxG","level":3,"time":"2017-12-10T22:06:44+00:00","remoteAddr":"2001:::","user":"user","app":"PHP","method":"GET","url":"\/index.php\/apps\/serverinfo\/update","message":"Undefined index: swap_total at \/usr\/local\/www\/apache24\/data\/nextcloud\/apps\/serverinfo\/lib\/SystemStatistics.php#62","userAgent":"Mozilla\/5.0 (X11; Ubuntu; Linux x86_64; rv:57.0) Gecko\/20100101 Firefox\/57.0","version":"13.0.0.6"}

#105 introduced a separate curve for swap usage which is not read yet from FreeBSD systems.

quick workaround: just send 0 values or N/A for swap
real solution: implement swap read-out on FreeBSD

nextcloud server uses too much RAM

Heyy guys,

First of all, English is not my native language =)

I hope you can help me with my issue!

Steps to reproduce

I don't know how to reproduce this issue...

Expected behaviour

My nextcloud server shouldn't use 4 GB of RAM.

Actual behaviour

My nextcloud server should use less then 2 GB of RAM with two users, but my server actually uses 4 GB RAM.

Server configuration

Operating system:
Ubuntu 16.04

Web server:
Apache 2.4

Database:
MySQL

PHP version:
7.0

Server version: (see your admin page)
Nextcloud 10.0.1 (stable)

Calendar version: (see the apps page)
1.4.0

Updated from an older installed version or fresh install:
Fresh install

Signing status (ownCloud/Nextcloud 9.0 and above):

No errors have been found.

List of activated apps:

USER@HOST:~$ sudo -u www-data php occ app:list
Could not open input file: occ

Manually copied:

Activity - 2.3.2
Auditing / Logging - 1.0.0
Collaborative tags - 1.0.2
Comments - 1.0.0
Default encryption module - 1.3.1
Deleted files - 1.0.0
Federation - 1.0.1
File sharing - 1.0.0
First run wizard - 1.1
Gallery - 15.0.0
Notifications - 0.3.0
Password policy - 1.0.0
PDF viewer - 0.8.1
Provisioning API - 1.0.0
Server info - 1.1.1
Text editor - 2.1
Theming - 1.0.1
Update notification - 1.0.1
Usage report - 0.1.5
Versions - 1.3.0
Video player - 0.9.8
Bookmarks - 0.9.0
Calendar - 1.4.0
Contacts - 1.4.0.0
Tasks - 0.9.3

The content of config/config.php:

<?php
$CONFIG = array (
  'instanceid' => 'PRIVATE',
  'passwordsalt' => 'PRIVATE',
  'secret' => 'PRIVATE',
  'trusted_domains' => 
  array (
    0 => 'MYDOMAIN',
  ),
  'datadirectory' => '/home/CLOUDFOLDER/data',
  'overwrite.cli.url' => 'https://MYDOMAIN/NEXTCLOUD',
  'dbtype' => 'mysql',
  'version' => '9.1.1.5',
  'dbname' => 'CLOUDDATABASE',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'DATABASEPREFIX',
  'dbuser' => 'DATABASEUSER',
  'dbpassword' => 'PRIVATE',
  'logtimezone' => 'UTC',
  'installed' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'filelocking.enabled' => 'true',
  'redis' => 
  array (
    'host' => 'localhost',
    'port' => 6379,
    'timeout' => 0.0,
  ),
  'loglevel' => 3,
  'versions_retention_obligation' => 'auto',
  'appcodechecker' => true,
  'updatechecker' => true,
  'updater.server.url' => 'https://updates.nextcloud.com/updater_server/',
);

Are you using external storage, if yes which one:
/home/Cloudfolder/data

Are you using encryption: yes/no
Yes

Are you using an external user-backend, if yes which one:
Webdav

Client configuration

Browser:
Firefox
Android Browser

Operating system:
Win7 64Bit
Android 5 and 6

CalDAV-clients:
DavDroid 1.3.3-gplay

Logs

Web server error log

Error   PHP Undefined index: MemAvailable at /var/www/html/nextcloud/apps/serverinfo/lib/SystemStatistics.php#85    2016-10-14T05:01:04+00:00   USER
Error   PHP Undefined index: MemAvailable at /var/www/html/nextcloud/apps/serverinfo/lib/SystemStatistics.php#85    2016-10-14T05:01:04+00:00   USER
Error   PHP Undefined index: MemAvailable at /var/www/html/nextcloud/apps/serverinfo/lib/SystemStatistics.php#85    2016-10-14T05:01:02+00:00   USER
Error   PHP Undefined index: MemAvailable at /var/www/html/nextcloud/apps/serverinfo/lib/SystemStatistics.php#85    2016-10-14T05:00:54+00:00   USER
Error   PHP Undefined index: MemAvailable at /var/www/html/nextcloud/apps/serverinfo/lib/SystemStatistics.php#85    2016-10-14T05:00:53+00:00   USER
Error   PHP Undefined index: MemAvailable at /var/www/html/nextcloud/apps/serverinfo/lib/SystemStatistics.php#85    2016-10-14T05:00:52+00:00   USER
Error   PHP Undefined index: MemAvailable at /var/www/html/nextcloud/apps/serverinfo/lib/SystemStatistics.php#85    2016-10-14T05:00:51+00:00   USER
Error   PHP Undefined index: MemAvailable at /var/www/html/nextcloud/apps/serverinfo/lib/SystemStatistics.php#85    2016-10-14T05:00:50+00:00   USER
Error   PHP Undefined index: MemAvailable at /var/www/html/nextcloud/apps/serverinfo/lib/SystemStatistics.php#85    2016-10-14T05:00:49+00:00   USER
Error   PHP Undefined index: MemAvailable at /var/www/html/nextcloud/apps/serverinfo/lib/SystemStatistics.php#85    2016-10-14T05:00:48+00:00   USER
Error   PHP Undefined index: MemAvailable at /var/www/html/nextcloud/apps/serverinfo/lib/SystemStatistics.php#85    2016-10-14T05:00:47+00:00   USER
Error   PHP Undefined index: MemAvailable at /var/www/html/nextcloud/apps/serverinfo/lib/SystemStatistics.php#85    2016-10-14T05:00:46+00:00   USER
Error   PHP Undefined index: MemAvailable at /var/www/html/nextcloud/apps/serverinfo/lib/SystemStatistics.php#85    2016-10-14T05:00:45+00:00   USER

Log file (data/owncloud.log)

{"reqId":"oQMHwd3XXtIIczPsm8ye","remoteAddr":"IPADRESS","app":"PHP","message":"mkdir(): No such file or directory at \/var\/www\/html\/CLOUDFOLDER\/lib\/private\/Setup.php#289","level":3,"time":"2016-10-10T20:58:31+00:00","method":"POST","url":"\/CLOUDFOLDER\/index.php","user":"--"}
{"reqId":"aC5pWneMfRyb+SP2cGL8","remoteAddr":"IPADRESS","app":"PHP","message":"mkdir(): No such file or directory at \/var\/www\/html\/CLOUDFOLDER\/lib\/private\/Setup.php#289","level":3,"time":"2016-10-10T21:00:11+00:00","method":"POST","url":"\/CLOUDFOLDER\/index.php","user":"--"}
{"reqId":"NEULxRLP2NxZdKXG52ou","remoteAddr":"IPADRESS","app":"mysql.setup","message":"Specific user creation failed: An exception occurred while executing 'SELECT user FROM mysql.user WHERE user=?' with params [\"oc_USER\"]:\n\nSQLSTATE[42000]: Syntax error or access violation: 1142 SELECT command denied to user 'CLOUDFOLDERuser'@'localhost' for table 'user'","level":3,"time":"2016-10-10T21:00:47+00:00","method":"POST","url":"\/CLOUDFOLDER\/index.php","user":"--"}
{"reqId":"NEULxRLP2NxZdKXG52ou","remoteAddr":"IPADRESS","app":"mysql.setup","message":"Database creation failed: An exception occurred while executing 'GRANT ALL PRIVILEGES ON `CLOUDFOLDER` . * TO 'CLOUDFOLDERuser'':\n\nSQLSTATE[42000]: Syntax error or access violation: 1044 Access denied for user 'CLOUDFOLDERuser'@'localhost' to database 'CLOUDFOLDER'","level":3,"time":"2016-10-10T21:00:47+00:00","method":"POST","url":"\/CLOUDFOLDER\/index.php","user":"--"}

Browser log

GET 
XHR 
https://MYDOMAIN/CLOUDFOLDER/ocs/v2.php/apps/notifications/api/v1/notifications [HTTP/1.1 200 OK 214ms]
NS_ERROR_ILLEGAL_VALUE: Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIX509Cert.equals]ssl-observatory.js:472
GET 
XHR 
https://MYDOMAIN/CLOUDFOLDER/ocs/v2.php/apps/notifications/api/v1/notifications [HTTP/1.1 200 OK 200ms]
NS_ERROR_ILLEGAL_VALUE: Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIX509Cert.equals]

Greetz
razorfall

Detail drilldown of links and shares

Requesting a count of shares amongst users, and click to drilldown to details of the active links and shares.

There is no expectation of user privacy in my organization. Management wants to see what the users are sharing. I realize the complexity of the request. We're new to Nextcloud and your development model. Please advise if you think it appropriate for me to query the database and roll out my own reports. I think all Nextcloud admins would appreciate if such reporting was built into the product.

Kind regards,
Brian

Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000]

Steps to reproduce

  1. Open adminpannel
  2. Open serverinfo

Expected behaviour

I should see the all serverinfo

Actual behaviour

Screenshot
Apache errorlog

Server configuration

Operating system: raspbian(debain) ver. 4.4.38-v7+

Web server: Apache/2.4.10

Database: mysql 5.5.53-0+deb8u1

PHP version: 5.6.29-0+deb8u1

Nextcloud version: 10.0.2

Updated from an older Nextcloud/ownCloud or fresh install: updated

List of activated apps:

Collaborative tags, Deleted files, External storage support, Federation, File sharing, Files automated tagging, Gallery, Notifications, Password policy, PDF viewer, Provisioning API, Server info, Text editor, Theming, Update notification, Versions, Video player, Contacts, Documents, Audio Player

Bug in Server Info App causes PHP errors in the log

Hi,

I get lots of this in the NC log:

{"reqId":"tCN/yPhSfCy+NCY46hLc","remoteAddr":"188.192.17.159","app":"PHP","message":"Undefined index: MemAvailable at /var/www/vhosts/{hid}/{hid}/apps/serverinfo/lib/SystemStatistics.php#85","level":3,"time":"2016-10-31T17:09:15+00:00","method":"GET","url":"/apps/serverinfo/update","user":"{hid}"}

I know there are some discussions about how free memory should be calculated, but here I'm talking about a BUG:

I'm running on a VPS at HostEurope, which uses the Virtuozzo Container Virtualisation paradigm. In this paradigm the "Wirtsystem" can allocate more or less memory to the individual virtual hosts, depending on circumstances. Be that as it may, "MemAvailable" and is NOT PRESENT in my output of /proc/meminfo, but "MemFree" is.

So you need to first check if that value is available and do something else if not.

apps/serverinfo/lib/SystemStatistics.php Line 85:
'mem_free' => (int)$data['MemAvailable'] + (int)$data['SwapFree'],

I have changed this to:
'mem_free' => (int)$data['MemFree'] + (int)$data['SwapFree'],

and now I can see the Server Info and no errors are generated.

Hope this fix finds its way into the official codebase soon! And thx to all!

Add network throughput?

It'd be nice to see how much traffic is running through the server at a given time.
Even better if there were graphs per NIC.

serverinfo not working with dashed db name

Hi,
i updated from Nextcloud 10.0.0 to Nextcloud 10.0.1 today.
The Serverinfo Tab didn't work after that.

In the Error Log i found:
"Exception: {"Exception":"Doctrine\DBAL\Exception\SyntaxErrorException","Message":"An exception occurred while executing 'SHOW TABLE STATUS FROM database-suffx':\n\nSQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-suffix' at line 1..."

"database-suffix" is my database name

So i changed:

 "$sql = 'SHOW TABLE STATUS FROM ' . $db_name;" 
to 
"$sql = 'SHOW TABLE STATUS FROM `' . $db_name . '`';"

in the DatabaseStatistics.php in line 96

and it started working again.

I guess there may be some others with a "-" in their database name.

CPU Load naming in servinfo ReST call

I assume the values for CPU load are 1 minute, 5 minute and 15 minutes. It would be nice to know which value is 1 minute, 5 minute and 15 minute load.

<cpuload>
    <element>2.76806640625</element>
    <element>1.99267578125</element>
    <element>1.67626953125</element>
</cpuload>

should be similar to active users

<activeUsers>
    <last5minutes>1</last5minutes>
    <last1hour>1</last1hour>
    <last24hours>1</last24hours>
</activeUsers>

API Description

Please write (or point me to) API description so I can write monitoring module for netdata and/or telegraf.

Many thanks for this feature! 👍

Papercuts

During a review session we figured out some paper cuts.

  • CPU info - check for 0 - sys_getloadavg (this was on a UNIX afaik) #97
  • number of files might be wrong
  • change "files" to "files in data directory"
  • input field for external URL with copy link

This originated in nextcloud/server#2672

cc @schiessle

[QUESTION] Adding Code

So this is the code I have written in order to obtain the disk space and insert the data into variables:

$os = php_uname('s');
if ($os == "Linux") {
    $freeSpace = disk_free_space("/");
    $diskSpace = disk_total_space("/");
} else {
    $freeSpace = disk_free_space("C:");
    $diskSpace = disk_total_space("C:");
}
$usedSpace = ($diskSpace - $freeSpace);

But I am a bit confused as to how to properly add this into the existing php code and call out the variables. I am not very experienced with the P and T translation setup. Can anyone please advise on how to do this properly?

Don't use shell_exec

The shell_exec method is often blacklisted as it represents a security risk, so we should avoid using it.

Per example, when monitoring the memory, we should do it in PHP. Read /proc/meminfo and parse what we get.

Also, it should be mentioned somewhere that this only works on Linux as that path doesn't exist BSD systems.

Only update values which change frequently

Before we can address this #42 (comment) I would like to improve the update https://github.com/nextcloud/serverinfo/blob/master/lib/Controller/PageController.php#L93 to only return the value which change frequently ('system').

For this the initial page (https://github.com/nextcloud/serverinfo/blob/master/lib/Settings/AdminSettings.php#L54) needs to get already all the other values. The numeric values can be added directly to the template instead of the '--'. For the charts I don't know what works best for the javascript library. Maybe we could add the values to the canvas and get it from there only once when the page gets rendered the first time?

@Ivansss can you have a look at this? Thanks!

Already expired shares are displayed

Steps to reproduce

  1. Create a share with expiration date
  2. Check shares in monitoring
  3. Wait for share to expire

Expected behaviour

Share will not be displayed in monitoring when expired

Actual behaviour

Share is displayed, until the user who created it clicks on "Shared with others" in file app. This propably may never happen so monitoring is not reliable for shares

Server configuration

Operating system:
Ubuntu 16.04
Web server:
apache with nginx as reverse proxy
Database:
mysql
PHP version:
7.1
Nextcloud version: (see Nextcloud admin page)
12
Where did you install Nextcloud from:
Upload zip file

List of activated apps:
no extra apps activated, just file app used

If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your Nextcloud installation folder

Nextcloud configuration:
except of redis no difference of default settings

Client configuration

Browser:

Operating system:

Logs

Nextcloud log (data/owncloud.log)

Insert your Nextcloud log here

Browser log

Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log
c) ...

some values need to be documented

Hi,

on the serverinfo page you see a lot of information, most of them are self explained, but some other not, for example:

<permissions_0_1>187</permissions_0_1>
<permissions_3_1>2367</permissions_3_1>
<permissions_6_1>1</permissions_6_1>
<permissions_0_3>6</permissions_0_3>
<permissions_0_5>1</permissions_0_5>
<permissions_0_7>4</permissions_0_7>
<permissions_0_15>55</permissions_0_15>
<permissions_3_15>106</permissions_3_15>
<permissions_6_15>1</permissions_6_15>
<permissions_0_17>113</permissions_0_17>
<permissions_0_19>187</permissions_0_19>
<permissions_0_21>15</permissions_0_21>
<permissions_0_23>13</permissions_0_23>
<permissions_0_31>583</permissions_0_31>
<permissions_1_31>1</permissions_1_31>
<permissions_2_31>2</permissions_2_31>

it would be nice if you documented it somewhere

debian jessie MemFree instead of MemAvailable

on my debian jessie, /proc/meminfo shows MemFree instead of MemAvailable, so I had to edit serverinfo/lib/SystemStatistics.php line 85:
'mem_free' => (int)$data['MemAvailable'] + (int)$data['SwapFree'],
to
'mem_free' => (int)$data['MemFree'] + (int)$data['SwapFree'],

[BUG] Invalid PHP Settings Being Displayed

Steps to reproduce

  1. Install Nextcloud
  2. Increase the upload size in php.ini

Expected behaviour

The monitoring page should report the accurate file size permissions allowed.

Actual behaviour

Instead it displays a much lower amount that can be uploaded.

512MB is the default but it continues to display that after having manually changed the permitted file size to be 16G and have uploaded a file that is 700MB in size.

Screenshot:
https://i.imgur.com/yuALRoc.png

https://i.imgur.com/DGgBJ7k.png

Server configuration

Operating system:
Ubuntu 16.04
Web server:
NGiNX 1.10
Database:
MariaDB 10.2.13
PHP version:
7.2
Nextcloud version: (see Nextcloud admin page)
7.2
Updated from an older Nextcloud/ownCloud or fresh install:
Fresh Install
Where did you install Nextcloud from:
Zip

Memory info not available (FreeBSD)

Steps to reproduce

  1. Install NextCloud on a FreeBSD system
  2. Log in as administrator and check memory usage under Server info

Expected behaviour

Memory information displayed in the appropriate field

Actual behaviour

Memory info not available is displayed beneath the Memory usage title.

Most likely, this happens because Server info app assumes that memory status can be read from /proc/meminfo on any system, and there is no procfs on BSD. As far as I know, at least some of this information can be accessed through sysctl hw but I am not sure about which exact keys have to be queried (since I don't even see what memory information is supposed to be reported). Alternatively, procstat can be used as well, but it reports information about specific processes rather than totals.

Although the absence of this information in itself is not a big deal, the php logs are spammed with /proc/meminfo errors and that is not good.

Server configuration

Operating system: FreeBSD 10.3 p7
Web server: Nginx 1.11.3
Database: MariaDB 10.1.17
PHP version: 7.0.10
NextCloud version: 10.0 stable (downloaded from https://download.nextcloud.com/server/releases/nextcloud-10.0.0.zip and updated from ownCloud 9.0.53)

Signing status:

Signing status

No errors have been found.

List of activated apps:

App list

Enabled:
  - activity: 2.3.2
  - admin_audit: 1.0.0
  - bookmarks: 0.9.0
  - calendar: 1.3.3
  - comments: 1.0.0
  - dav: 1.0.0
  - direct_menu: 0.9.2
  - documents: 0.13.1
  - encryption: 1.3.1
  - federatedfilesharing: 1.0.1
  - federation: 1.0.1
  - files: 1.5.2
  - files_accesscontrol: 1.1.2
  - files_automatedtagging: 1.1.1
  - files_pdfviewer: 0.8.1
  - files_retention: 1.0.0
  - files_sharing: 1.0.0
  - files_texteditor: 2.1
  - files_trashbin: 1.0.0
  - files_versions: 1.3.0
  - files_videoplayer: 0.9.8
  - firstrunwizard: 1.1
  - gallery: 15.0.0
  - news: 9.0.4
  - notes: 2.0.2
  - notifications: 0.3.0
  - password_policy: 1.0.0
  - provisioning_api: 1.0.0
  - serverinfo: 1.1.1
  - survey_client: 0.1.5
  - systemtags: 1.0.2
  - tasks: 0.9.3
  - templateeditor: 0.1
  - theming: 1.0.1
  - updatenotification: 1.0.1
  - weather: 1.3.3
  - workflowengine: 1.0.1
Disabled:
  - external
  - files_external
  - user_external
  - user_ldap
  - user_saml

The content of config/config.php:

Config report

{
    "system": {
        "instanceid": "ocffm874ikqy",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "***REMOVED SENSITIVE VALUE***"
        ],
        "datadirectory": "\/mnt\/ocData",
        "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "9.1.0.16",
        "dbname": "OwnCloud",
        "dbhost": "localhost:\/tmp\/mysql.sock",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "loglevel": 0,
        "appstore.experimental.enabled": true,
        "mail_smtpmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauthtype": "PLAIN",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "trashbin_retention_obligation": "30, 365",
        "asset-pipeline.enabled": false,
        "logtimezone": "***REMOVED SENSITIVE VALUE***",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "filelocking.enabled": "true",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "\/var\/run\/redis\/redis.sock",
            "port": 0,
            "timeout": 0,
            "dbindex": 0
        },
        "logfile": "\/var\/log\/owncloud.log",
        "activity_expire_days": 365,
        "enable_avatars": true,
        "session_lifetime": 10800,
        "preview_libreoffice_path": "\/usr\/local\/bin\/libreoffice",
        "enabledPreviewProviders": [
            "OC\\Preview\\PNG",
            "OC\\Preview\\JPEG",
            "OC\\Preview\\GIF",
            "OC\\Preview\\BMP",
            "OC\\Preview\\XBitmap",
            "OC\\Preview\\MP3",
            "OC\\Preview\\TXT",
            "OC\\Preview\\MarkDown",
            "OC\\Preview\\PDF",
            "OC\\Preview\\OpenDocument",
            "OC\\Preview\\MSOfficeDoc"
        ],
        "debug": true,
        "preview_office_cl_parameters": " --headless --nologo --nofirststartwizard --invisible --norestore --convert-to pdf --outdir ",
        "mail_smtpsecure": "ssl",
        "versions_retention_obligation": "auto, 365",
        "maintenance": false,
        "htaccess.RewriteBase": "\/nextcloud",
        "updater.release.channel": "stable",
        "theme": ""
    },
    "apps": {
        "activity": {
            "enabled": "yes",
            "installed_version": "2.3.2",
            "types": "filesystem"
        },
        "admin_audit": {
            "enabled": "yes",
            "installed_version": "1.0.0",
            "types": "logging"
        },
        "announcementcenter": {
            "enabled": "no",
            "installed_version": "1.1.2",
            "ocsid": "173921",
            "signed": "true",
            "types": ""
        },
        "backgroundjob": {
            "lastjob": "50"
        },
        "bookmarks": {
            "enabled": "yes",
            "installed_version": "0.9.0",
            "ocsid": "168710",
            "types": ""
        },
        "calendar": {
            "enabled": "yes",
            "installed_version": "1.3.3",
            "ocsid": "168707",
            "types": ""
        },
        "comments": {
            "enabled": "yes",
            "installed_version": "1.0.0",
            "types": "logging"
        },
        "contacts": {
            "enabled": "no",
            "installed_version": "1.3.1.0",
            "ocsid": "168708",
            "types": ""
        },
        "core": {
            "backgroundjobs_mode": "cron",
            "default_encryption_module": "OC_DEFAULT_MODULE",
            "encryption_enabled": "yes",
            "installedat": "1460675482.7736",
            "lastcron": "1473968711",
            "lastupdateResult": "[]",
            "lastupdatedat": "1473967779",
            "oc.integritycheck.checker": "[]",
            "public_documents": "documents\/public.php",
            "public_files": "files_sharing\/public.php",
            "public_webdav": "dav\/appinfo\/v1\/publicwebdav.php",
            "remote_caldav": "dav\/appinfo\/v1\/caldav.php",
            "remote_calendar": "dav\/appinfo\/v1\/caldav.php",
            "remote_carddav": "dav\/appinfo\/v1\/carddav.php",
            "remote_contacts": "dav\/appinfo\/v1\/carddav.php",
            "remote_dav": "dav\/appinfo\/v2\/remote.php",
            "remote_files": "dav\/appinfo\/v1\/webdav.php",
            "remote_webdav": "dav\/appinfo\/v1\/webdav.php",
            "repairlegacystoragesdone": "yes",
            "shareapi_default_expire_date": "yes",
            "shareapi_enforce_expire_date": "yes",
            "shareapi_enforce_links_password": "yes",
            "umgmt_send_email": "false",
            "umgmt_show_backend": "false",
            "umgmt_show_email": "false",
            "umgmt_show_last_login": "false",
            "umgmt_show_storage_location": "false",
            "updater.secret.created": "1469040139"
        },
        "dav": {
            "enabled": "yes",
            "installed_version": "1.0.0",
            "types": "filesystem"
        },
        "direct_menu": {
            "enabled": "yes",
            "installed_version": "0.9.2",
            "ocsid": "169148",
            "types": ""
        },
        "documents": {
            "converter": "local",
            "converter_url": "http:\/\/localhost:16080",
            "enabled": "yes",
            "installed_version": "0.13.1",
            "ocsid": "168711",
            "types": "",
            "unstable": "false"
        },
        "encryption": {
            "enabled": "yes",
            "installed_version": "1.3.1",
            "masterKeyId": "master_51747b1f",
            "publicShareKeyId": "pubShare_51747b1f",
            "recoveryKeyId": "recoveryKey_51747b1f",
            "types": "filesystem"
        },
        "federatedfilesharing": {
            "enabled": "yes",
            "installed_version": "1.0.1",
            "types": ""
        },
        "federation": {
            "enabled": "yes",
            "installed_version": "1.0.1",
            "types": "authentication"
        },
        "files": {
            "cronjob_scan_files": "500",
            "enabled": "yes",
            "installed_version": "1.5.2",
            "types": "filesystem"
        },
        "files_accesscontrol": {
            "enabled": "yes",
            "installed_version": "1.1.2",
            "types": "filesystem"
        },
        "files_antivirus": {
            "av_path": "\/usr\/bin\/clamscan",
            "enabled": "no",
            "installed_version": "0.8.0.1",
            "ocsid": "157439",
            "signed": "true",
            "types": "filesystem"
        },
        "files_automatedtagging": {
            "enabled": "yes",
            "installed_version": "1.1.1",
            "types": "filesystem"
        },
        "files_pdfviewer": {
            "enabled": "yes",
            "installed_version": "0.8.1",
            "ocsid": "166049",
            "types": ""
        },
        "files_retention": {
            "enabled": "yes",
            "installed_version": "1.0.0",
            "types": "filesystem"
        },
        "files_sharing": {
            "enabled": "yes",
            "installed_version": "1.0.0",
            "types": "filesystem"
        },
        "files_texteditor": {
            "enabled": "yes",
            "installed_version": "2.1",
            "ocsid": "166051",
            "types": ""
        },
        "files_trashbin": {
            "cronjob_user_offset": "1000",
            "enabled": "yes",
            "installed_version": "1.0.0",
            "types": "filesystem"
        },
        "files_versions": {
            "enabled": "yes",
            "installed_version": "1.3.0",
            "types": "filesystem"
        },
        "files_videoplayer": {
            "enabled": "yes",
            "installed_version": "0.9.8",
            "types": ""
        },
        "firstrunwizard": {
            "enabled": "yes",
            "installed_version": "1.1",
            "ocsid": "166055",
            "types": ""
        },
        "gallery": {
            "enabled": "yes",
            "installed_version": "15.0.0",
            "types": ""
        },
        "galleryplus": {
            "enabled": "no",
            "installed_version": "15.1.1",
            "ocsid": "169116",
            "types": ""
        },
        "news": {
            "enabled": "yes",
            "installed_version": "9.0.4",
            "ocsid": "168040",
            "types": ""
        },
        "notes": {
            "enabled": "yes",
            "installed_version": "2.0.2",
            "ocsid": "174554",
            "types": ""
        },
        "notifications": {
            "enabled": "yes",
            "installed_version": "0.3.0",
            "types": "logging"
        },
        "ownnote": {
            "enabled": "no",
            "folder": "Notes",
            "installed_version": "1.08",
            "ocsid": "168512",
            "types": ""
        },
        "password_policy": {
            "enabled": "yes",
            "installed_version": "1.0.0",
            "minLength": "12",
            "types": ""
        },
        "provisioning_api": {
            "enabled": "yes",
            "installed_version": "1.0.0",
            "types": "prevent_group_restriction"
        },
        "serverinfo": {
            "enabled": "yes",
            "installed_version": "1.1.1",
            "types": ""
        },
        "survey_client": {
            "enabled": "yes",
            "installed_version": "0.1.5",
            "types": ""
        },
        "systemtags": {
            "enabled": "yes",
            "installed_version": "1.0.2",
            "types": "logging"
        },
        "tasks": {
            "enabled": "yes",
            "installed_version": "0.9.3",
            "ocsid": "164356",
            "types": ""
        },
        "templateeditor": {
            "enabled": "yes",
            "installed_version": "0.1",
            "types": ""
        },
        "theming": {
            "cachebuster": "3",
            "color": "#0F5596",
            "enabled": "yes",
            "installed_version": "1.0.1",
            "types": "logging"
        },
        "updatenotification": {
            "direct_menu": "0.9.2",
            "enabled": "yes",
            "installed_version": "1.0.1",
            "types": ""
        },
        "weather": {
            "enabled": "yes",
            "installed_version": "1.3.3",
            "ocsid": "170605",
            "types": ""
        },
        "workflowengine": {
            "enabled": "yes",
            "installed_version": "1.0.1",
            "types": "filesystem"
        }
    }
}

Are you using external storage, if yes which one: no

Are you using encryption: yes

Are you using an external user-backend, if yes which one: no

Client configuration

Browser: FireFox 48.0.1

Operating system: Mac OS X 10.10.5

Logs

Web server error log

Nginx error log

No entries
#### PHP log

PHP-FPM log

[15-Sep-2016 13:06:24] WARNING: [pool www] child 89030 said into stderr: "awk: can't open file /proc/meminfo"
[15-Sep-2016 13:06:24] WARNING: [pool www] child 89030 said into stderr: " source line number 1"
[15-Sep-2016 13:06:25] WARNING: [pool www] child 89030 said into stderr: "awk: can't open file /proc/meminfo"
[15-Sep-2016 13:06:25] WARNING: [pool www] child 89030 said into stderr: " source line number 1"
[15-Sep-2016 13:06:26] WARNING: [pool www] child 89030 said into stderr: "awk: can't open file /proc/meminfo"
[15-Sep-2016 13:06:26] WARNING: [pool www] child 89030 said into stderr: " source line number 1"
#### Nextcloud log (data/nextcloud.log)

Nextcloud log

Only cron debug messages and some complaints about not being able to re-calculate unencrypted size for some files and not being able to decrypt some files in files_versions

Pi2 Nextcloud Box - Server Info monitoring places high load, skewing load & CPU stats

The server info page, showing CPU and memory usage, hammers the Pi2 CPU.
At rest (only admin user logged in to the Files view and one ssh session open to run top) load is about 0.1 - 0.2.
Opening the Admin page and selecting 'Server info' spawns some 6 or so php-fpm processes and causes the load to increase dramatically. Over the space of a couple of minutes the load rises to over 2.2 before dropping back to 1.5 over the next 5 minutes or so, CPU usage rising to 33% and staying pretty constant.
This means that the system load imposed by the 'server info' page, so distort the actual system load as to make the information meaningless. Naturally, this is a function of the low power of the Pi2, but a simpler page would really help to give more meaningful information. The graphics are nice, but they seriously distort the data being presented.

Meminfo support for OpenBSD

Meminfo currently only supports Linux and FreeBSD [0]

The output of top contains this information, and OpenBSD (and perhaps others?) have a -d option, which only refreshes the requested number of times.

$ top -d1
load averages:  4.87,  4.72,  4.83    host.example.net 02:43:39
59 processes: 4 running, 54 idle, 1 on processor  up 13:59
CPU states: 39.0% user,  5.6% nice, 17.0% system,  0.5% interrupt, 37.9% idle
Memory: Real: 701M/1254M act/tot Free: 681M Cache: 387M Swap: 72M/11G

  PID USERNAME PRI NICE  SIZE   RES STATE     WAIT      TIME    CPU COMMAND
35645 root      58    0   25M   34M run       -         8:21 20.07% perl
...

So we could exec this and parse the information out.

[0]

if (PHP_OS === 'FreeBSD' && \OC_Helper::is_function_enabled('exec')) {

Own user group for accessing the API

I don't know if i should post it here or in nextcloud/server.

If I want to monitor the API from an external system, I have to use a user with admin rights. Often these credentials are stored in plain text (see nagios).

Wouldn't it make sense to create a new default group (for example "api"), whose users can use the cloud normally and are also allowed to query the api (via Webinterface & REST). The user is only supposed to monitor the system, he will never add a user or install an app.

Admins should of course continue to query the API.

Or maybe with the option "Limit to groups"
image

could not resolve OCA\ServerInfo\Settings\AdminSection

I have the serverinfo app installed, because it comes standard with Nextcloud 10.0. However, I disabled the app. Now, whenever I enter the admin settings, I get this message in nextcloud.log:

Exception: {\"Exception\":\"OCP\\\\AppFramework\\\\QueryException\",\"Message\":\"Could not resolve OCA\\\\ServerInfo\\\\Settings\\\\AdminSection! Class OCA\\\\ServerInfo\\\\Settings\\\\AdminSection does not exist\",\"Code\":0,\"Trace\":\"#0 …\\\/lib\\\/private\\\/AppFramework\\\/Utility\\\/SimpleContainer.php(105): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->resolve('OCA\\\\\\\\ServerInfo\\\\\\\\...')\\n#1 …\\\/lib\\\/private\\\/ServerContainer.php(89): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->query('OCA\\\\\\\\ServerInfo\\\\\\\\...')\\n#2 …\\\/lib\\\/private\\\/Settings\\\/Manager.php(319): OC\\\\ServerContainer->query('OCA\\\\\\\\ServerInfo\\\\\\\\...')\\n#3 …\\\/lib\\\/private\\\/Settings\\\/Manager.php(354): OC\\\\Settings\\\\Manager->query('OCA\\\\\\\\ServerInfo\\\\\\\\...')\\n#4 …\\\/settings\\\/Controller\\\/AdminSettingsController.php(131): OC\\\\Settings\\\\Manager->getAdminSections()\\n#5 …\\\/settings\\\/Controller\\\/AdminSettingsController.php(70): OC\\\\Settings\\\\Controller\\\\AdminSettingsController->getNavigationParameters('server')\\n#6 [internal function]: OC\\\\Settings\\\\Controller\\\\AdminSettingsController->index('server')\\n#7 …\\\/lib\\\/private\\\/AppFramework\\\/Http\\\/Dispatcher.php(160): call_user_func_array(Array, Array)\\n#8 …\\\/lib\\\/private\\\/AppFramework\\\/Http\\\/Dispatcher.php(90): OC\\\\AppFramework\\\\Http\\\\Dispatcher->executeController(Object(OC\\\\Settings\\\\Controller\\\\AdminSettingsController), 'index')\\n#9 …\\\/lib\\\/private\\\/AppFramework\\\/App.php(111): OC\\\\AppFramework\\\\Http\\\\Dispatcher->dispatch(Object(OC\\\\Settings\\\\Controller\\\\AdminSettingsController), 'index')\\n#10 …\\\/lib\\\/private\\\/AppFramework\\\/Routing\\\/RouteActionHandler.php(47): OC\\\\AppFramework\\\\App::main('AdminSettingsCo...', 'index', Object(OC\\\\AppFramework\\\\DependencyInjection\\\\DIContainer), Array)\\n#11 [internal function]: OC\\\\AppFramework\\\\Routing\\\\RouteActionHandler->__invoke(Array)\\n#12 …\\\/lib\\\/private\\\/Route\\\/Router.php(293): call_user_func(Object(OC\\\\AppFramework\\\\Routing\\\\RouteActionHandler), Array)\\n#13 …\\\/lib\\\/base.php(967): OC\\\\Route\\\\Router->match('\\\/settings\\\/admin')\\n#14 …\\\/index.php(48): OC::handleRequest()\\n#15 {main}\",\"File\":\"…\\\/lib\\\/private\\\/AppFramework\\\/Utility\\\/SimpleContainer.php\",\"Line\":90}","level":3,"time":"2016-08-26T11:44:57+00:00","method":"GET","url":"…\/index.php\/settings\/admin","user":"michael"}

(server path prefixes truncated for privacy)

Add Info about CPU

Hi, besides the CPU load, information about the available CPU (type, features, number of cores, etc) would be highly appreciated and will round up the serverinfo app!

regards, hitam4450

User with limited rights dedicated only for monitoring

Hi,
I would like suggest to add user with limited rights (or user group) wich will be dedicated only for monitring. I want use XML with my external service but I am little afraid to use administrator account for it.
Thank you

Wrong Max Execution Time in Serverinfo Page

Steps to reproduce

  1. Manual Update from 10.0.0 to 10.0.1
  2. Check Max Execution Time in Serverinfo Page at http://CLOUD/index.php/settings/admin/serverinfo > Max Execution Time is: 3600
  3. $ nano /etc/php/7.0/apache2/php.ini
  4. change the value of max_execution_time to 1888
  5. $ service apache2 restart
  6. Check Max Execution Time in Serverinfo Page at http://CLOUD/index.php/settings/admin/serverinfo > Max Execution Time is: 3600
  7. phpinfo(); shows correct Max Execution Time 1888

Expected behaviour

Serverinfo Page should list the correct Max Execution Time as set in php.ini

Actual behaviour

Serverinfo Page shows 3600 as Max Execution Time

Server configuration

Operating system: Debian 8.6
Web server: Apache 2
Database: Mysql 5.7.16
PHP version: PHP 7.0.12
Nextcloud version: (see Nextcloud admin page) 10.0.1
Updated from an older Nextcloud/ownCloud or fresh install: Updated from Nextcloud 10.0.0
Where did you install Nextcloud from: nextcloud-10.0.1.tar.bz2

Oracle Database Information not shown

Steps to reproduce

  1. Click on Information in Settings Page
  2. Look at Database Information

Expected behaviour

Version and Database size displayed in the appropriate field.

Actual behaviour

Fields are empty.

Server configuration

Operating system: Ubuntu 16.04.3 LTS

Web server: Apache 2.4

Database: Oracle Database 11g2 (11.2.0)

PHP version:

Nextcloud version:
Nextcloud 13.0.0 alpha Build:2017-08-02T22:01:14+00:00 ea2e629c6ca307704dea0aed106dfcb8c0bcc559

Where did you install Nextcloud from:
latest-master.zip

List of activated apps:
Enabled:

  • activity: 2.6.0
  • comments: 1.3.0
  • dav: 1.4.0
  • federatedfilesharing: 1.3.1
  • federation: 1.3.0
  • files: 1.8.0
  • files_pdfviewer: 1.2.0
  • files_sharing: 1.5.0
  • files_texteditor: 2.5.1
  • files_trashbin: 1.3.0
  • files_versions: 1.6.0
  • files_videoplayer: 1.2.0
  • firstrunwizard: 2.2.1
  • gallery: 18.0.0
  • logreader: 2.0.0
  • lookup_server_connector: 1.1.0
  • nextcloud_announcements: 1.2.0
  • notifications: 2.1.0
  • oauth2: 1.1.0
  • password_policy: 1.3.0
  • provisioning_api: 1.3.0
  • serverinfo: 1.3.0
  • sharebymail: 1.3.0
  • survey_client: 1.1.0
  • systemtags: 1.3.0
  • theming: 1.4.0
  • twofactor_backupcodes: 1.2.1
  • updatenotification: 1.3.0
  • workflowengine: 1.3.0
    Disabled:
  • admin_audit
  • encryption
  • files_external
  • user_external
  • user_ldap

Nextcloud configuration:

<?php
$CONFIG = array (
  'supportedDatabases' => 
  array (
    0 => 'oci',
  ),
  'trusted_domains' => 
  array (
    0 => '192.168.147.143',
  ),
  'datadirectory' => '/var/www/nextcloud/data',
  'overwrite.cli.url' => 'http://192.168.147.143/nextcloud',
  'instanceid' => '**********************************',
  'passwordsalt' => '***************************************',
  'secret' => '*******************************************',
  'dbtype' => 'oci',
  'version' => '13.0.0.2',
  'dbname' => 'gislap1',
  'dbhost' => '',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbtablespace' => 'NextCloud',
  'dbuser' => 'NextCloud',
  'dbpassword' => '********************',
  'installed' => true,
  'theme' => '',
  'loglevel' => 1,
  'maintenance' => false,
);

Client configuration

Browser: Firefox 54.0.1 (32 bit)

Operating system: Windows 10 64 Bit

Logs

Nextcloud log (data/owncloud.log)

{"reqId":"P1ycEWB1TNBscoCtst7S","level":3,"time":"2017-08-03T12:18:16+00:00","remoteAddr":"192.168.147.1","user":"admin","app":"PHP","method":"GET","url":"\/nextcloud\/index.php\/settings\/admin\/serverinfo","message":"Undefined index: version at \/var\/www\/nextcloud\/apps\/serverinfo\/lib\/DatabaseStatistics.php#76","userAgent":"Mozilla\/5.0 (Windows NT 10.0; WOW64; rv:54.0) Gecko\/20100101 Firefox\/54.0","version":"13.0.0.2"}
{"reqId":"P1ycEWB1TNBscoCtst7S","level":3,"time":"2017-08-03T12:18:17+00:00","remoteAddr":"192.168.147.1","user":"admin","app":"PHP","method":"GET","url":"\/nextcloud\/index.php\/settings\/admin\/serverinfo","message":"Undefined index: dbsize at \/var\/www\/nextcloud\/apps\/serverinfo\/lib\/DatabaseStatistics.php#148","userAgent":"Mozilla\/5.0 (Windows NT 10.0; WOW64; rv:54.0) Gecko\/20100101 Firefox\/54.0","version":"13.0.0.2"}

MySQL can not load the app

An exception occurred while executing &#039;SELECT COUNT(*) AS `num_entries`, `permissions`, `share_type` FROM `oc_share` GROUP BY `share_type`&#039;:

SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column &#039;nextcloud11.oc_share.permissions&#039; which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

API delivers wrong data for num_shares_link_no_password

I think the API delivers wrong data for num_shares_link_no_password.

The following sharing settings are configured. All links should and are password protected!
image

image

If i query the api the values for num_shares_linkand num_shares_link_no_passwords are identical:

image

If i share a new file/folder (password protected), both values are increased by 1.

According to our monitoring system, the problem has been occurring since 2018/02, before this the value was always 0.
image

System Info:

  • Nextcloud 13.0.4
  • Monitoring 1.3.0
  • CentOS 7 / Apache / PHP 7.0

Add phpinfo() output

We have minimal information about the PHP configuration.
It would be good to have a hidden panel which can be expanded to reveal the full configuration.

Active Users (LDAP)

LDAP users is not being count as active users, only local account has been accounted

Handle non-accessible/non-existent /proc more gracefully

Version: 11.0.0

My hosting provider is all-inkl.com. In that hosting environment I do not have access to /proc and therefore /proc/meminfo.

When accessing the "Server Info" page as admin, "CPU Load" shows
Load average: undefined (Last minute)
"Memory usage" shows
Memory info not available

In the log file I get flodded with dozens of messages like this

file_get_contents(/proc/meminfo): failed to open stream: Permission denied at /www/htdocs/xxxxx/nextcloud/apps/serverinfo/lib/SystemStatistics.php#71

It would be nice if nextcloud would handle a non-accessible /proc more gracefully, and not floods the log file.
Also, the "Load average: undefined" message should be improved in such a case

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.