Re: How to detect disk activity?

Tech-Archive recommends: Fix windows errors by optimizing your registry



Pavel,

To detect disk activity one does not need any driver.
Just poll the perf. counters from user mode.

Well, I just made a bold assumption that the OP wants to learn how to
do things is the kernel mode...

I think that, for the purpose of learning, such project is just
perfect - it is not complex, and, at the same time, even in its
simplest form, it covers driver essentials ( device stacks, dealing
with IRPs, etc). Certainly, it is better to write a driver from the
scratch, and to add new features to it step-by- step, rather than just
thoughtlessly reuse some existing sample - I think it is better to
think of WDK samples as of guidance, rather than of ready-to-use
solution


Anton Bassov

Pavel A. wrote:
To detect disk activity one does not need any driver.
Just poll the perf. counters from user mode.

--PA


<soviet_bloke@xxxxxxxxxxx> wrote in message news:1163215956.791390.251080@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Can you write 2 lines of code that inform you when disk
access is in progress? and just say where you would
put them in diskperf ?

Let's say someone does it for you. What are you going to learn this
way?????


Your project of monitoring disk activity is really good for someone who
wants to learn driver basics. What you have to do is to attach your
device(s) to the storage stack, so that you are able to capture all
requests that are sent to the disk. As far as I understand, you just
want to passively monitor disk activity, so that the project is really
easy ( for the time being, let's ignore PnP stuff - this is going to be
the next step). For the time being, SC Manager-based service is
perfectly acceptable


Therefore, go and write your code - this is the *ONLY* way to learn
things

Good luck

Anton Bassov




deean wrote:
You don't need to hook anything. Modify diskperf to add a control
device and use that to communicate with your application. Nobody is
going to write this for you and give you the source code.


Can you write 2 lines of code that inform you when disk
access is in progress? and just say where you would
put them in diskperf ?




=====================
Mark Roddy DDK MVP
Windows Vista/2003/XP/2000 Consulting
Device and Filesystem Drivers
Hollis Technology Solutions 603-321-1032
www.hollistech.com


.



Relevant Pages

  • [PATCH][2.6.7-mm5] perfctr low-level documentation
    ... Control data may be per-counter, global, or both. ... The counters are not assumed to be interchangeable. ... +"struct perfctr_sum_ctrs" ... +some low-level driver operations. ...
    (Linux-Kernel)
  • Re: When to write as a device driver instead of just a library.
    ... > one write the code as a device driver as opposed to a plain simple ... In general if it can be done in user mode, ... or major advantages to a kernel mode implementation, ... If you communicate with a device that way, ...
    (comp.os.linux.development.system)
  • Re: How to Enable/Disable USB Device Remote Wakeup?
    ... > driver, it's a user mode driver. ... They call a WIA driver a "user more driver". ... > disable remote wakeup are not vendor-specific, ...
    (microsoft.public.development.device.drivers)
  • [PATCH][0/7] perfctr-2.7.2 for 2.6.6-mm2: summary
    ... counters driver, to kernel 2.6.6-mm2. ... perfctr drives the performance counters in i386, ... kernel hackers ask how perfctr differs from oprofile. ... x86_64 driver and arch changes ...
    (Linux-Kernel)
  • Re: Virtual video capture device driver
    ... HwInitialize (which runs in context of system process) and use it in the ... then feed your driver with the data through it. ... > data from a user mode app and which ought to be rendered by the output ...
    (microsoft.public.development.device.drivers)