I am trying to get CPU Logs from different computers in a system. I have a python script which fetches the logs for a single computer at different timestamp. Now integrating this to a system of computers would need Logs from different computers at same timestamp.
Let's consider I have Computer A and Computer B. I execute the command on my server at timestamp X, now Logs are collected at time X on computer A and the output file is received on server. Now Log would be received from the Computer B at time X+delta X(as delta X amount has passed in execution on computer A) and the output would be received on server.
I want both the logs to be received at same timestamps. I thought of Multithreading but creating too many threads on a large system would not work. Is there a better alternative?.
Thanks
PS: I am using psutil
to collect logs and ssh
to log in remoter server