Some experiences in system development
[Structlayout (layoutkind. Sequential)]
Public struct memory_info
...{
Public uint dwlength;
Public uint dwmemoryload;
Public uint dwtotalphys;
Public uint dwavailphys;
Public uint dwtotalpagefile;
Public uint dwavailpagefile;
Public uint dwtotalvirtual;
Public uint dwavailvirtual;
} Servername. Text = server. machinename;
Serverms. Text = environment. osversion. tostring ();
Serverip. Text = request. servervariables ["local_addr"];
Server_name.text = request. servervariables ["http_host"];
Serversoft. Text = request. servervariables ["server_software"];
Servernet. Text = environment. version. Major + "." + environment. version. Minor + "." + environment. version. Build + "." + environment. version. revision;
Serverhttps. Text = request. servervariables ["HTTPS"];
SERVERPORT. Text = request. servervariables ["server_port"];
Serverout. Text = server. scripttimeout. tostring ();
Servertime. Text = datetime. Now. tostring ();
Serverarea. Text = (datetime. Now-datetime. utcnow). totalhours> 0? "+" + (Datetime. Now-datetime. utcnow). totalhours. tostring (): (datetime. Now-datetime. utcnow). totalhours. tostring ();
Try
...{
Aspnetn. Text = (system. Diagnostics. process. getcurrentprocess (). workingset64/1048576). tostring ("N2") + "MB ";
}
Catch
...{
Aspnetn. Text = "the system rejects the request. ";
}
Try
...{
Aspnetcpu. Text = (system. Diagnostics. process. getcurrentprocess (). totalprocessortime). totalseconds. tostring ("N0") + "seconds ";
}
Catch
...{
Aspnetcpu. Text = "the system rejects the provision. ";
}
// Serverstart. Text = (system. environment. tickcount/3600000). tostring ("N2 ");
Try
...{
Prstart. Text = system. Diagnostics. process. getcurrentprocess (). starttime. tostring ();
}
Catch
...{
Prstart. Text = "the system rejects the offer. ";
}
Cpuc. Text = environment. getenvironmentvariable ("number_of_processors ");
Cputype. Text = environment. getenvironmentvariable ("processor_identifier"); // call the globalmemorystatus function to obtain information about the memory.
Memory_info meminfo;
Meminfo = new memory_info ();
Globalmemorystatus (ref meminfo );
Meminfo. dwmemoryload + "% ";
Dfilesize (meminfo. dwtotalphys );
Dfilesize (meminfo. dwavailphys );
Dfilesize (meminfo. dwtotalpagefile );
Dfilesize (meminfo. dwavailpagefile );
Dfilesize (meminfo. dwtotalvirtual );
Request. servervariables ["appl_physical_path"];
Request. servervariables ["path_translated"];
Session. Contents. Count. tostring ();
Application. Contents. Count. tostring ();
Timespan etime = datetime. Now. timeofday;
Timespan T = etime. Subtract (stime );
Runtime. Text = T. totalmilliseconds. tostring ();