473,322 Members | 1,806 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Hard Drive Activity - Programmatically?

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 8501
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******@sbcglobal.net> wrote in message
news:11*********************@z14g2000cwz.googlegro ups.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******@sbcglobal.net> wrote in message
news:11*********************@g43g2000cwa.googlegro ups.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******@sbcglobal.net> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.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
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
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...
18
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...
14
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)...
16
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...
13
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...
4
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.....
1
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
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...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.