|
![]() |
名片设计 CorelDRAW Illustrator AuotoCAD Painter 其他软件 Photoshop Fireworks Flash |
|
http://www.asp888.net 豆腐技术站 这个是我在国外的一个站点上看到的使用Asp.Net得到一些系统变量的程序, 大家可以看看,其实这个程序没有多大的用处,只是说明一下asp.Net 的强盛功能而已。 <script language="C#" runat=server> void Page_Load(Object sender, EventArgs ev) { ProcessInfo[] history = ProcessModelInfo.GetHistory(100); for( int i=0; i<history.Length; i++ ) { Response.Write("StartTime:"+ history[i].StartTime.ToString() + "<BR>"); Response.Write("Age:" + history[i].Age.ToString() + "<BR>"); Response.Write("ProcessID:" + history[i].ProcessID.ToString() + "<BR>"); Response.Write("RequestCount:" + history[i].RequestCount.ToString() + "<BR>"); Response.Write("Status:" + GetProcessStatus(history[i].Status ) + "<BR>"); Response.Write("ShutdownReason:" + GetShutdownReason(history[i].ShutdownReason) + "<BR>"); Response.Write("PeakMemoryUsed:" + history[i].PeakMemoryUsed.ToString() + "<BR>"); } } public String GetProcessStatus( ProcessStatus ps ) { String s = "Unknown"; if( ps == ProcessStatus.Alive ) s = "Alive"; else if( ps == ProcessStatus.ShuttingDown ) s = "Shutting Down"; else if( ps == ProcessStatus.ShutDown ) s = "Shutdown"; else if( ps == ProcessStatus.Terminated ) s = "Terminated"; return s; } public String GetShutdownReason( ProcessShutdownReason psr ) { String s = "Unknown"; if( psr == ProcessShutdownReason.None ) s = "N/A"; else if( psr == ProcessShutdownReason.Unexpected ) s = "Unexpected"; else if( psr == ProcessShutdownReason.RequestsLimit ) s = "Requests Limit"; else if( psr == ProcessShutdownReason.RequestQueueLimit ) s = "Request Queue Limit"; else if( psr == ProcessShutdownReason.Timeout ) s = "Timeout"; else if( psr == ProcessShutdownReason.IdleTimeout ) s = "Idle Timeout"; else if( psr == ProcessShutdownReason.MemoryLimitExceeded ) s = "Memory Limit Exceeded"; return s; } </script> 返回类别: 教程 上一教程: 使用纯粹的asp+语言制作的栏目治理(三) 下一教程: 用排序串字段实现树状结构(例程??删除贴子) 您可以阅读与"查看主机的内存使用情况"相关的教程: · 通过网络域名得到这台主机的IP地址 · 在不支持FSO的服务器上使用XMLDOM创建HTML文件 · 使用FSO把文本信息导入数据库 · IIS使用10则 · ASPJPEG组件高级使用方式介绍 |
![]() ![]() |
快精灵印艺坊 版权所有 |
首页![]() ![]() ![]() ![]() ![]() ![]() ![]() |