|
-
Oct 30th, 2010, 11:23 AM
#1
Process information for process manager.
Couple of quickies
1: Attached threads
Rather then list all attached threads in a list view. I wanted total count.
This is my own little work around.
Code:
Dim oThreads As ProcessThreadCollection = ProcessID.Threads
Dim arryThreads As New List(Of Integer)
For x As Integer = 0 To oThreads.Count - 1
arryThreads.AddRange(New Integer() {x})
Next
Code:
lvi.SubItems.Add(arryThreads.Count.ToString)
This there a direct call to get the total number? Adding to an array seems a tad silly.
2: Individual CPU
Can't find it on MSDN. Any links that will go into detail on Application CPU and maybe even more detail on features on what i could add.
-
Oct 30th, 2010, 12:31 PM
#2
Re: Process information for process manager.
You might want to take a look at weirddemon's source code for his process manager here and see if that helps out with either of those things: http://www.vbforums.com/showthread.php?t=599337
-
Oct 30th, 2010, 07:27 PM
#3
Re: Process information for process manager.
What exactly you want to do with the cpu?
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Nov 1st, 2010, 08:40 AM
#4
Re: Process information for process manager.
Checking it out now chris, thanks
 Originally Posted by sapator
What exactly you want to do with the cpu?
Same as windows task manager. display individual process CPU
-
Nov 1st, 2010, 06:57 PM
#5
Re: Process information for process manager.
Sorry i don't get what you are saying.
When can i see 2cpu's on the task manager?I have xp here btw with dual core.
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Nov 1st, 2010, 07:01 PM
#6
Re: Process information for process manager.
-
Nov 1st, 2010, 07:09 PM
#7
Re: Process information for process manager.
Ehh?
That is the cpu usage mate.Or you think it shows that you have 16cpus ?
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Nov 1st, 2010, 07:12 PM
#8
Re: Process information for process manager.
lol what you going on about 16 cpus
I want to display a Individual CPU for a process exactly as above.
I can display over all cpu but not sure how to get individual process cpu. some one said something about thread calculations
-
Nov 1st, 2010, 07:15 PM
#9
Re: Process information for process manager.
Ok fair enough.Haven't tried something like that but here is a nice article:
http://www.codeproject.com/KB/system...scpuusage.aspx
Just read this also:
Re: Doesnt work with Dual Core or Multi CPU machines
Use Following code:
IdleProcessItem.SubItems[2].Text = (100 - Total / Environment.ProcessorCount) + "%";
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Nov 1st, 2010, 07:24 PM
#10
Re: Process information for process manager.
Will read that tomorrow. So wont mark resolved just yet.
nice one
-
Nov 1st, 2010, 07:30 PM
#11
Re: Process information for process manager.
ok.
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Nov 1st, 2010, 08:05 PM
#12
Re: Process information for process manager.
Hi, that project has 3 errors that i am nor use to
Error 1 Constants must be of an intrinsic or enumerated type, not a class, structure, type parameter, or array type.
Private Const CLOSED_PROCESS As Process = Nothing
Private Const PROCESS_INFO_NOT_FOUND As ProcessInfo = Nothing
Public Const CLOSED_THREAD As ProcessThread = Nothing
-
Nov 2nd, 2010, 07:39 PM
#13
Re: Process information for process manager.
Hi.
Try remove const, p.e.
Private CLOSED_PROCESS As Process = Nothing
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|