I have a couple of Linux-servers. And I want one of them to display resource usage on the other ones. For instance CPU-load, RAM (total, used and available) and so on.
What I am looking for is an PHP-class or similar that possibly might get the data from Webmin (installed on all servers) or maybe through SSH.
Thanks in advance :)
- 点赞 评论 复制链接分享
Unless Webmin provides some sort of api type interface, you would have to login, via ssh, to each server and run a set of commands to get all the data. This can be done using
execor with ssh library in PHP.
A more efficient option would be to have all servers report relevant stats on an interval to a central database. Then you could query that database to get information on any of the stats you were looking for.点赞 评论 复制链接分享