aboutsummaryrefslogtreecommitdiff
path: root/admin/panes/disk.php
diff options
context:
space:
mode:
authorMinteck <nekostarfan@gmail.com>2021-08-08 12:04:30 +0200
committerMinteck <nekostarfan@gmail.com>2021-08-08 12:04:30 +0200
commit95112b1eb06a4be531ded59563d53a63a8d614e8 (patch)
treefd3dc676227309c87a39feab9ca458985e327907 /admin/panes/disk.php
parent87303b0d3540037fb94efdde24dbaacb2880d6cb (diff)
downloadmain-95112b1eb06a4be531ded59563d53a63a8d614e8.tar.gz
main-95112b1eb06a4be531ded59563d53a63a8d614e8.tar.bz2
main-95112b1eb06a4be531ded59563d53a63a8d614e8.zip
Opening!
Diffstat (limited to 'admin/panes/disk.php')
-rw-r--r--admin/panes/disk.php81
1 files changed, 81 insertions, 0 deletions
diff --git a/admin/panes/disk.php b/admin/panes/disk.php
new file mode 100644
index 0000000..72d772f
--- /dev/null
+++ b/admin/panes/disk.php
@@ -0,0 +1,81 @@
+<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/admin/private/header.php";/** @var array $_DATA */ ?>
+
+<style>
+ ::-webkit-scrollbar {
+ width: 5px;
+ }
+
+ ::-webkit-scrollbar-track {
+ border-radius: 9999px;
+ background: transparent;
+ }
+
+ ::-webkit-scrollbar-thumb {
+ border-radius: 9999px;
+ background-color: rgba(136, 136, 136, 0.5);
+ transition: background 200ms;
+ }
+
+ ::-webkit-scrollbar-thumb:hover {
+ background-color: rgba(85, 85, 85, 0.75);
+ }
+
+ ::-webkit-scrollbar-thumb:active {
+ background-color: #222;
+ }
+
+ .list-group-item {
+ background: #34373c;
+ }
+</style>
+
+<div class="container" style="color:white;padding-top:15vh;padding-bottom:15vh;">
+ <h2 style="text-align:center;">Disk Space Usage</h2>
+ <pre style="background:#111;color:white;border-radius:5px;padding: 10px;"><?php
+
+ exec("df -h -x tmpfs -x squashfs -x devtmpfs --total --output=source,fstype,size,used,avail,pcent,ipcent,iused,itotal,target", $disktotal);
+ echo(implode("\n", $disktotal));
+
+ ?>
+ </pre>
+ <ul class="list-group">
+ <li class="list-group-item">
+ <details>
+ <summary>Show all filesystems (including RAM disks and pseudo-fs)</summary>
+ <pre style="background:#111;color:white;border-radius:5px;padding: 10px;"><?php
+
+ exec("df -ha --output=source,fstype,size,used,avail,pcent,ipcent,iused,itotal,target", $disktotal2);
+ echo(implode("\n", $disktotal2));
+
+ ?>
+ </pre>
+ </details>
+ </li>
+ <li class="list-group-item">
+ <details>
+ <summary>Show filesystems mount options</summary>
+ <pre style="background:#111;color:white;border-radius:5px;padding: 10px;"><?php
+
+ exec("mount", $disktotal3);
+ echo(implode("\n", $disktotal3));
+
+ ?>
+ </pre>
+ </details>
+ </li>
+ <li class="list-group-item">
+ <details>
+ <summary>Show block devices tree</summary>
+ <pre style="background:#111;color:white;border-radius:5px;padding: 10px;"><?php
+
+ exec("lsblk -mp", $disktotal4);
+ echo(implode("\n", $disktotal4));
+
+ ?>
+ </pre>
+ </details>
+ </li>
+ </ul>
+</div>
+
+<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/admin/private/footer.php"; ?> \ No newline at end of file