mirror of
https://github.com/mynodebtc/mynode.git
synced 2024-12-23 21:18:07 +00:00
Add glances
This commit is contained in:
parent
b4191ea38e
commit
779129c9de
18
rootfs/standard/etc/systemd/system/glances.service
Normal file
18
rootfs/standard/etc/systemd/system/glances.service
Normal file
|
@ -0,0 +1,18 @@
|
|||
# myNode glances service (system monitoring)
|
||||
# /etc/systemd/system/glances.service
|
||||
|
||||
[Unit]
|
||||
Description=Glances
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/glances -w
|
||||
User=root
|
||||
Group=root
|
||||
TimeoutSec=300
|
||||
Restart=always
|
||||
RestartSec=60
|
||||
Nice=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -28,6 +28,7 @@ ufw allow 56881 comment 'allow myNode QuickSync'
|
|||
ufw allow 51413 comment 'allow myNode QuickSync'
|
||||
ufw allow 6771 comment 'allow myNode QuickSync (LPD)'
|
||||
ufw allow 51194 comment 'allow VPN'
|
||||
ufw allow 61208 comment 'allow glances'
|
||||
ufw allow from 127.0.0.1 comment 'allow from localhost'
|
||||
ufw allow from ::1 comment 'allow from localhost'
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ systemctl stop bitcoind
|
|||
|
||||
# Install any new software
|
||||
apt -y install pv sysstat network-manager unzip pkg-config libfreetype6-dev libpng-dev
|
||||
apt -y install libatlas-base-dev libffi-dev libssl-dev glances
|
||||
apt -y install libatlas-base-dev libffi-dev libssl-dev glances bottle
|
||||
|
||||
# Install any pip software
|
||||
pip install tzupdate
|
||||
|
@ -206,6 +206,7 @@ systemctl enable firewall
|
|||
systemctl enable invalid_block_check
|
||||
systemctl enable usb_driver_check
|
||||
systemctl enable https
|
||||
systemctl enable glances
|
||||
|
||||
# Disable any old services
|
||||
sudo systemctl disable hitch
|
||||
|
|
|
@ -6,6 +6,7 @@ from threading import Timer
|
|||
from thread_functions import *
|
||||
from user_management import check_logged_in
|
||||
from lightning_info import *
|
||||
from thread_functions import *
|
||||
import pam
|
||||
import json
|
||||
import time
|
||||
|
@ -138,6 +139,10 @@ def page_settings():
|
|||
"uptime": uptime,
|
||||
"public_ip": public_ip,
|
||||
"local_ip": local_ip,
|
||||
"drive_usage": get_drive_usage(),
|
||||
"cpu_usage": get_cpu_usage(),
|
||||
"ram_usage": get_ram_usage(),
|
||||
"device_temp": get_device_temp(),
|
||||
"ui_settings": read_ui_settings()
|
||||
}
|
||||
return render_template('settings.html', **templateData)
|
||||
|
|
|
@ -227,6 +227,11 @@
|
|||
);
|
||||
});
|
||||
|
||||
$("#glances").on("click", function() {
|
||||
url = 'http://'+location.hostname+':61208'
|
||||
window.open(url,'_blank');
|
||||
})
|
||||
|
||||
$( function() {
|
||||
var downloadHandle = $( "#download-handle" );
|
||||
var uploadHandle = $( "#upload-handle" );
|
||||
|
@ -342,6 +347,32 @@
|
|||
<td>Local IP</td>
|
||||
<td style="padding-left: 20px;">{{local_ip}}</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
<div class="divider"></div>
|
||||
|
||||
<div class="settings_block_subheader">Status</div>
|
||||
<table border="0">
|
||||
<tr>
|
||||
<td>Details</td>
|
||||
<td style="padding-left: 20px;"><a id="glances" class="ui-button ui-widget ui-corner-all settings_button_small" href="#">Open Glances</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Disk Usage</td>
|
||||
<td style="padding-left: 20px;">{{drive_usage}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CPU</td>
|
||||
<td style="padding-left: 20px;">{{cpu_usage}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>RAM</td>
|
||||
<td style="padding-left: 20px;">{{ram_usage}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Temperature</td>
|
||||
<td style="padding-left: 20px;">{{device_temp}} °C</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Uptime</td>
|
||||
<td style="padding-left: 20px;">{{uptime}}</td>
|
||||
|
@ -377,7 +408,7 @@
|
|||
</form>
|
||||
|
||||
<div class="settings_block">
|
||||
<div class="settings_block_header">Status</div>
|
||||
<div class="settings_block_header">Service Status</div>
|
||||
|
||||
<div class="settings_block_subheader">QuickSync Status</div>
|
||||
<button id="show_quicksync_status" class="ui-button ui-widget ui-corner-all settings_button">Show</button>
|
||||
|
|
|
@ -73,7 +73,7 @@ apt-get -y install inotify-tools libssl-dev tor tmux screen
|
|||
apt-get -y install python-grpcio python3-grpcio
|
||||
apt-get -y install pv sysstat network-manager rsync parted unzip pkg-config
|
||||
apt-get -y install libfreetype6-dev libpng-dev libatlas-base-dev
|
||||
apt-get -y install libffi-dev libssl-dev glances
|
||||
apt-get -y install libffi-dev libssl-dev glances bottle
|
||||
|
||||
|
||||
# Install other things without recommendation
|
||||
|
@ -419,6 +419,7 @@ systemctl enable rtl
|
|||
systemctl enable tor
|
||||
systemctl enable invalid_block_check
|
||||
systemctl enable usb_driver_check
|
||||
systemctl enable glances
|
||||
|
||||
|
||||
# Regenerate MAC Address for Rock64
|
||||
|
|
Loading…
Reference in New Issue
Block a user