CPU/Network monitoring

131 Views Asked by At

I have basic Python and Unix questions around CPU/Network monitoring. I am running an app listening to some Websockets and saving incoming data to files (Python3.6, asyncio, aiohttp and aiofiles). About 300 KB/sec receiving.

  1. Using "top", I get 100% CPU usage. Does that mean I'm at capacity and therefore at risk of losing packets, or is it just something artificial to do with async programming? Profiling shows it's spending most of the time reading Websocket data. I don't really understand how an I/O app can consume such much CPU.
  2. Is there any tools I can use to send warnings if I each CPU or Network capacity - so I can act before risking losing data? Preferably in Python, but if not I could always run a system command from Python.
0

There are 0 best solutions below