Add sysinfo.php

This commit is contained in:
Dmitri Popov
2019-02-14 14:22:00 +01:00
parent 85c4353e56
commit 142e95b631
4 changed files with 56 additions and 0 deletions

View File

@@ -56,6 +56,8 @@ The access the contents of the storage device, plug it into the Raspberry Pi and
Activating the DLNA server also returns the disk space usage information. You can use this information to monitor the remaining free space on the storage device. Activating the DLNA server also returns the disk space usage information. You can use this information to monitor the remaining free space on the storage device.
The **System info** link gives you access to basic system information, such as a list of storage devices and memory usage.
## Problems? ## Problems?
Please report bugs and issues in the [Issues](https://github.com/dmpop/little-backup-box/issues) section. Please report bugs and issues in the [Issues](https://github.com/dmpop/little-backup-box/issues) section.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 32 KiB

View File

@@ -28,6 +28,7 @@
<div id="content"> <div id="content">
<img src="ichigo.svg" height="39px" alt="Ichigo"> <img src="ichigo.svg" height="39px" alt="Ichigo">
<h1>Little Backup Box</h1> <h1>Little Backup Box</h1>
<p><a href="sysinfo.php">System info</a></p>
<p>Back up a storage card connected via a card reader</p> <p>Back up a storage card connected via a card reader</p>
<p> <p>
<form method="post"> <form method="post">

53
scripts/sysinfo.php Normal file
View File

@@ -0,0 +1,53 @@
<html lang="en">
<!-- Author: Dmitri Popov, dmpop@linux.com
License: GPLv3 https://www.gnu.org/licenses/gpl-3.0.txt -->
<head>
<meta charset="utf-8">
<title>Little Backup Box</title>
<link rel="shortcut icon" href="ichigo.png" />
<link rel="stylesheet" href="milligram.min.css">
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Roboto:300,300italic,700,700italic">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
#content {
margin: 0px auto;
text-align: center;
}
img {
display: block;
margin-left: auto;
margin-right: auto;
margin-top: 1%;
margin-bottom: 1%;
}
</style>
</head>
<body>
<div id="content">
<img src="ichigo.svg" height="39px" alt="Ichigo">
<h1>Little Backup Box</h1>
<p>Basic system information</p>
<h2>Devices</h2>
<div style="display: inline-block; text-align: left;">
<?php
echo '<pre>';
passthru("lsblk");
echo '</pre>';
?>
</div>
<h2>Memory (in MB)</h2>
<div style="display: inline-block; text-align: left;">
<?php
echo '<pre>';
passthru("free -m");
echo '</pre>';
?>
</div>
<form>
<input type="button" onClick="history.go(0)" value="Refresh">
</form>
</div>
</body>
</html>