Click here to Skip to main content
15,880,543 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Guys

How can i get the memory usage of an asp.net application running on a certain machine.

Can this be done using C#

Thank you
Posted

1 solution

Example from MSDN..
VB
Dim NotepadMemory As Long
Dim component1() As Process
component1 = Process.GetProcessesByName("Notepad.exe")
NotepadMemory = component1(0).PrivateMemorySize64
Console.WriteLine("Memory used: " & NotepadMemory & ".")



Go through these links for more details..
http://msdn.microsoft.com/en-us/library/system.diagnostics.process_properties.aspx[^]
and http://msdn.microsoft.com/en-us/library/s80a75e5%28VS.80%29.aspx[^]
 
Share this answer
 
Comments
Mico Perez 31-Aug-12 4:09am    
Hi Learners bug

Your post is actually correct. But For Example. I am running my application on a machine. I cannot pass Iexplore or firefox to get the process name. How can i achieve to get only the asp.net application memory usage?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900