Created
July 6, 2021 12:21
-
-
Save codemation/3ae4f803cb3e32126ce1eba064eb2771 to your computer and use it in GitHub Desktop.
Chart Creation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# set initial sync time | |
time_now=datetime.datetime.now().isoformat()[11:19] | |
await server.charts.create_dataset( | |
'cpu', | |
labels=[time_now], | |
dataset=[psutil.cpu_percent()] | |
) | |
await server.charts.create_dataset( | |
'mem', | |
labels=[time_now], | |
dataset=[psutil.virtual_memory().percent] | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment