mirror of
https://github.com/TriM-Organization/LiteyukiBot-TriM.git
synced 2024-11-28 16:24:51 +08:00
fix: CPU频率显示位数超出范围
fix: 空驱动器显示在面板位置
This commit is contained in:
parent
1b3d82ebe2
commit
731f07e062
@ -128,6 +128,7 @@ async def get_stats_data(self_id: str = None, lang: str = None):
|
||||
disk_usage = psutil.disk_usage(disk.mountpoint)
|
||||
disk_total_show = convert_size(disk_usage.total, 1)
|
||||
disk_free_show = convert_size(disk_usage.free, 1)
|
||||
if disk_usage.total > 0:
|
||||
disk_data.append(
|
||||
{
|
||||
"name" : disk.device,
|
||||
@ -191,7 +192,7 @@ async def get_stats_data(self_id: str = None, lang: str = None):
|
||||
f"{brand} {cpu_info.get('arch', 'Unknown')}",
|
||||
f"{fake_device_info.get('cpu', {}).get('cores', psutil.cpu_count(logical=False))}C "
|
||||
f"{fake_device_info.get('cpu', {}).get('logical_cores', psutil.cpu_count(logical=True))}T",
|
||||
f"{fake_device_info.get('cpu', {}).get('frequency', psutil.cpu_freq().current) / 1000}GHz"
|
||||
f"{'%.2f' % (fake_device_info.get('cpu', {}).get('frequency', psutil.cpu_freq().current) / 1000)}GHz"
|
||||
],
|
||||
"memTags" : [
|
||||
f"Bot {mem_used_bot_show}",
|
||||
|
Loading…
Reference in New Issue
Block a user