需要看看服务器的情况常常要用到探针 这里是一个.net写的 参考下
代码如下(可直接复制到.aspx文件中使用):

<%@ Page Language="C#"%>
<%@ Import Namespace="System.Globalization"%>
<%@ Import Namespace="Microsoft.Win32" %>
<%@ Import Namespace="System.IO"%>
<%@ Import Namespace="System.Diagnostics" %>



asp.net 探针

<%
//代码多有参考网络,特此申明,设计:阿会楠 sosuo8.com 可把代码直接复制到任何页面直接使用,代码为我所用,非我所想
Response.Write("计算机名:");
Response.Write("http://" + HttpContext.Current.Request.Url.Host + HttpContext.Current.Request.ApplicationPath + "
");
Response.Write("IP地址:");
Response.Write(Request.ServerVariables["LOCAl_ADDR"] + "
");
Response.Write("域名:");
Response.Write(Request.ServerVariables["SERVER_NAME"].ToString() + "
");
Response.Write("端口:");
Response.Write(Request.ServerVariables["Server_Port"].ToString() + "
");
Response.Write("本文件所在路径:");
Response.Write(Request.PhysicalApplicationPath + "
");
Response.Write("操作系统:");
Response.Write(Environment.OSVersion.ToString() + "
");
Response.Write("操作系统所在文件夹:");
Response.Write(Environment.SystemDirectory.ToString() + "
");
Response.Write("脚本超时时间:");
Response.Write((Server.ScriptTimeout / 1000).ToString() + "秒" + "
");
Response.Write("系统语言:");
Response.Write(CultureInfo.InstalledUICulture.EnglishName + "
");
Response.Write(".NET版本:");
Response.Write(string.Concat(new object[] { Environment.Version.Major, ".", Environment.Version.Minor, Environment.Version.Build, ".", Environment.Version.Revision }) + "
");
Response.Write("IE版本:");
RegistryKey key = Registry.LocalMachine.OpenSubKey(@"SOFTWAREMicrosoftInternet ExplorerVersion Vector");
Response.Write(key.GetValue("IE", "未检测到").ToString() + "
");
Response.Write("启动到现在已运行:");
Response.Write(((Environment.TickCount / 0x3e8) / 60).ToString() + "分钟" + "
");
Response.Write("逻辑驱动器:");
string[] achDrives = Directory.GetLogicalDrives();
for (int i = 0; i < Directory.GetLogicalDrives().Length - 1; i++)
{
Response.Write(achDrives[i].ToString());
}
Response.Write("
");
Response.Write("CPU 数量:");
Response.Write(Environment.GetEnvironmentVariable("NUMBER_OF_PROCESSORS").ToString() + "
");
Response.Write("CPU类型:");
Response.Write(Environment.GetEnvironmentVariable("PROCESSOR_IDENTIFIER").ToString() + "
");
Response.Write("ASP.NET所站内存:");
Response.Write(((Double)Process.GetCurrentProcess().WorkingSet64 / 1048576).ToString("N2") + "M" + "
");
Response.Write("ASP.NET所占CPU:");
Response.Write(((TimeSpan)Process.GetCurrentProcess().TotalProcessorTime).TotalSeconds.ToString("N0") + "%
");
Response.Write("当前系统用户名:");
Response.Write(Environment.UserName + "
");
%>

显示效果

引用内容
计算机名:http://localhost/探针
IP地址:127.0.0.1
域名:localhost
端口:1435
本文件所在路径:E:myaspx探针
操作系统:Microsoft Windows NT 5.1.2600 Service Pack 2
操作系统所在文件夹:C:WINDOWSsystem32
脚本超时时间:0秒系统语言:Chinese (People's Republic of China)
.NET版本:2.050727.42
IE版本:6.0000
启动到现在已运行:111分钟
逻辑驱动器:C:D:E:F:G:H:
CPU 数量:2
CPU类型:x86 Family 15 Model 6 Stepping 5, GenuineIntel
ASP.NET所站内存:31.60M
ASP.NET所占CPU:3%
当前系统用户名:nan