PC Review


Reply
Thread Tools Rate Thread

Accessing Process.ProcessName starts continuous I/O activity

 
 
=?Utf-8?B?TWlrZSBGaWVkbGVy?=
Guest
Posts: n/a
 
      9th Aug 2005

I am seeing something unexpected when accessing the Process.ProcessName
property. Immediately after accessing it, my process starts continuous I/O
activity at a rate of 10 reads/sec and 5 writes/sec. My process is not doing
anything else at the time - it is a long running process that sits idle most
of the
time except for this constant I/O activity.

This is happening on WinXP Pro + SP2 and Win2003 + SP1, both running
..NET 1.1 + SP1. Any ideas how to quiet things down after accessing the
ProcessName? It continues even after the var that uses it goes out of scope.

Here is a simple program to demonstrate this:

using System;
using System.Diagnostics;

namespace ProcessNameTest
{
class ProcessNameTest
{
[STAThread]
static void Main(string[] args)
{
string dummy;

Process currentProcess = Process.GetCurrentProcess();

System.Console.WriteLine("Check this processes I/O activity now - should
be no new I/O");
System.Console.WriteLine("Hit Enter to continue");
dummy = System.Console.ReadLine();

string process = currentProcess.ProcessName;

System.Console.WriteLine("Check this processes I/O activity now - should
be about 10 reads/second and 5 writes/second");
System.Console.WriteLine("Hit Enter to continue");
dummy = System.Console.ReadLine();

string processUpper = process.ToUpper();
string pid = currentProcess.Id.ToString();


}
}
}
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Networking process causes continuous hard drive activity goldtech Windows XP Networking 2 17th Apr 2008 12:28 PM
Re: Oops! "Process [] otherInstances = Process.GetProcesses(currentProcess.ProcessName);"// Error =?windows-1252?Q?Lasse_V=E5gs=E6ther_Karlsen?= Microsoft C# .NET 0 27th Nov 2005 06:32 PM
What does Process.ProcessName exactly do? =?Utf-8?B?ZVhhdmllcg==?= Microsoft Dot NET Framework 6 9th Nov 2005 01:39 AM
Setting Process.ProcessName Randy Microsoft Dot NET 2 6th Jun 2005 04:47 AM
find process by processname Jeremy Chapman Microsoft Dot NET Framework Forms 3 2nd Dec 2004 11:55 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:08 PM.