Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wspy-monitor
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
wspy-monitor
Commits
b2feaa96
Commit
b2feaa96
authored
Aug 30, 2013
by
Taddeüs Kroes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup
parent
1acdcc82
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
monitor.coffee
monitor.coffee
+1
-1
server.py
server.py
+2
-2
No files found.
monitor.coffee
View file @
b2feaa96
...
...
@@ -26,7 +26,7 @@ connect = ->
console
.
log
'msg'
,
msg
.
data
data
=
JSON
.
parse
(
msg
.
data
)
set
(
'release'
,
data
.
os
)
if
data
.
os
set
(
'release'
,
data
.
release
)
if
data
.
release
set
(
'uptime'
,
fmt_time
(
data
.
uptime
))
if
data
.
uptime
...
...
server.py
View file @
b2feaa96
...
...
@@ -43,7 +43,7 @@ def stats():
# Memory usage
with
open
(
'/proc/meminfo'
,
'r'
)
as
f
:
for
line
in
f
.
readlines
()
:
for
line
in
f
:
if
line
.
startswith
(
'MemTotal'
):
assert
line
.
endswith
(
'kB
\
n
'
)
total
=
int
(
line
.
split
()[
1
])
...
...
@@ -62,6 +62,7 @@ def stats():
yield
'disk'
,
(
used
,
used
+
avail
)
break
if
__name__
==
'__main__'
:
server
=
websocket
(
extensions
=
[
WebkitDeflateFrame
()])
server
.
setsockopt
(
socket
.
SOL_SOCKET
,
socket
.
SO_REUSEADDR
,
1
)
...
...
@@ -83,7 +84,6 @@ if __name__ == '__main__':
while
True
:
if
not
clients
:
time
.
sleep
(
6
)
#time.sleep(.1)
continue
status
=
Frame
(
OPCODE_TEXT
,
json
.
dumps
(
dict
(
stats
())))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment