随笔 - 25  文章 - 0 评论 - 10 阅读 - 20101
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

   

 

 

 <table cellspacing="1" cellpadding="3" width="90%" align="center" bgcolor="#ffffff"
                border="0">
                <tbody>
                    <tr>
                        <td class="th1" align="center" colspan="2" height="25">
                            服务器信息统计
                        </td>
                    </tr>
                    <tr bgcolor="#f9fbf0">
                        <td style="height: 24px; width: 50%; text-align: left;">
                            &nbsp;<strong>服务器名</strong>:<%=System.Environment.MachineName%></td>
                    </tr>
                    <tr bgcolor="#f9fbf0">
                        <td width="50%" style="height: 24px; text-align: left;">
                            &nbsp;<b>服务器端口:</b><%= HttpContext.Current.Request.ServerVariables["Server_Port"].ToString() %></td>
                    </tr>
                    <tr bgcolor="#f9fbf0">
                        <td style="height: 23px; width: 50%; text-align: left;">
                            &nbsp;<b>脚本解释引擎:</b><%=System.Environment.Version%></td>
                    </tr>
                    <tr bgcolor="#f9fbf0">
                        <td width="50%" style="height: 23px; text-align: left;">
                            <b>&nbsp;站点物理路径:</b><%=HttpContext.Current.Request.PhysicalApplicationPath.ToString() %></td>
                    </tr>
                    <tr bgcolor="#f9fbf0">
                        <td style="height: 23px; width: 50%; text-align: left;">
                            &nbsp;<b>服务器CPU个数:</b><%=System.Environment.ProcessorCount %>
                        </td>
                    </tr>
                    <tr bgcolor="#f9fbf0">
                        <td width="50%" style="height: 23px; text-align: left;">
                            &nbsp;<b>服务器IIS版本:</b><%=Request.ServerVariables["SERVER_SOFTWARE"]%></td>
                    </tr>
                    <tr bgcolor="#f9fbf0">
                        <td style="width: 50%; height: 23px; text-align: left;">
                            &nbsp;<b>开机运行时长</b>:<%=(System.Environment.TickCount/3600000).ToString("N2")%>
                            小时
                        </td>
                    </tr>
                    <tr bgcolor="#f9fbf0">
                        <td width="50%" style="height: 25px; text-align: left;">
                            <b>&nbsp;服务器时间:</b><%=DateTime.Now.ToString() %></td>
                    </tr>
                    <tr bgcolor="#f9fbf0">
                        <td width="50%" style="height: 23px; text-align: left;">
                            <b>&nbsp;服务器变量:</b>Session(<%=Session.Contents.Count%>) Application(<%
                                                                                                    if (Application.Contents.Count > 2)
                                                                                                    {
                                                                                                        Response.Write(Application.Contents.Count - 2);
                                                                                                    }
                                                                                                    else
                                                                                                    {
                                                                                                        Response.Write(Application.Contents.Count);
                                                                                                    }
                            %>)</td>
                    </tr>
                    <tr bgcolor="#f9fbf0">
                        <td colspan="2" style="height: 23px; text-align: left;">
                            &nbsp;<b>服务器操作系统:</b><span>
                                <%=System.Environment.OSVersion.ToString()%>
                            </span>
                        </td>
                    </tr>
                </tbody>
            </table>

posted on   〤‵坠落者...  阅读(384)  评论(0编辑  收藏  举报
编辑推荐:
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
阅读排行:
· winform 绘制太阳,地球,月球 运作规律
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· AI 智能体引爆开源社区「GitHub 热点速览」
· Manus的开源复刻OpenManus初探
· 写一个简单的SQL生成工具
点击右上角即可分享
微信分享提示