update doc

This commit is contained in:
BryantHe 2023-08-10 13:01:49 +08:00
parent bc88caa9c9
commit 29bde845e4
1 changed files with 5 additions and 3 deletions

View File

@ -12,7 +12,7 @@ api = APIBlueprint('api', __name__)
def hello():
result_one = f'我是您的专属接口提供服务器: {os.environ["HOSTNAME"]}'
result_two = f'我的机器参数如下'
result_three = f'操作系统:{platform.system()}CPU 核数:{psutil.cpu_count()},目前 CPU 占用率: {psutil.cpu_percent()}'
result_three = f'操作系统:{platform.system()}'
text = """
<style type="text/css">
* {
@ -68,9 +68,11 @@ def hello():
<span style="font-size:20px">
<a href=""> """ + result_three + """</a>
<br />
<a href=""> """ + f'总内存 {psutil.virtual_memory().total / 1024 / 1024},使用中内存:{round(psutil.virtual_memory().used / 1024 / 1024, 2)}' + """</a>
<a href=""> """ + f'CPU 核数:{psutil.cpu_count()},目前 CPU 占用率: {psutil.cpu_percent()}' + """</a>
<br />
<a href=""> """ + f'磁盘总空间 {round(psutil.disk_usage("/").total / 1024 / 1024 / 1024, 2)},磁盘使用情况:{round(psutil.disk_usage("/").used / 1024 / 1024 / 1024, 2)}' + """</a>
<a href=""> """ + f'总内存 {psutil.virtual_memory().total / 1024 / 1024} MB使用中内存{round(psutil.virtual_memory().used / 1024 / 1024, 2)} MB' + """</a>
<br />
<a href=""> """ + f'磁盘总空间 {round(psutil.disk_usage("/").total / 1024 / 1024 / 1024, 2)} G磁盘使用情况{round(psutil.disk_usage("/").used / 1024 / 1024 / 1024, 2)} G' + """</a>
</span>
</p>
</div>