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()
+
"
毫秒
"
;
//
本页执行时间
查看全文
相关阅读:
shell学习(三)
shell学习(四)
自定义yum源
fpm制作rpm包
shell学习(三)
shell学习(二)
linux系统下创建lvm挂载到指定目录
nginx做代理安装docker
df -h命令卡死解决办法
docker安装
原文地址:https://www.cnblogs.com/yangbin1005/p/984034.html
最新文章
NFS服务自动搭建及挂载脚本
mysql备份
tomcat启动慢解决方案
解决mount.nfs: access denied by server while mounting错误
python学习之字典
python学习之元组
python学习之列表
python学习之基本数据类型
python学习之for循环
python学习之条件语句(if循环)
热门文章
python学习之while循环
python学习之基础语法
nginx的with-http_sub_module模块使用之替换字符串
python学习之python安装
nginx配置文件服务器
nginx做代理离线下载插件
mysql主从复制
nginx代理tcp协议连接mysql
vmware虚拟机使用静态IP上网的方法
增加磁盘不重启虚拟机识别磁盘
Copyright © 2011-2022 走看看