can you access process.TotalProcessorTime for a process on a remote computer!

Posted on 2006-05-24
Last Modified: 2008-01-09
Currently I get an exception when I attempt at access this property via a remote connection.

process.TotalProcessorTime cannot be access remotely!

Is there a way around this!
Question by:fwipho
    1 Comment
    LVL 41

    Accepted Solution

    You could try the Windows Management Instrumentation (WMI) equivalent

    Here is a script to demontrate the concepts

    using System;
    using System.Management;
    using System.Windows.Forms;

    namespace WMISample
        public class MyWMIQuery
            public static void Main()
                    ManagementObjectSearcher searcher =
                        new ManagementObjectSearcher("root\\CIMV2",
                        "SELECT * FROM Win32_Process");

                    foreach (ManagementObject queryObj in searcher.Get())
                        Console.WriteLine("Win32_Process instance");
                        Console.WriteLine("CommandLine: {0}", queryObj["CommandLine"]);
                        Console.WriteLine("KernelModeTime: {0}", queryObj["KernelModeTime"]);
                        Console.WriteLine("Name: {0}", queryObj["Name"]);
                        Console.WriteLine("UserModeTime: {0}", queryObj["UserModeTime"]);
                catch (ManagementException e)
                    MessageBox.Show("An error occurred while querying for WMI data: " + e.Message);

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Hire Top Freelancers to Complete C# Projects

    Source the talented Expert Exchange community
    for top quality work on your C# projects.

    Hire the best. Collaborate easily. Get quality work.

    Suggested Solutions

    This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
    Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!

    760 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

    15 Experts available now in Live!

    Get 1:1 Help Now