Exemplo n.º 1
0
        public HddLoadSingleVolumeBase(string logicalVolume)
        {
            this.logicalVolumeInstancenName = HddTools.GetPerformanceCounterInstanceName(logicalVolume);

            if (string.IsNullOrEmpty(this.logicalVolumeInstancenName))
            {
                throw new ArgumentException(string.Format(Wsapm.Core.Resources.Wsapm_Core.HddLoadSingleVolumeBase_LogicalVolumeCannotBeFound, this.logicalVolumeInstancenName));
            }

            this.performanceCounterDiskBytesPerSecond = new PerformanceCounter(CategoryName, CounterName, logicalVolumeInstancenName);
        }
Exemplo n.º 2
0
        public HddLoadAverage() : base()
        {
            this.performanceCounters = new Dictionary <string, HddLoadSingleVolumeAverage>();

            var availableLogicalVolumes = HddTools.GetAvailableLogicalVolumeNames();

            foreach (var volume in availableLogicalVolumes)
            {
                var hddLoadSingleVolumeAverage = new HddLoadSingleVolumeAverage(volume);
                this.performanceCounters.Add(volume, hddLoadSingleVolumeAverage);
            }
        }
Exemplo n.º 3
0
        public HddLoadCurrent(TimeSpan timerInterval) : base()
        {
            this.performanceCounters = new Dictionary <string, HddLoadSingleVolumeCurrent>();

            var availableLogicalVolumes = HddTools.GetAvailableLogicalVolumeNames();

            foreach (var volume in availableLogicalVolumes)
            {
                var hddLoadSingleVolumeCcurrent = new HddLoadSingleVolumeCurrent(volume);
                this.performanceCounters.Add(volume, hddLoadSingleVolumeCcurrent);
            }
        }
Exemplo n.º 4
0
 /// <summary>
 /// Gets a string array with available logical drive names.
 /// </summary>
 /// <returns>A string array containing all logical drive names on the machine. Might be an empty array if there are no logical drives present.</returns>
 public static string[] GetAvailableLogicalVolumeNames()
 {
     return(HddTools.GetAvailableLogicalVolumeNames());
 }