I am trying to monitor the cpu usage on a few different systems, and am trying to execute the 'top -n1' command.
I am receiving: this.OutputStream.ReadTimeout' threw an exception of type 'System.InvalidOperationException' and no results
Any suggestions or a better way to accomplish this?
var cmd = ssh.CreateCommand ( "top -n1" );
var asynch = cmd.BeginExecute(delegate(IAsyncResult ar)
var reader = new StreamReader(cmd.OutputStream);
var result = reader.ReadToEnd();