Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / July 2007

Tip: Looking for answers? Try searching our database.

Monitoring memory usage ...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Remote_User - 08 Jul 2007 16:02 GMT
Hi All,
        I am trying to check the memory usage for a process using C#
(.NET 1.1). I found out several properties in the Process class that
was useful. But, my question is after i tried that out and compared
the result with that indicating in the Windows Task Manager they
didn't match?

Could anyone suggest any other options?

Thanks..
Michael Nemtsev - 08 Jul 2007 17:26 GMT
Hello Remote_User,

Use performance counters http://msdn2.microsoft.com/en-us/library/x2tyfybc.aspx

---
WBR,  Michael  Nemtsev [C# MVP].  
[.Net Tips & Tricks]: http://msmvps.com/blogs/laflour/pages/net-tips-amp-tricks.aspx
My blog: http://spaces.live.com/laflour/        Team blog: http://devkids.blogspot.com/

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

R> Hi All,
R> I am trying to check the memory usage for a process using C#
R> (.NET 1.1). I found out several properties in the Process class that
R> was useful. But, my question is after i tried that out and compared
R> the result with that indicating in the Windows Task Manager they
R> didn't match?
R>
R> Could anyone suggest any other options?
R>
R> Thanks..
R>
Remote_User - 09 Jul 2007 03:51 GMT
Hi Michael,
                Thanks for the reply. But, in the msdn link you
provided, it was mainly referring to the counters that refers to the
Garbage Collector.

Thanks.

-----

> Hello Remote_User,
>
[quoted text clipped - 19 lines]
> R> Thanks..
> R>
Bob Johnson - 09 Jul 2007 04:39 GMT
RE:
<< Thanks for the reply. But...>>

So, while you're googling for yourself, and in addition to performance
counters, you might also search for WMI and WQL which also give you
extensive access to hardware, OS, etc info.
Remote_User - 09 Jul 2007 06:55 GMT
Hi,
   I have to use .NET 1.1 and WMI/WQL are for .NET 2.0 and higher.

---

> RE:
> << Thanks for the reply. But...>>
>
> So, while you're googling for yourself, and in addition to performance
> counters, you might also search for WMI and WQL which also give you
> extensive access to hardware, OS, etc info.
Chris Mullins [MVP] - 10 Jul 2007 01:41 GMT
The value reported by Task Manager is the Working Set. This is very
different from what you think it is.

For figuring out your .Net memory consumption, use the .Net Performance
Counters.

If you're trying to figure out where you memory is going, use a Memory
Profiler, such as the one from Scitech.

Signature

Chris Mullins, MCSD.NET, MCPD:Enterprise, Microsoft C# MVP
http://www.coversant.com/blogs/cmullins

> Hi All,
>         I am trying to check the memory usage for a process using C#
[quoted text clipped - 6 lines]
>
> Thanks..

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.