473,553 Members | 3,081 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Hard Drive Activity - Programmaticall y?

Hello all...
Please don't ask me why, but I am currently tasked to somehow discover
when the hard drive is being accessed (for reads and writes). All of
the searching I have done has been fruitless.
Is there some windows class/API/etc. that will let me know when the
hard drive is being read from or written to?
Thank you much!
--Dan

Dec 20 '05 #1
8 8526
Hello dantan98,

Try to find source for this http://www.sysinternals.com/Utilities/Diskmon.html

d> Please don't ask me why, but I am currently tasked to somehow
d> discover when the hard drive is being accessed (for reads and
d> writes). All of the searching I have done has been fruitless.
d>
d> Is there some windows class/API/etc. that will let me know when the
d> hard drive is being read from or written to?
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/members/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Dec 20 '05 #2
That's EXACTLY the kind of thing I need!! Thank you for pointing me to
this. Unfortunately, the source code isn't listed in the SC section.
I will email them to see if they can send me that basic source code
(such as when it is minimized to tray and indicates reads with green
and writes with red). That simple functionality is all I need.

Thanks again!

--Dan

Dec 20 '05 #3

"dantan98" <da******@sbcgl obal.net> wrote in message
news:11******** *************@z 14g2000cwz.goog legroups.com...
That's EXACTLY the kind of thing I need!! Thank you for pointing me to
this. Unfortunately, the source code isn't listed in the SC section.
I will email them to see if they can send me that basic source code
(such as when it is minimized to tray and indicates reads with green
and writes with red). That simple functionality is all I need.

Thanks again!

--Dan


No way they will give you the source. This kind of application is built in
top of a dynamically loaded kernel driver, even if they did, you won't be
able to build something similar using C#.
The good news is, you don't need it to watch DiskIO activity. All you have
to do is read the Disk performance counters, but remember all this
(useless?) stuff has a price, it could costs you a lot of CPU cycles just to
show you some red/green tray on the taskbar.

Willy.
Dec 20 '05 #4
It's actually for Red/Amber LEDs on hardware boards. Evidently our
hardware guys didn't think ahead far enough to realize our client may
want to have LEDs to indicate hard drive activity, so I have to
simulate the seemingly obvious connection from the motherboard to the
hard drive!

They gave me the "the source code we offer is in the source code
section" response, which I expected.

I did find two references regarding this, though: 1. Use WMI/WDM to
build "a WDM upper-filter driver for the disk class"; 2. Use the DDK
and utilize DiskPerf.

I have not used either of these, but my research has begun.

Thanks for your comments.

Any other tips/suggestions would be GREATLY appreciated. Thanks!

--Dan

Dec 20 '05 #5

"dantan98" <da******@sbcgl obal.net> wrote in message
news:11******** *************@g 43g2000cwa.goog legroups.com...
It's actually for Red/Amber LEDs on hardware boards. Evidently our
hardware guys didn't think ahead far enough to realize our client may
want to have LEDs to indicate hard drive activity, so I have to
simulate the seemingly obvious connection from the motherboard to the
hard drive!

They gave me the "the source code we offer is in the source code
section" response, which I expected.

I did find two references regarding this, though: 1. Use WMI/WDM to
build "a WDM upper-filter driver for the disk class"; 2. Use the DDK
and utilize DiskPerf.

I have not used either of these, but my research has begun.

Thanks for your comments.

Any other tips/suggestions would be GREATLY appreciated. Thanks!

--Dan


Ok, before you think of Filter driver development, you should take a look
at ETW (Event Tracing For Windows). ETW is great when it comes to trace
Kernel events and the system (XP or higher) comes with a high performnace
provider to (Kernel) Disk IO tracing. Search MSDN for ETW and take a look at
the DDK docs as well, both contain a detailed description of the API. Note
however that the target audience is C++.

Willy.
Dec 20 '05 #6
Excellent. Thank you!!

I will be sure to check it out. Should I have posted this into a C++
group instead?

Dec 21 '05 #7

"dantan98" <da******@sbcgl obal.net> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
Excellent. Thank you!!

I will be sure to check it out. Should I have posted this into a C++
group instead?


Well, honestly I don't know, probably a better place would be the WMI and
the DDK NG's. Note that you can use ETW from C#, it's just more work than if
you would use C++ or C++/CLI.

Willy.
Dec 21 '05 #8
YAY!! Our hardware guys were finally told they need to run this LED to
the motherboard!! It was stupid that they were having me do it.
SOOOOO glad it's off my back now! I think my boss finally realized how
much work this would entail and got nasty w/ them! :-D

Thanks for all the help though!! I *DO* appreciate it!

--Dan

Dec 27 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2367
by: Daniel | last post by:
when writing out a file from .net, when is the file created? after the bytes are all written to the hard drive or before the bytes are written to the hard drive?
0
1149
by: misscrf | last post by:
I have this normalized database, and I don't understand why setting up the forms is so hard for me. I have the main candidate entry form. This is to enter in candidates who apply for a job. I have a tab control with a page that shows if the candidate type is 1 of a few types ( in code). Otherwise 2 pages show. 1 is for contact...
18
5109
by: Joe Lester | last post by:
This thread was renamed. It used to be: "shared_buffers Question". The old thread kind of died out. I'm hoping to get some more direction by rephrasing the problem, along with some extra observations I've recently made. The core of the problem is that Postgres is filling up my hard drive with swap files at the rate of around 3 to 7 GB per...
14
28092
by: Lauren Wilson | last post by:
Discovered this interesting comment on MSDN: "To programmatically obtain the hard disk's serial number that the manufacturer assigns, use the Windows Management Instrumentation (WMI) Win32_PhysicalMedia (a class) property SerialNumber." I'm sorry to admit it bit I am really undereducated on how to incorporate some of the Windows SDK...
16
9503
by: Otie | last post by:
Hi, Is there a way for VB5 to determine exactly where on a hard drive a .exe file is stored upon the .exe file's first copying to the hard drive? What I need to know is the exact hard drive sector, cluster, partition, etc. information so I can use it later on to determine if the file was ever deleted and restored or moved elsewhere. ...
13
4835
by: ragtag99 | last post by:
I posted this on comp.lang.asm.x86, alt.os.development, comp.arch, comp.lang.c++ Im working with windows xp professional, NTFS and programming with MASM, c++ (free compiler) or visual basic 6.0 === question 1 Primarily Im trying to design a program that has full control over a hard disk. What it needs to do is find out what sectors...
4
4193
by: max | last post by:
Hi all, I want to write a program in C/C++ which monitor any hard disk activity by a particular program which have assigned for WINXP. For example, the program are going to run like this.. "fileact word.exe", so it will monitor any harddisk activity produce by word.exe. What kind of header/library should i include or should i look into??...
1
2534
by: Bill Nguyen | last post by:
One of my apps (running in a terminal server session) needs to access a local USB drive /fash card. Is there a way to access local drives programmatically? Thanks Bill
1
1388
by: Sony Kalkan | last post by:
Hi, I want to unlock the drive programmatically ? is there an api function related to it. For instance, when i run chkdsk with /F parameter, i get "drive in use" error . I want to unlock drive programmatically and execute chkdsk Thank you in advance,
0
7568
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7492
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8007
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7852
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5409
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5133
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3537
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1106
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
808
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.