diff --git a/README.md b/README.md index 19430ac..171bbe8 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -pyDash +pyDash - v1.2 ====== A small web monitoring dashboard for your linux pc/server writen in Python and Django + Chart.js. @@ -9,7 +9,7 @@ The dashboard is built using only Python libraries available in the main Python Current dependencies: - == Django 1.6.1 - + - >= Python 2.6 __[View Demo](http://pydash.hostechs.com/)__ @@ -48,6 +48,7 @@ pyDash was tested and runs under the following OSs: - Debian - Raspbian - Pidora + - Arch Linux Might work under others, but didn't get to test any other OSs just yet. diff --git a/main/views.py b/main/views.py index b2dddad..ad1d9ef 100755 --- a/main/views.py +++ b/main/views.py @@ -142,7 +142,7 @@ def get_traffic(request): data = pipe.read().strip().split(':',1)[-1] pipe.close() - if data == ' 0': + if not data[0].isdigit(): pipe = os.popen("cat /proc/net/dev |" + "grep " + request + "| awk '{print $2, $10}'") data = pipe.read().strip().split(':',1)[-1] pipe.close() @@ -169,6 +169,9 @@ def get_platform(): osname = " ".join(platform.linux_distribution()) uname = platform.uname() + if osname == ' ': + osname = uname[0] + data = {'osname': osname, 'hostname': uname[1], 'kernel': uname[2] } except Exception,err: