怎麼樣可以順利的監控所有的主機運作的狀態
雖然現在訪間有很多第三方的免費軟體可以使用
不過頗多都是linux系統,我一整個完敗呀....
最方便的做法當然就是寫winForm,問題是這樣就被卡死在主機上面了
所以決定寫WebApp來處理這個問題,順便構接後續藍圖
主要參考的文章
private static bool testServiceconnet(string IP, int port)
{
try
{
IPHostEntry host = Dns.GetHostEntry(IP);
IPAddress ip = host.AddressList[0];
TcpClient tcp = new TcpClient();
tcp.Connect(ip, port);
tcp.Close();
return true;
}
catch
{
return false;
}
}
把IP跟port餵牠吃就可以囉!!
2014/12/31 更新
try server 2003無法正常
Dual Mode Sockets - Never create an IPv4 Socket again
2014/12/31 更新
try server 2003無法正常
Dual Mode Sockets - Never create an IPv4 Socket again
沒有留言:
張貼留言