Questions tagged [system.diagnostics]

System.Diagnostics is a namespace of the .NET framework. It provides classes that allow you to interact with system processes, event logs, and performance counters.

System.Diagnostics is a namespace of the .NET framework. It provides classes that allow you to interact with system processes, event logs, and performance counters.

References

670 questions
3
votes
1 answer

Read Process StandardOutput before New Line Received

I'm trying to do something that appears to be out of scope for the System.Diagnostics.Process object. Acceptable answers can propose a different approach as long as it uses .net 4.5/c#5. My program is calling gdalwarp.exe to perform a long running…
Ben Gripka
  • 16,012
  • 6
  • 45
  • 41
3
votes
3 answers

System.Diagnostics.Process issue with WorkingDirectory

I am using a third party software tool (command line tool) to merge PDF files together. Using C# I am attempting to use System.Diagnostics.Process to run the executable but I am coming up with a few errors depending on the parameter setup. If…
mattgcon
  • 4,768
  • 19
  • 69
  • 117
3
votes
2 answers

EventSource .net 4.0 GenerateManifest

I've been trying to work with ETW in .net 4.0. I have started using Microsoft EventSource Library 1.0.4-beta (https://www.nuget.org/packages/Microsoft.Diagnostics.Tracing.EventSource) Here is the code i written for generating events for my…
KRP
  • 131
  • 1
  • 3
  • 15
3
votes
2 answers

vb.net - How do I selectively communicate with two instances of a program?

I'm new to VB, and so forgive me if this is a simple question. I will be running multiple time consuming (single thread) processes in a program (that allows automation thru COM). And so to save some time, I want to open two or more instances of this…
Esteban
  • 179
  • 8
3
votes
1 answer

Why would I turn System.Diagnostics trace autoflush off?

In all my applications, I have always set Is there any reason why someone would want not to do that? I guess there is a performance impact, but how big is it?
Jean Hominal
  • 16,518
  • 5
  • 56
  • 90
3
votes
5 answers

TraceSource : Custom TraceListener not working

I'm using TraceSource to log the ASP.Net application. To change the output format I need to create own TraceListener instead of TextwriterListener.
C-va
  • 2,910
  • 4
  • 27
  • 42
3
votes
4 answers

How to show a message on process end in website?

I want to start a process when i clicked the start button on webpage (asp.net site) now i want to set the label text to process started. and i want to set the label text to "Process Completed " when the process is ended. how to do this in asp.net…
narenderk
  • 31
  • 3
3
votes
4 answers

Get average CPU usage of a computer in last x minute

This question "How to get the CPU Usage in C#?" shows some of the ways to get the current CPU usage (%) of a computer in .NET. Since the CPU usage fluctuates quite frequently, I think the current CPU usage is often not a good indicator of how busy…
Louis Rhys
  • 34,517
  • 56
  • 153
  • 221
3
votes
3 answers

System.SecurityException error

when i compile the following code it shows the error as system.securityexception error. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Diagnostics; using System.Threading; namespace eventlog { …
Gomathipriya
  • 905
  • 7
  • 19
  • 38
3
votes
2 answers

ASP.NET Trace - Custom HttpModule

We have developed our custom HttpModule. Now I want to add ability to trace it, and see the trace results in standart ASP.NET tracing page (or trace.axd). I try to use System.Diagnostics.Trace.Write("FILTER TEST"); to write trace information. This…
Alex Dn
  • 5,465
  • 7
  • 41
  • 79
3
votes
3 answers

Not all info about process in Process.GetProcesses when run in service by Local Service account

I have this code: [PermissionSet(SecurityAction.Assert, Name = "FullTrust")] public List GetWindows() { try { var isFullTrust = Assembly.GetExecutingAssembly().IsFullyTrusted; if…
HellyBlack
  • 33
  • 4
3
votes
1 answer

How to trace the raw HTTP Request invoked using WebClient?

What is the best method to trace programmatically the full raw HTTP request when using the WebClient class?
fin
  • 1,275
  • 4
  • 18
  • 34
3
votes
2 answers

Starting a Jar file using System.Diagnostics.Process

I have a jar file which I want to run from within C#. Here's what I have so far: clientProcess.StartInfo.FileName = @"java -jar C:\Users\Owner\Desktop\myJarFile.jar"; clientProcess.StartInfo.Arguments = "[Something]"; …
Aabela
  • 1,408
  • 5
  • 19
  • 28
3
votes
1 answer
2
votes
2 answers

System.Diagnostics.Process namespace missing

I am writing an application where I have to use Process.Start api using System.Diagnostics namespace. I am using moonlight libraries with mono-2.10. But I am getting this error "The type or namespace name `Process' could not be found. Are you…
brunoos
  • 81
  • 1
  • 2
  • 6