国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發設計 > 正文

查看主機的內存使用情況

2019-11-18 21:26:18
字體:
來源:轉載
供稿:網友
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>

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 宁都县| 拉萨市| 宜阳县| 徐水县| 广灵县| 永胜县| 麻江县| 自贡市| 岗巴县| 仁寿县| 邵武市| 容城县| 宜城市| 韶山市| 蕉岭县| 新沂市| 开平市| 天全县| 长兴县| 墨江| 固安县| 昌乐县| 牟定县| 牡丹江市| 辽宁省| 邵东县| 五常市| 秦安县| 孟连| 五华县| 永嘉县| 浪卡子县| 龙州县| 长泰县| 资兴市| 河津市| 桓台县| 阿鲁科尔沁旗| 鄂尔多斯市| 潞西市| 莱州市|