• 大小: 2.02M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2020-12-26
  • 语言: C#
  • 标签:

资源简介

 

一、背景介绍

在.net平台开发,网站部署环境都是windows IIS,很想知道服务器运行时,相关的各种参数。比如:CPU利用率,磁盘读写速度,网络带宽占用,网站链接数等等。能够有图表的方式显示就更好了。

类似阿里云性能监控的效果这是怎么实现的呢?经过一番查找,原来这些数据可以通过读取Windows性能计数器读取到,再将数据做出图表,也可以实现类似的效果。

二、实现思路

1.利用C#读取windows性能计数器数据。

2.将读取到的数据定期写入数据。

3.根据第2步采集的数据,利用百度EChart制作数据图表。

参考 https://blog.csdn.net/a497785609/article/details/83316165#9273731

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using System.xml;
using System.Reflection;
using System.Configuration;
using System.Collections.Specialized;

namespace SysParams
{
    class AppConfigMng
    {
        public static string[] arr = {
                        “NodeName“
                        “CPUProcessorTime“
                        “CPUPrivilegedTime“
                        “CPUInterruptTime“
                        “CPUDPCTime“
                        “MEMAvailable“
                        “MEMCommited“
                        “MEMCommitLimit“
                        “MEMCommitedPerc“
                        “MEMPoolPaged“
                        “MEMPoolNonPaged“
  

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件    2265381  2018-09-25 09:05  NET源码必读.pdf

----------- ---------  ---------- -----  ----

              2265381                    1


评论

共有 条评论