Exemplo n.º 1
0
        public State(string addr)
        {
            this.addr = addr;
            var fi = new System.IO.FileInfo(fn);

            if (fi.Exists)
            {
                pos = fi.Length;
            }
            var qy = from a in SinglePing.Tracert(addr) select a.ToString();

            var trace = string.Join("->", qy.ToArray());

            log(string.Format("*START* {0}", trace));
        }
Exemplo n.º 2
0
 static void Main(string[] args)
 {
     Console.WriteLine("This is Lercher.Ping, (c) 2017 by Cassiopae Gmbh, M. Lercher");
     if (args.Length == 1)
     {
         var addr  = args[0]; // 172.29.248.109 -> vmwbuild.kfra1.cassiopae.lan
         var state = new State(addr);
         while (true)
         {
             var r = SinglePing.Ping(addr);
             state.log(r);
             System.Threading.Thread.Sleep(10000);
         }
     }
     else
     {
         System.Console.WriteLine("usage: Lercher.ping <name-or-ipaddr>");
         System.Console.WriteLine("  pings every 10s with 32bytes and logs to ping.log");
     }
 }