Domanda

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?

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top