Answer the question
In order to leave comments, you need to log in
How to collect information about remote Linux servers (ssh)?
What would you advise to collect information about remote Linux servers (there is only ssh access)?
It is desirable to write complete (OS, installed packages, users, processes, etc.) information on several hosts into one HTML/CSV file.
I really do not want to reinvent the wheel :-)
Thanks in advance to everyone for the answers!
Answer the question
In order to leave comments, you need to log in
I would do this:
In the servers.list file, write a list of the form [email protected] Then take the script bullium.com/aboutme/index.html or bash.cyberciti.biz/guide/Getting_information_about_your_system or write your own depending on the requirements. Command:
cat servers.list | while read i ; do scp -r script.sh* "$i":/usr/local/etc/ ; done
copy this script to all servers. Then using pdsh:
pdsh -R ssh -w ^~/.servers.list chmod +x /usr/local/etc/script.sh
pdsh -R ssh -w ^~/.servers.list /usr/local/etc/script.sh > /usr/local/log/systeminfo.log
Take a look at this bike: http://www.cfg2html.com/
Display a bunch of information in html and txt format, maybe even more than you need.
recently there was an article on habré, it seems about ssh,
you can remotely run commands there and get output here,
so several cycles are done - hardware, users, package lists are assembled ...
if the distribution kit is the same everywhere - even easier
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question