import codecs
import re
import os
MODE_GATEWAY = [['地市','10分钟登陆用户量','接口调用量','鉴权成功率','redis内存占用比'],
['某接口','\t\t\t0','\t\t0','\t\t0','\t\t0']]
def ShowData():
for i in range(len(MODE_GATEWAY)): # 控制行,0~2
for j in range(len(MODE_GATEWAY[i])): # 控制列
print(MODE_GATEWAY[i][j], end='\t\t')
print()
import os
def StatusCode():
CodeData = os.popen('sh /root/StatuCode.sh')
a = CodeData.read()
a = a.split(' ')
for i in range(len(a)):
if a[i] == '200':
b =a[i+1]
return b
if __name__ == '__main__':
b=StatusCode()
MODE_GATEWAY[1][1]=b
ShowData()
11-01
3557