[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

how to get  all information of task manager using vb.net

Posted on 2009-06-29
7
Medium Priority
?
2,033 Views
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 vb.net application


0
Comment
Question by:mrpatil
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 53

Expert Comment

by:Dhaest
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
try
lstview.items.add(environment.machinename)
lstview.items(i).subitems.add(poc(i).processname)
lstview.items(i).subitems.add(poc(i).mainmodule.filename)
lstview.items(i).subitems.add(poc(i).mainwindowtitle)
catch ex as exception
msgbox(poc(i).processname.tostring & " " & ex.message)
end try
end if
next 

Open in new window

0
 

Author Comment

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

Expert Comment

by:Dhaest
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"
Next
0
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 
LVL 53

Expert Comment

by:Dhaest
ID: 24763334
VB.Net: Getting memoryusage of one process
http://wiki.lessthandot.com/index.php/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 
            Next 
            If Not _Process Is Nothing Then 
                _Process.Dispose() 
                _Process = Nothing 
            End If 
            Return _Return 
        End Function

Open in new window

0
 

Author Comment

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

Accepted Solution

by:
Dhaest earned 1500 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)
http://www.freevbcode.com/ShowCode.asp?ID=5920

Process-tab: Examples given above
Memory-information:
http://www.java2s.com/Code/VB/Windows-System/Gettotalmemory.htm
http://vbnet.mvps.org/index.html?code/system/globalmemory.htm
0
 

Author Closing Comment

by:mrpatil
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
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

649 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