-
-
+
Loading...
+
+
+
+
+
+ Refresh time {{refreshTime}}s
+
+
+ {{result["system"].hostname}} ({{result["system"].os_name}} {{result["system"].os_version}} {{result["system"].platform}})
+
+
+
+
+ Uptime: {{result["uptime"]}}
+
+
+
+
-
- Refresh time {{refreshTime}}s
-
-
- {{result["system"].hostname}} ({{result["system"].os_name}} {{result["system"].os_version}} {{result["system"].platform}})
-
+
+
+
+
+
+
CPU
+
{{result["cpu"].total}}%
+
+
+
user:
+
+ {{result["cpu"].user}}%
+
+
+
+
system:
+
+ {{result["cpu"].system}}%
+
+
+
+
idle:
+
{{result["cpu"].idle}}%
+
+
+
+
+
+
+
+
+
+
MEM
+
{{result["mem"].percent}}%
+
+
+
total:
+
{{result["mem"].total | bytes:2}}
+
+
+
used:
+
+ {{result["mem"].used | bytes:2}}
+
+
+
+
free:
+
{{result["mem"].free | bytes:2}}
+
+
+
+
+
+
+
+
+
SWAP
+
{{result["memswap"].percent}}%
+
+
+
total:
+
{{result["memswap"].total | bytes:2}}
+
+
+
used:
+
+ {{result["memswap"].used | bytes:2}}
+
+
+
+
free:
+
{{result["memswap"].free | bytes:2}}
+
+
+
+
+
+
+
+
+
+
+
NETWORK
+
Rx/s
+
Tx/s
+
+
+
{{network.interface_name | min_size}}
+
{{network.rx | bytes}}
+
{{network.tx | bytes}}
+
+
+
-
-
-
- Uptime: {{result["uptime"]}}
-
-
-
-
+
+
+
+
+
{{disk.disk_name | min_size}}
+
{{disk.read_bytes | bytes}}
+
{{disk.write_bytes | bytes}}
+
+
+
+
+
+
+
FILE SYS
+
Used
+
Total
+
+
+
{{fs.mnt_point}} ({{fs.device_name}})
+
+ {{fs.size - fs.free | bytes}}
+
+
{{fs.size | bytes}}
+
+
+
+
+
+
+
+
{{sensor.label}}
+
{{sensor.value}}
+
+
+
+
+
+
+
+
+
No warning or critical alert detected
+
{{alert}}
+
+
+
-
-
-
-
-
-
- | CPU |
- {{result["cpu"].total}}% |
-
-
- | user: |
- {{result["cpu"].user}}% |
-
-
- | system: |
- {{result["cpu"].system}}% |
-
-
- | idle: |
- {{result["cpu"].idle}}% |
-
-
-
-
-
-
-
-
-
-
-
- | MEM |
- {{result["mem"].percent}}% |
-
-
- | total: |
- {{result["mem"].total | bytes:2}} |
-
-
- | used: |
- {{result["mem"].used | bytes:2}} |
-
-
- | free: |
- {{result["mem"].free | bytes:2}} |
-
-
-
-
-
-
-
-
-
-
- | SWAP |
- {{result["memswap"].percent}}% |
-
-
- | total: |
- {{result["memswap"].total | bytes:2}} |
-
-
- | used: |
- {{result["memswap"].used | bytes:2}} |
-
-
- | free: |
- {{result["memswap"].free | bytes:2}} |
-
-
-
-
-
-
-
-
-
-
-
-
- | NETWORK |
- Rx/s |
- Tx/s |
-
-
- | {{network.interface_name | min_size}}} |
- {{network.rx | bytes}} |
- {{network.rx | bytes}} |
- {{network.rx | bits}} |
- {{network.rx | bits}} |
-
-
-
-
+
+ TASKS {{result["processcount"].total}} ({{result["processcount"].thread}} thr), {{result["processcount"].running}} run,
+ {{result["processcount"].sleeping}} slp, {{result["processcount"].stopped}} oth sorted automatically by cpu_percent, flat view
+
-
-
-
-
- | DISK I/O |
- R/s |
- W/s |
-
-
- | {{disk.disk_name | min_size}} |
- {{disk.read_bytes | bytes}} |
- {{disk.write_bytes | bytes}} |
-
-
-
-
-
-
-
-
- | FILE SYS |
- Used |
- Total |
-
-
- | {{fs.mnt_point}} ({{fs.device_name}}) |
- {{fs.size - fs.free | bytes}} |
- {{fs.size | bytes}} |
-
-
-
-
-
-
-
-
-
- | SENSORS |
- °C |
-
-
- | {{sensor.label}} |
- {{sensor.value}} |
-
-
-
-
-
-
-
-
-
-
-
- | No warning or critical alert detected |
- {{alert}} |
-
-
-
-
+
-
- TASKS {{result["processcount"].total}} ({{result["processcount"].thread}} thr), {{result["processcount"].running}} run,
- {{result["processcount"].sleeping}} slp, {{result["processcount"].stopped}} oth
-
+
-
-
-
-
-
-
- | CPU% |
- MEM% |
- VIRT |
- RES |
- PID |
- USER |
- NI |
- S |
- TIME+ |
- IOR/s |
- IOW/s |
- Command |
-
-
- | {{process.cpu_percent | number:1}} |
- {{process.memory_percent | number:1}} |
- {{process.memvirt | bytes:1}} |
- {{process.memres | bytes:1}} |
- {{process.pid}} |
- {{process.username}} |
- {{process.nice | exclamation}} |
- {{process.status}} |
- {{process.timeformatted}} |
- {{process.io_read | bytes}} |
- {{process.io_write | bytes}} |
- {{process.name}} |
-
-
-
-
-
-
-
+
+
+
+
CPU%
+
MEM%
+
VIRT
+
RES
+
PID
+
USER
+
NI
+
S
+
TIME+
+
IOR/s
+
IOW/s
+
Command
+
+
+
{{process.cpu_percent | number:1}}
+
{{process.memory_percent | number:1}}
+
{{process.memvirt | bytes:1}}
+
{{process.memres | bytes:1}}
+
{{process.pid}}
+
{{process.username}}
+
{{process.nice | exclamation}}
+
{{process.status}}
+
{{process.timeformatted}}
+
{{process.io_read | bytes}}
+
{{process.io_write | bytes}}
+
{{process.name}}
+
+
+
+
+
+
-
+
\ No newline at end of file
diff --git a/glances/outputs/glances_bottle.py b/glances/outputs/glances_bottle.py
index 4138a8bc..4f17ad61 100644
--- a/glances/outputs/glances_bottle.py
+++ b/glances/outputs/glances_bottle.py
@@ -150,10 +150,18 @@ class GlancesBottle(object):
return statval
else:
path = "~/glances/"
- if is_windows:
+ if is_windows:
path = "D:\\glances\\"
- f = open(path + "debug.json")
- return f.read()
+ filepath = path + "debug.json"
+
+ if os.path.exists(filepath):
+ logger.debug("File exists : {0}.".format(filepath))
+
+ f = open(path + "debug.json")
+ return f.read()
+
+ logger.warn("File does not exist : {0}.".format(filepath))
+ return ""
def _api(self, plugin):
"""
diff --git a/glances/outputs/static/css/style.css b/glances/outputs/static/css/style.css
index cca59ef4..130bdb1c 100644
--- a/glances/outputs/static/css/style.css
+++ b/glances/outputs/static/css/style.css
@@ -29,7 +29,10 @@ body {
.sort{
font-weight: bold;
}
-.sort:after{
+.sort_asc:after {
+ content: '\25B2'
+}
+.sort_desc:after {
content: '\25BC'
}
.text-right {
diff --git a/glances/outputs/static/js/controllers.js b/glances/outputs/static/js/controllers.js
index 778fbb52..db84e6ef 100644
--- a/glances/outputs/static/js/controllers.js
+++ b/glances/outputs/static/js/controllers.js
@@ -35,15 +35,15 @@ glancesApp.filter('bytes', function() {
glancesApp.filter('bits', function() {
return function (bits, precision) {
if (isNaN(parseFloat(bits)) || !isFinite(bits) || bits == 0){
- return '0bit';
+ return '0b';
}
- var units = ['bit', 'kbit', 'Mbit', 'Gbit', 'Tbit', 'Pbit'],
+ var units = ['b', 'kb', 'Mb', 'Gb', 'Tb', 'Pb'],
number = Math.floor(Math.log(bits) / Math.log(1000));
return (bits / Math.pow(1000, Math.floor(number))).toFixed(precision) + units[number];
}
});
-glancesApp.controller('bodyController', [ '$scope', '$http', '$interval', '$q', function($scope, $http, $interval, $q) { //$routeParams
+glancesApp.controller('bodyController', [ '$scope', '$http', '$interval', '$q', function($scope, $http, $interval, $q) {
$scope.limitSuffix = ['critical', 'careful', 'warning']
$scope.refreshTime = 3
@@ -61,8 +61,7 @@ glancesApp.controller('bodyController', [ '$scope', '$http', '$interval', '$q',
}
$scope.networkSortByBytes = false
- /*
- $scope.init_refresh_time = function() {
+ /*$scope.init_refresh_time = function() {
if ($routeParams != undefined && $routeParams.refresh_time != undefined) {
var new_refresh_time = parseInt($routeParams.refresh_time)
if (new_refres_time >= 1) {