balaji | 10 Feb 06:43
Picon
Favicon

Performance counters are not working under linux mono platform

Hi,

Does anyone know why Performance counters return zero value in the code
below when executing under linux mono platform.

                  (OR)

How to get a process performance counters like CPU,Memory,Thread
count,Handle Count and other resource utilization of a machine,when the
process is running in a remote machine?

 The code below works with MS Visual Studio under Windows but simply won't
work with Mono 2.10.5 under linux i.e performance counter values are
zero.why?

/* This uses remoting */
/ * Run this application in the remote machine where the actual
 * 
 */
#define DEBUG_PERFORMANCE

using System;
using System.Diagnostics;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Tcp;

class Program
(Continue reading)

Picon
Gravatar

Re: Performance counters are not working under linux mono platform

On Fri, Feb 10, 2012 at 12:43 AM, balaji <balajit <at> amiindia.co.in> wrote:
> Hi,
>
> Does anyone know why Performance counters return zero value in the code
> below when executing under linux mono platform.
>
>                  (OR)
>
> How to get a process performance counters like CPU,Memory,Thread
> count,Handle Count and other resource utilization of a machine,when the
> process is running in a remote machine?
[...]

The following link will help you: http://bit.ly/zYJWon  ;-)

-Gonzalo
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list <at> lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list
Picon
Gravatar

Re: Performance counters are not working under linux mono platform

On Fri, Feb 10, 2012 at 2:55 AM, Gonzalo Paniagua Javier
<gonzalo.mono <at> gmail.com> wrote:
> On Fri, Feb 10, 2012 at 12:43 AM, balaji <balajit <at> amiindia.co.in> wrote:
>> Hi,
>>
>> Does anyone know why Performance counters return zero value in the code
>> below when executing under linux mono platform.
>>
>>                  (OR)
>>
>> How to get a process performance counters like CPU,Memory,Thread
>> count,Handle Count and other resource utilization of a machine,when the
>> process is running in a remote machine?

Oh, and as for reading from a remote machine, there are no builtin
capabilities. We did that once by using ssh to run a small C# program
that read the performance counters of the Mono process we were
interested in.

-Gonzalo
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list <at> lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list
balaji | 10 Feb 11:55
Picon
Favicon

Re: Performance counters are not working under linux mono platform


HI Gonzalo ,

   Thanks for the info..

Can you clarify the following....

>>>Is there any possibility to get performance counter values for non-mono
specific processes of a linux machine through C# program.

 i have tried to get performance counter values for a mono process....some
how i was successful but not for other processes
 running under linux.

In mono release note under performance counters they mention that

"performance counters will work only with in the mono process but not across
the processes" what is it mean?

----Balaji T

--
View this message in context: http://mono.1490590.n4.nabble.com/Performance-counters-are-not-working-under-linux-mono-platform-tp4375403p4375911.html
Sent from the Mono - Dev mailing list archive at Nabble.com.
Picon
Gravatar

Re: Performance counters are not working under linux mono platform

On Fri, Feb 10, 2012 at 5:55 AM, balaji <balajit <at> amiindia.co.in> wrote:
>
>
> HI Gonzalo ,
>
>   Thanks for the info..
>
> Can you clarify the following....
>
>>>>Is there any possibility to get performance counter values for non-mono
> specific processes of a linux machine through C# program.
>
>  i have tried to get performance counter values for a mono process....some
> how i was successful but not for other processes
>  running under linux.
>
> In mono release note under performance counters they mention that
>
> "performance counters will work only with in the mono process but not across
> the processes" what is it mean?

It means that only mono processes are able to produce the performance
counters. If you provide a PID of another process, everything will be
0. However, you could see how Mono generates some of those performance
counters (number of threads, memory) and do the same. Some of that
data comes from /proc/[PID] or similar.

-Gonzalo
_______________________________________________
Mono-devel-list mailing list
(Continue reading)


Gmane