LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Checking to see if a process is running

Hello List,
 
The virus checker our company uses will randomly start a process and scan the PC's hard drive & memory, taking over the PC's processor.  There is apparently no way to "throttle" the utilization back, and I've seen it go to 99%.  So you can only imagine what this does to my test applications.
 
Is there a way to poll the "Task Manager" to see if the process is running and what percentage of the CPU this thing is eating?  I could then display a screen to my test operators that the application is unavailable.
 
Running Windows 7 and Labview 2011.
 
Thanks,
Mike
0 Kudos
Message 1 of 7
(5,201 Views)

Hello Mike,

 

I think this is what you're looking for:

 

Community Example: Performance Monitor VI

https://decibel.ni.com/content/docs/DOC-2051

 

That example demonstrates using .NET to retrieve the information you noted you were looking for.

 

Regards,

Tom L.
0 Kudos
Message 2 of 7
(5,192 Views)

Hi wd8ivl,

  I had implemented a VI which will display the CPU utilisation.

  Find it in the attachments.

 

Regards,

Srikrishna.J

 

Regards,
Srikrishna


Message 3 of 7
(5,161 Views)

Do you have a requirement that your test set needs to be on the company network?  I make a point of not connecting test systems to the company network for this very reason.  I don't put on any extra security other than what Windows has by default.  That is by far the best way to ensure random processes (like virus scan) doesn't affect your tests.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 7
(5,133 Views)

Srikrishna,

I just got into the office and will check out yours an the earlier solution.  Thank you.

 

 

0 Kudos
Message 5 of 7
(5,121 Views)

srikrishnaNF wrote:  I had implemented a VI which will display the CPU utilisation.

Interesting VI.  Found that it needed a lot of tweaks though.  It doesn't do too well when dealing with multicore.  So I added a divide by the number of logical cores.  I also changed the check time to an actual wait.  This removes the need to subtract the 1.5 seconds from the CPU timing.  Also changed the FOR loop to stop when it finds the right process instead of going through all of the processes.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 7
(5,120 Views)

@wd8ivl wrote:

We've all been there many times.  Keep up the good fight.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 7 of 7
(5,119 Views)