Solved Hidden program which takes alot of CPU

March 15, 2016 at 09:52:58
Specs: Windows 7
I have some cpu issues. When i open task manager , secretly my cpu usage goes low from 100% to like 50% max.

See More: Hidden program which takes alot of CPU

Report •

✔ Best Answer
March 23, 2016 at 03:56:05
Not sure if this will help, the only help I can offer is to get the Processes and their CPU usage, outside of task manager, using some VBA code.

All you will need to do is:

Open Excel
Press and old 'Alt' then tap 'F11'
In the new window double click on '"sheet1' in the left hand object viewer
When you see the white space paste the code below
You can then run the code by selecting 'Run > Run Sub\Userform"

The only thing you will need to do is, select the entire 'F' column and merge it

What the code will do is:

1) List all running processes in column 'A'
2) List the CPU usage of each process in column 'B' Sorted by highest
3) List all processes with a usage over zero in column 'F' sorted by highest

each time you run it, lists A and B will be cleared and rebuilt, but list F will grow. if you run it a few times you will be able to examine the entries in column F to see if there is any process consistently occurring......

This may not be absolutely accurate but it will give you an indication.

*****CODE BELOW******

Sub GetRunningProcesses()

    Dim iCounter
    
    Sheet1.Columns(1).EntireColumn.Clear
    Sheet1.Columns(2).EntireColumn.Clear
    
    Sheet1.Range("A1").Value = "Process Name"
    Sheet1.Range("B1").Value = "CPU Usage"
    
    strComputer = "."
    
    Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
    Set objRefresher = CreateObject("WbemScripting.SWbemRefresher")
    
    Set colItems = objRefresher.AddEnum _
        (objWMIService, "Win32_PerfFormattedData_PerfProc_Process").objectSet
    
    iCounter = 2
    
    objRefresher.Refresh
    
    For Each objitem In colItems
    
    If objitem.Name <> "Idle" And objitem.Name <> "_Total" Then
        Sheet1.Cells(iCounter, 1).Value = objitem.Name
        Sheet1.Cells(iCounter, 2).Value = objitem.PercentProcessorTime
        iCounter = iCounter + 1
    End If
    
    Next
    
    DoEvents
    
    Application.Wait 5000
    
    Sheet1.Columns(1).EntireColumn.AutoFit
    Sheet1.Columns(2).EntireColumn.AutoFit
    
    
    Columns("A:B").Sort key1:=Range("B2"), _
    order1:=xlDescending, Header:=xlYes
    
    GetHighUsage
End Sub

Private Sub GetHighUsage()
    
    Dim uRange
    Dim lRange
    Dim Bcell As Range
    
    Set uRange = Sheet1.Range("B2")
    Set lRange = Sheet1.Range("B" & Rows.Count).End(xlUp)
    
    For Each Bcell In Range(uRange, lRange)
        
        If Bcell.Value > 0 Then
            Range("F1").Value = Range("F1").Value & Bcell.Offset(0, -1).Value & " : " & Bcell.Value & "%" & vbCrLf
        End If
    
    Next Bcell
    
End Sub

message edited by AlwaysWillingToLearn



#1
March 15, 2016 at 10:22:06
Secretly?

You should be able to get a clue from "Task Manager > Processes" about what item is peaking - they are listed. Let us know which item or items and maybe we can help.

Always pop back and let us know the outcome - thanks


Report •

#2
March 15, 2016 at 11:05:30
As is sad, its not showing , and when i open task manager my cpu usage goes down.

Report •

#3
March 15, 2016 at 12:51:07
Ah, so it is Task Manager itself that is slowing down the CPU. How are you measuring this?

Always pop back and let us know the outcome - thanks


Report •

Related Solutions

#4
March 15, 2016 at 12:57:06
Also, malware could be deliberately hiding activity from you. Run these three as a basic malware check. They often find what AV's miss:

AdwCleaner:
http://www.bleepingcomputer.com/dow...
(blue Download button near top - not anything else on the page).
Download and "Save" the file somewhere. Go to the saved file then double click it to run the program. Use the "Scan" button, followed by the "Cleaning" button.

Junkware Removal Tool (JRT)
http://www.bleepingcomputer.com/dow...
(blue Download button near top - not anything else on the page).
Download and "Save" the file somewhere. Go to the saved file then double click it to run JRT. It might appear to have stopped at times or flash the screen but sit tight until it has finished.

MalwareBytes:
https://www.malwarebytes.org/
After you select "download", select "For Home" and then "Download Free version".
Install and Run the program but before running the Scan go to "Settings > Detection and Protection" and put a checkmark in "Scan for rootkits". Quarantine anything it finds.

Please copy/paste the logs on here.

EDIT:
If this is the same computer you discussed on here a couple of days ago and it has no virus checker then get one as not having any protection increases your chances of malware. MSE will do - it is very low resources.

You should still run the above three freebies and post the logs though.

See also my #3.

Always pop back and let us know the outcome - thanks

message edited by Derek


Report •

#5
March 15, 2016 at 13:29:38
When using Task Manager, make sure to check the box for "show processes for all users"

Report •

#6
March 16, 2016 at 08:27:33
Thats what ive done but soon as i open taskmanager , the cpu usage goes from 100% to lower.

Report •

#7
March 16, 2016 at 08:57:49
I'm sure you know what you mean but the trick is to ensure that others do too, as we can't see what is happening from here.

Are you saying that when you open Task Manager it fleetingly shows the CPU usage at 100%, then it goes down to 50% before you have a chance to find out what is causing it?

If so you need to catch what is showing the high figure somehow. You could do this using the Print Screen key then copying the clipboard snap into Paint. Bear in mind that the "System Idle Process" is high it means the computer is not doing much.

If my interpretation above is incorrect then please try to better explain the symptoms.

Did you run those malware removal programs?

Always pop back and let us know the outcome - thanks

message edited by Derek


Report •

#8
March 18, 2016 at 10:34:13
You´re right but thats the thing . When i go to task manager , it is starting slow but i can see the cpu usage (barely),and when i go to all tasks that are running i cannot see it because its already gone.

Report •

#9
March 18, 2016 at 10:45:59
Sorry but I still can't properly understand what you are trying to explain. Maybe someone else will do better - good luck.

Always pop back and let us know the outcome - thanks


Report •

#10
March 19, 2016 at 06:49:57
I appriciate your help and i hope you good luck too.

Report •

#11
March 19, 2016 at 15:48:22
Run programs as in #4 above and post the results back in your reply.
Please note that as Task Manager opens it uses CPU power while it is opening and then does not need it once it is open. What you are seeing may be Task Manager itself showing what additional CPU processing it takes to open itself.
You can install Process Explorer from Microsoft and it will show you more about the processes running then Task Manager will show you and that might just be enough for you to figure out what is happening.
https://technet.microsoft.com/en-us...

You have to be a little bit crazy to keep you from going insane.


Report •

#12
March 23, 2016 at 03:56:05
✔ Best Answer
Not sure if this will help, the only help I can offer is to get the Processes and their CPU usage, outside of task manager, using some VBA code.

All you will need to do is:

Open Excel
Press and old 'Alt' then tap 'F11'
In the new window double click on '"sheet1' in the left hand object viewer
When you see the white space paste the code below
You can then run the code by selecting 'Run > Run Sub\Userform"

The only thing you will need to do is, select the entire 'F' column and merge it

What the code will do is:

1) List all running processes in column 'A'
2) List the CPU usage of each process in column 'B' Sorted by highest
3) List all processes with a usage over zero in column 'F' sorted by highest

each time you run it, lists A and B will be cleared and rebuilt, but list F will grow. if you run it a few times you will be able to examine the entries in column F to see if there is any process consistently occurring......

This may not be absolutely accurate but it will give you an indication.

*****CODE BELOW******

Sub GetRunningProcesses()

    Dim iCounter
    
    Sheet1.Columns(1).EntireColumn.Clear
    Sheet1.Columns(2).EntireColumn.Clear
    
    Sheet1.Range("A1").Value = "Process Name"
    Sheet1.Range("B1").Value = "CPU Usage"
    
    strComputer = "."
    
    Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
    Set objRefresher = CreateObject("WbemScripting.SWbemRefresher")
    
    Set colItems = objRefresher.AddEnum _
        (objWMIService, "Win32_PerfFormattedData_PerfProc_Process").objectSet
    
    iCounter = 2
    
    objRefresher.Refresh
    
    For Each objitem In colItems
    
    If objitem.Name <> "Idle" And objitem.Name <> "_Total" Then
        Sheet1.Cells(iCounter, 1).Value = objitem.Name
        Sheet1.Cells(iCounter, 2).Value = objitem.PercentProcessorTime
        iCounter = iCounter + 1
    End If
    
    Next
    
    DoEvents
    
    Application.Wait 5000
    
    Sheet1.Columns(1).EntireColumn.AutoFit
    Sheet1.Columns(2).EntireColumn.AutoFit
    
    
    Columns("A:B").Sort key1:=Range("B2"), _
    order1:=xlDescending, Header:=xlYes
    
    GetHighUsage
End Sub

Private Sub GetHighUsage()
    
    Dim uRange
    Dim lRange
    Dim Bcell As Range
    
    Set uRange = Sheet1.Range("B2")
    Set lRange = Sheet1.Range("B" & Rows.Count).End(xlUp)
    
    For Each Bcell In Range(uRange, lRange)
        
        If Bcell.Value > 0 Then
            Range("F1").Value = Range("F1").Value & Bcell.Offset(0, -1).Value & " : " & Bcell.Value & "%" & vbCrLf
        End If
    
    Next Bcell
    
End Sub

message edited by AlwaysWillingToLearn


Report •

#13
April 7, 2016 at 04:40:33
CryberG,

I assume that the code worked seeing as you marked it as best answer, just curious however, did you manage to find out which process was taking up your cpu time?


Report •

Ask Question