1.0.5 • Published 1 year ago

perfomon-monitor v1.0.5

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

perfomon-monitor

※ Currently only available in Windows

Using npm:

$ npm i perfomon-monitor

Physical Disk:

	import {physicalDisk} from "../src/index";
	const physical_disk = new physicalDisk();

	/**
	 * Current Disk Queue Length
	 * ex) \PhysicalDisk(0 C:)\Current Disk Queue Length
	 *
	 * @param {string} [drive="_Total"]
	 * @param {string} [eventName]
	 * @memberof physicalDisk
	 */
	physical_disk.currentDiskQueueLength("D:","Current Disk Queue Length");
	physical_disk.on("Current Disk Queue Length",(data) => {
		console.log(data);
		/*
			data 
			{ data: '6.000000', drive: 'D:' }
			{ data: '4.000000', drive: 'D:' }
			{ data: '8.000000', drive: 'D:' }
			{ data: '5.000000', drive: 'D:' }
			...
		*/
	})
	
	setTimeout(()=>{
		/**
		 *
		 *
		 * @param {string} counterName
		 * @returns {Boolean}
		 * @memberof physicalDisk
		 */
		physical_disk.kill("Current Disk Queue Length")
	},10000)

	/////////////////
	/////METHODS/////
	/////////////////

	physical_disk.AvgDiskWriteQueueLength(diskName,counterName);
	physical_disk.on(counterName,(data) => {
		console.log(counterName,data); // { data: '6.000000', drive: 'D:' }
	})
	physical_disk.AvgDiskWriteQueueLength(diskName,counterName);
	physical_disk.on(counterName,(data) => {
		console.log(counterName,data); //{ data: '5.000000', drive: 'D:' }
	})
1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago