File tree Expand file tree Collapse file tree 3 files changed +16
-6
lines changed Expand file tree Collapse file tree 3 files changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -287,6 +287,13 @@ run-browser: ## Start Glances in browser mode (RPC)
287
287
run-issue : # # Start Glances in issue mode
288
288
./venv/bin/python -m glances -C ./conf/glances.conf --issue
289
289
290
+ run-multipass : # # Install and start Glances in a VM (only available on Ubuntu with multipass already installed)
291
+ multipass launch -n glances-on-lts lts
292
+ multipass exec glances-on-lts -- sudo snap install glances
293
+ multipass exec glances-on-lts -- glances
294
+ multipass stop glances-on-lts
295
+ multipass delete glances-on-lts
296
+
290
297
show-version : # # Show Glances version number
291
298
./venv/bin/python -m glances -C ./conf/glances.conf -V
292
299
Original file line number Diff line number Diff line change @@ -140,12 +140,14 @@ def __serve_once(self):
140
140
"""
141
141
# Update stats
142
142
# Start a counter used to compute the time needed
143
- counter = Counter ()
143
+ counter_update = Counter ()
144
144
self .stats .update ()
145
- logger .debug (f'Stats updated duration: { counter .get ()} seconds' )
145
+ logger .debug (f'Stats updated duration: { counter_update .get ()} seconds' )
146
146
147
147
# Patch for issue1326 to avoid < 0 refresh
148
- adapted_refresh = (self .refresh_time - counter .get ()) if (self .refresh_time - counter .get ()) > 0 else 0
148
+ adapted_refresh = (
149
+ (self .refresh_time - counter_update .get ()) if (self .refresh_time - counter_update .get ()) > 0 else 0
150
+ )
149
151
150
152
# Display stats
151
153
# and wait refresh_time - counter
@@ -179,7 +181,7 @@ def serve_n(self, n=1):
179
181
def serve_forever (self ):
180
182
"""Wrapper to the serve_forever function."""
181
183
if self .args .stop_after :
182
- self .serve_n (self .args .stop_after )
184
+ self .serve_n (n = self .args .stop_after )
183
185
else :
184
186
while self .__serve_once ():
185
187
pass
Original file line number Diff line number Diff line change 1
1
name : glances
2
- version : ' 4.1.2+build01 ' # Put the current stable version+buildXX
2
+ version : ' 4.1.2+build02 ' # Put the current stable version+buildXX
3
3
4
4
summary : Glances an Eye on your system. A top/htop alternative.
5
5
description : |
17
17
command : bin/glances
18
18
plugs : # https://snapcraft.io/docs/supported-interfaces
19
19
- network
20
- - system-observe
20
+ - system-observe # This one should give read access to all the system
21
21
- mount-observe
22
22
- hardware-observe
23
23
- log-observe
32
32
- power-control
33
33
- process-control
34
34
- network-setup-observe
35
+ - all-home
35
36
environment :
36
37
LANG : C.UTF-8
37
38
LC_ALL : C.UTF-8
You can’t perform that action at this time.
0 commit comments