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

    ServerOS = Environment.OSVersion.ToString(); //操作系统:
    CpuSum = Environment.GetEnvironmentVariable("NUMBER_OF_PROCESSORS"); //CPU个数:
    CpuType = Environment.GetEnvironmentVariable("PROCESSOR_IDENTIFIER"); //CPU类型:
    ServerSoft = Request.ServerVariables["SERVER_SOFTWARE"]; //信息服务软件:
    MachineName = Server.MachineName; //服务器名
    ServerName = Request.ServerVariables["SERVER_NAME"]; //服务器域名
    ServerPath = Request.ServerVariables["APPL_PHYSICAL_PATH"]; //虚拟服务绝对路径
    ServerNet = ".NET CLR " + Environment.Version.ToString(); //.NET 版本
    ServerArea = (DateTime.Now - DateTime.UtcNow).TotalHours > 0 ? "+" + (DateTime.Now - DateTime.UtcNow).TotalHours.ToString() : (DateTime.Now - DateTime.UtcNow).TotalHours.ToString(); //服务器时区
    ServerTimeOut = Server.ScriptTimeout.ToString(); //脚本超时时间
    ServerStart = ((Double)System.Environment.TickCount / 3600000).ToString("N2"); //开机运行时长
    PrStart = GetPrStart(); //进程开始时间
    AspNetN = GetAspNetN(); //AspNet 内存占用
    AspNetCpu = GetAspNetCpu(); //AspNet CPU时间
    ServerSessions = Session.Contents.Count.ToString(); //Session总数
    ServerApp = Application.Contents.Count.ToString(); //Application总数
    ServerCache = Cache.Count.ToString(); //应用程序缓存总数
    ServerAppN = GetServerAppN(); //应用程序占用内存
    ServerFso = Check("Scripting.FileSystemObject"); //FSO 文本文件读写
    ServerTimeOut = Server.ScriptTimeout.ToString() + "毫秒"; //本页执行时间 

  • 相关阅读:
    基于Kalman filter 的北斗卫星三维坐标后数据处理
    原子串口使用0D0A结尾作为结束字符
    GY90614 读取温度,修改辐射率,拟合曲线
    CRH PC11配置
    _I2C_SDA_READ 状态确定为输入
    read_byte
    SDA 右移赋值
    积极心态-刚入职的我们
    mysql基础知识点(复习一)
    java基础知识点(复习一)
  • 原文地址:https://www.cnblogs.com/chaoa/p/2386107.html
Copyright © 2011-2022 走看看