Answer the question
In order to leave comments, you need to log in
How can I implement a bash script Load monitoring?
Actually the subject, you need to write a BASH script that will monitor the CPU load on different servers, so the question is, how best to implement a connection to the servers? i.e. it is necessary that he ran let's say on 4 servers wrote down the values top | grep CPU , I believe that I would write this value to a variable, then do operations with the rest of the servers and, as a result, on the computer on which it was launched, write the data to a file such as log.txt (It should be of this form Server name, time, well and the top output itself).
The script will be run by cron every 5 minutes, it is important that a new value is written to the log.txt file but the old one is not overwritten.
So here are the questions
How to do authentication?
And how to organize such data output to a file?
Thank you all for your help!
Answer the question
In order to leave comments, you need to log in
Yeah, and then such kulibins are updated in a cycle through the ssh-key system and backups are made.
For these purposes, there are a huge variety of monitoring systems .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question