문제

I'm trying to find a way to have my RoR application to get system information. Kind of like if I could ssh into the server and do a df and get the response. Same with doing a top command. How would I go about doing this? I could have a database of server IP's and a username/password for a user who would have the ability to do a df/top command. What's the best way of doing this?

도움이 되었습니까?

해결책

There is a gem for Ruby for using SSH2, called net-ssh: http://rubygems.org/gems/net-ssh Select a version from http://net-ssh.rubyforge.org/ (1.x or 2.x) to view documentation.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top