Implement OS detection and enhance disk monitoring in ServerMonitor
- Added OS detection functionality to the ServerMonitor class, allowing for tailored disk usage and uptime calculations based on the operating system (macOS or Ubuntu). - Introduced methods for retrieving disk usage and I/O statistics specific to the detected OS. - Updated the process status check to return uptime information for monitored processes. - Enhanced the status message format to include disk space emojis and process uptime details. - Updated tests to reflect changes in process status checks and output formatting.
This commit is contained in:
@@ -49,10 +49,10 @@ async def test_monitor():
|
||||
print(f"Uptime: {system_info['system_uptime']}")
|
||||
|
||||
print("\n🤖 Проверка статуса процессов...")
|
||||
voice_status = monitor.check_process_status('voice_bot')
|
||||
helper_status = monitor.check_process_status('helper_bot')
|
||||
print(f"Voice Bot: {voice_status}")
|
||||
print(f"Helper Bot: {helper_status}")
|
||||
voice_status, voice_uptime = monitor.check_process_status('voice_bot')
|
||||
helper_status, helper_uptime = monitor.check_process_status('helper_bot')
|
||||
print(f"Voice Bot: {voice_status} - {voice_uptime}")
|
||||
print(f"Helper Bot: {helper_status} - {helper_uptime}")
|
||||
|
||||
print("\n📝 Тестирование отправки статуса...")
|
||||
await monitor.send_status_message(system_info)
|
||||
|
||||
Reference in New Issue
Block a user