Exemplo n.º 1
0
        public static void Main(string[] args)
        {
            var          fs        = new StreamReader("./hosts.json");
            string       jsonValue = fs.ReadToEnd();
            hostinfo     info      = JsonConvert.DeserializeObject <hostinfo>(jsonValue);
            getcpudata   data      = new getcpudata(1, info);
            printcpudata yes       = new printcpudata();

            data.gatherdata();
            Thread.Sleep(1000);
            data.gatherdata();
            while (true)
            {
                Thread.Sleep(1000);
                data.gatherdata();
                yes.getdata(data.returndata());
                yes.printdata();
            }
        }
Exemplo n.º 2
0
 public getcpudata(int threadcount, hostinfo info)
 {
     ssh = new SshClient(info.hostname, info.username, info.password);
     ssh.Connect();
     thread_array = new float[threadcount, 6];
 }