update doc
This commit is contained in:
parent
56f93165ba
commit
ad2d01f0a1
|
@ -1,4 +1,5 @@
|
||||||
import socket
|
import socket
|
||||||
|
import os
|
||||||
import platform
|
import platform
|
||||||
import psutil
|
import psutil
|
||||||
|
|
||||||
|
@ -9,7 +10,7 @@ api = APIBlueprint('api', __name__)
|
||||||
|
|
||||||
@api.get('/hello')
|
@api.get('/hello')
|
||||||
def hello():
|
def hello():
|
||||||
result_one = f'我是您的专属接口提供服务器: {socket.gethostname()}'
|
result_one = f'我是您的专属接口提供服务器: {platform.node()}'
|
||||||
result_two = f'我的机器参数如下'
|
result_two = f'我的机器参数如下'
|
||||||
result_three = f'操作系统:{platform.system()},CPU 核数:{psutil.cpu_count()},目前 CPU 占用率: {psutil.cpu_percent()}'
|
result_three = f'操作系统:{platform.system()},CPU 核数:{psutil.cpu_count()},目前 CPU 占用率: {psutil.cpu_percent()}'
|
||||||
text = """
|
text = """
|
||||||
|
@ -65,8 +66,6 @@ def hello():
|
||||||
</span>
|
</span>
|
||||||
<br />
|
<br />
|
||||||
<span style="font-size:20px">
|
<span style="font-size:20px">
|
||||||
<a href=""> """ + result_three + """</a>
|
|
||||||
<br />
|
|
||||||
<a href=""> """ + result_three + """</a>
|
<a href=""> """ + result_three + """</a>
|
||||||
<br />
|
<br />
|
||||||
<a href=""> """ + f'总内存 {psutil.virtual_memory().total / 1024 / 1024},使用中内存:{round(psutil.virtual_memory().used / 1024 / 1024, 2)}' + """</a>
|
<a href=""> """ + f'总内存 {psutil.virtual_memory().total / 1024 / 1024},使用中内存:{round(psutil.virtual_memory().used / 1024 / 1024, 2)}' + """</a>
|
||||||
|
|
Loading…
Reference in New Issue