* * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . * */ use OCA\ServerInfo\Resources\Disk; use OCA\ServerInfo\Resources\Memory; use OCA\ServerInfo\Resources\NetInterface; use OCA\ServerInfo\Resources\ThermalZone; use OCP\Util; script('serverinfo', 'script'); script('serverinfo', 'smoothie'); script('serverinfo', 'Chart.min'); style('serverinfo', 'style'); function FormatMegabytes(int $byte): string { $unim = ['MB', 'GB', 'TB', 'PB', 'EB']; $count = 0; while ($byte >= 1024) { $count++; $byte /= 1024; } return number_format($byte, 2, '.', '.') . ' ' . $unim[$count]; } /** @var array $_ */ /** @var Memory $memory */ $memory = $_['memory']; /** @var Disk[] $disks */ $disks = $_['diskinfo']; /** @var NetInterface[] $interfaces */ $interfaces = $_['networkinterfaces']; /** @var ThermalZone[] $thermalZones */ $thermalZones = $_['thermalzones']; /** @var bool $phpinfo */ $phpinfo = $_['phpinfo']; ?>

t('Operating System:')); ?>

t('CPU:')); ?>

t('Unknown Processor')) ?>

t('Memory:')); ?> getMemTotal() > 0): ?> getMemTotal())) ?>

t('Server time:')); ?>

t('Uptime:')); ?>

0): ?>

t('Temperature')); ?>

getType()) ?>:  getTemp()) ?>°C

t('Load')); ?>

t('Memory')); ?>

    

    

t('Disk')); ?>

getDevice())); ?>

t('Mount:')); ?> getMount()); ?>
t('Filesystem:')); ?> getFs()); ?>
t('Size:')); ?> getUsed() + $disk->getAvailable())); ?>
t('Available:')); ?> getAvailable())); ?>
t('Used:')); ?> getPercent()); ?> (getUsed())); ?>)

t('Files:')); ?>

t('Storages:')); ?>

t('Free Space:')); ?>

t('Network')); ?>

t('Hostname:')); ?>
t('DNS:')); ?>
t('Gateway:')); ?>

getName()) ?>

t('Status:')); ?> isUp() ? 'up' : 'down'; ?>
t('Speed:')); ?> getSpeed()) ?> (t('Duplex:') . ' ' . $interface->getDuplex()) ?>)
getMAC())): ?> t('MAC:')); ?> getMAC()) ?>
t('IPv4:')); ?> getIPv4())); ?>
t('IPv6:')); ?> getIPv6())); ?>

t('Active users')); ?>

0) : ?> t('Total users:')); ?>
0) : ?> t('24 hours:')); ?>
0) : ?> t('1 hour:')); ?>
0) : ?> t('5 mins:')); ?>
0) : ?>

t('Shares')); ?>

0) : ?> t('Users:')); ?>
0) : ?> t('Groups:')); ?>
0) : ?> t('Links:')); ?>
0) : ?> t('Emails:')); ?>
0) : ?> t('Federated sent:')); ?>
0) : ?> t('Federated received:')); ?>
0) : ?> t('Talk conversations:')); ?>

t('PHP')); ?>

t('Version:')); ?>

t('Memory limit:')); ?>

t('Max execution time:')); ?>

t('Upload max size:')); ?>

t('OPcache Revalidate Frequency:')); ?>

t('Extensions:')); ?> t('Unable to list extensions')); ?>

t('Show phpinfo')) ?>

t('Database')); ?>

t('Type:')); ?>

t('Version:')); ?>

t('Size:')); ?>

t('External monitoring tool')); ?>

t('Use this end point to connect an external monitoring tool:')); ?>

t('To use an access token, please generate one then set it using the following command:')); ?>

occ config:app:set serverinfo token --value yourtoken

t('Then pass the token with the "NC-Token" header when querying the above URL.')); ?>