Get Process Model Info (C#) : Process Info « Development « ASP.Net

Home
ASP.Net
1.ADO.net Database
2.Ajax
3.Asp Control
4.Collections
5.Components
6.Data Binding
7.Development
8.File Directory
9.HTML Control
10.Language Basics
11.Login Security
12.Mobile Control
13.Network
14.Page
15.Request
16.Response
17.Server
18.Session Cookie
19.Sitemap
20.Theme Style
21.User Control and Master Page
22.Validation by Control
23.Validation by Function
24.WebPart
25.WPF
26.XML
ASP.Net » Development » Process Info 
Get Process Model Info (C#)

<html>
<head>
<title>ASP.NET Process Info</title>
</head>
<body>
<script Language="c#" runat=server>
void Page_Load(object sender, EventArgs e)
{
  ProcessInfo[] history = ProcessModelInfo.GetHistory(10);
  for(int i = 0; i< history.Length; i++)
  {
     Response.Write ("<table border>");
     Response.Write ("<tr><td>ASP.NET Process Start Date and Time<td>" 
                     history[i].StartTime.ToString());
     Response.Write ("<tr><td>Process Age ( HH:MM:SS:LongDecimal )<td>" 
                     history[i].Age.ToString());
     Response.Write ("<tr><td>Process ID ( The same as in Task Manager )<td>" 
                     history[i].ProcessID.ToString());
     Response.Write ("<tr><td>Total Request Count (Requests served since the " 
                    "process started)<TD>" + history[i].RequestCount.ToString());
     Response.Write ("<tr><td>Peak Memory Used ( KB ) <td>" 
                     history[i].PeakMemoryUsed.ToString());
     Response.Write ("</table>");
  }
}
</script>
</body>
</html>

           
       
Related examples in the same category
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.