how to get  all information of task manager using

Posted on 2009-06-29
Last Modified: 2012-06-27
i want to obtain the total physical memory and available physical memory
which is display on task manager in performance tab and the list of process with memory usage which is currently running on the task manager in process tab in application

Question by:mrpatil
  • 4
  • 3
LVL 53

Expert Comment

ID: 24742832
To retrieve the process-information, you need something like this:
Dim poc() as process = process.getprocesses()

for i as integer = 0 to poc.length - 1

if poc(i).processname.tostring <> "system" or poc(i).processname.tostring <> "idle" then






catch ex as exception

msgbox(poc(i).processname.tostring & " " & ex.message)

end try

end if


Open in new window


Author Comment

ID: 24763156
this code not give the specific running process list and available and total physical memory
LVL 53

Expert Comment

ID: 24763328
Memory usage

Dim p As Process
For Each p In p.GetProcesses
  lblMemUsage.Text = p.ToString.Remove(0, 27).ToLower & " " & (p.WorkingSet / 1024).ToString("0,000") & " K"
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

LVL 53

Expert Comment

ID: 24763334
VB.Net: Getting memoryusage of one process
Public Shared Function GetMemoryUsage(ByVal ProcessName As String) As String 

            Dim _Process As Process = Nothing 

            Dim _Return As String = "" 

            For Each _Process In Process.GetProcessesByName(ProcessName) 

                If _Process.ToString.Remove(0, 27).ToLower = "(" & ProcessName.ToLower & ")" Then 

                    _Return = (_Process.WorkingSet64 / 1024).ToString("0,000") & " K" 

                End If 


            If Not _Process Is Nothing Then 


                _Process = Nothing 

            End If 

            Return _Return 

        End Function

Open in new window


Author Comment

ID: 24763478
this code not give available physical size & total physical size(i.e. display on the task manager in performance tab)
LVL 53

Accepted Solution

Dhaest earned 500 total points
ID: 24763553
You'll need to take several small examples of code together to get all that you want. I don't think that there is already a tool available that has all the things that you want...

Some things you can use to recreate the taskmanager
Memory Monitor (VB.NET 1.1)

Process-tab: Examples given above

Author Closing Comment

ID: 31598232
now please give the list of process which are running in the task manager with name of process and use of cpu and memory

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now