TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
tal tal
NA
1
1.7k
Collecting trough WMI from Win32_PerfRawData_PerfDisk_Physic
Nov 26 2012 9:22 AM
Hey i read from WMI to Get the IOPS for a Disk.
but when i get the info i don't understand how to read it , the Numbers are to big.
For Example this is a sample code:
ManagementScope oMs = new System.Management.ManagementScope("root\\cimv2");
//Inventory
ObjectQuery InventQuery = new ObjectQuery("SELECT * FROM Win32_OperatingSystem");
ManagementObjectSearcher Inventsearcher = new ManagementObjectSearcher(oMs, InventQuery);
ManagementObjectCollection InventCollection = Inventsearcher.Get();
foreach (ManagementObject mgt in InventCollection)
{
outBox.AppendText(mgt["csname"].ToString() + "\n");
}
//Performance
ObjectQuery PerfQuery = new ObjectQuery("SELECT * FROM Win32_PerfRawData_PerfDisk_PhysicalDisk");
ManagementObjectSearcher Perfsearcher = new ManagementObjectSearcher(oMs, PerfQuery);
ManagementObjectCollection PerfCollection = Perfsearcher.Get();
foreach (ManagementObject mgt in PerfCollection)
{
outBox.AppendText("Write IOps: "+ mgt["DiskWritesPerSec"].ToString() + "\n");
outBox.AppendText("Read IOps: " + mgt["DiskReadsPerSec"].ToString() + "\n");
}
This is the OutPut:
Write IOps: 11994709
Read IOps: 10541530
Reply
Answers (
0
)
can any body help me for creating hangman in c#.
Display data in 3 text boxes at the same time?