zoukankan      html  css  js  c++  java
  • asp.net获取服务器信息

    String serverOS = Environment.OSVersion.ToString();
    String CpuSum 
    = Environment.GetEnvironmentVariable("NUMBER_OF_PROCESSORS");// CPU个数:
    String CpuType = Environment.GetEnvironmentVariable("PROCESSOR_IDENTIFIER");// CPU类型:
    String ServerSoft = Request.ServerVariables["SERVER_SOFTWARE"]; // 信息服务软件:
    String MachineName = Server.MachineName;// 服务器名
    String ServerName = Request.ServerVariables["SERVER_NAME"];// 服务器域名
    String ServerPath = Request.ServerVariables["APPL_PHYSICAL_PATH"];// 虚拟服务绝对路径
    String ServerNet = ".NET CLR " + Environment.Version.ToString(); // DotNET 版本
    String ServerArea = (DateTime.Now - DateTime.UtcNow).TotalHours > 0 ? "+" + (DateTime.Now - DateTime.UtcNow).TotalHours.ToString() : (DateTime.Now - DateTime.UtcNow).TotalHours.ToString();// 服务器时区
    String ServerTimeOut = Server.ScriptTimeout.ToString(); // 脚本超时时间
    String ServerStart = ((Double)System.Environment.TickCount / 3600000).ToString("N2");// 开机运行时长
    // AspNet CPU时间
    String ServerSessions = Session.Contents.Count.ToString();// Session总数
    String ServerApp = Application.Contents.Count.ToString(); // Application总数
    String ServerCache = Cache.Count.ToString(); //应用程序缓存总数
    // 应用程序占用内存
    //  String ServerFso = Check("Scripting.FileSystemObject");                // FSO 文本文件读写
    String ServerTimeOut = Server.ScriptTimeout.ToString() + "毫秒"// 本页执行时间 
  • 相关阅读:
    地图初步
    多线程技术 初步
    核心动画 CAAnimation 进阶
    CALayer 进阶
    Quartz 2D 初步
    UIView 面面观
    CABasicAnimation 基础
    CGAffineTransform 放射变换解析 即矩阵变换
    RunTime 入门
    对Viewcontroller在UINavigationController中入栈出栈的一点点理解
  • 原文地址:https://www.cnblogs.com/wyxy2005/p/1386499.html
Copyright © 2011-2022 走看看