Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
monitor-client
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
ff377c98
authored
Mar 07, 2015
by
Bach Dániel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add systemd unit file
parent
ff94bbc2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
2 deletions
+18
-2
miscellaneous/monitor-client.service
+13
-0
src/client.py
+5
-2
No files found.
miscellaneous/monitor-client.service
0 → 100644
View file @
ff377c98
[Unit]
Description=CIRCLE monitor-client
After=network.target
[Service]
User=cloud
Group=cloud
WorkingDirectory=/home/cloud/monitor-client
ExecStart=/bin/bash -c "source /etc/profile; workon monitor-client; exec python manage.py run"
Restart=always
[Install]
WantedBy=multi-user.target
src/client.py
View file @
ff377c98
...
...
@@ -118,8 +118,11 @@ class Client:
'system.boot_time'
:
psutil
.
boot_time
()
}
for
k
,
v
in
psutil
.
disk_io_counters
()
.
__dict__
.
items
():
metrics
[
'disk.
%
s'
%
k
]
=
v
try
:
for
k
,
v
in
psutil
.
disk_io_counters
()
.
__dict__
.
items
():
metrics
[
'disk.
%
s'
%
k
]
=
v
except
:
pass
interfaces
=
psutil
.
network_io_counters
(
pernic
=
True
)
for
interface
,
data
in
interfaces
.
iteritems
():
...
...
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