#89334 - 2002-11-07 10:10 PM
KiXforms - Process Monitor (pre-beta version)
|
Chris S.
MM club member
   
Registered: 2002-03-18
Posts: 2368
Loc: Earth
|
Any idea how I can turn the 'history' chart in this script into a line chart instead of a chart with 200 tiny columns?
I'm trying to make a "Process Monitor" to sniff out applications that are causing problems. The idea is to just chart the CPU, Mem, etc. that a single process is using versus the entire system.
code:
Break On CLS
;--------------------------------------------------------------------------- ; Main Form ;--------------------------------------------------------------------------- $frmMain = CreateObject("Kixtart.Form") $frmMain.Size = 300,220 $frmMain.Text = "Using KiXforms build "+$frmMain.Build $prgCPU = $frmMain.ProgressBar $prgCPU.ScaleHeight = 50 $prgCPU.ScaleWidth = 50 $prgCPU.Top = 5 $prgCPU.Left = 5 $prgCPU.ForeColor = Lawngreen $prgCPU.BackColor = Black $prgCPU.BorderStyle = 1 $prgCPU.Orientation = 1 $prgCPU.Style = 1 $prgCPU.Max = 100 $picCPU = $frmMain.PictureBox $picCPU.ScaleHeight = 50 $picCPU.ScaleWidth = 200 $picCPU.ForeColor = Green $picCPU.BackColor = Black $picCPU.Top = $prgCPU.Top $picCPU.Left = $prgCPU.Right + 5 For $y=10 to 50 step 10 $picCPU.Line(0,$y,200,$y) Next For $x=10 to 200 step 10 $picCPU.Line($x,0,$x,50) Next $picCPU.ForeColor = Lawngreen $frmMain.Center $frmMain.Show While $frmMain.Visible for $x = 0 to 199 $y=rnd(100) $prgCPU.Value = $y $picCPU.Line($x,50,$x,50-$y/2) sleep 0.1 next $nul=Execute($frmMain.DoEvents) Loop Exit(1)
|
|
Top
|
|
|
|
#89335 - 2002-11-07 10:38 PM
Re: KiXforms - Process Monitor (pre-beta version)
|
Chris S.
MM club member
   
Registered: 2002-03-18
Posts: 2368
Loc: Earth
|
Nevermind, I figured it out.
code:
While $frmMain.Visible $y1=50 for $x = -5 to 199 step 5 $y=rnd(100) $y2=50-$y/2 $prgCPU.Value = $y $picCPU.Line($x,$y1,$x+5,$y2) $y1=$y2 sleep 0.5 next $nul=Execute($frmMain.DoEvents) Loop
[ 07. November 2002, 23:05: Message edited by: Chris S. ]
|
|
Top
|
|
|
|
#89336 - 2002-11-07 10:39 PM
Re: KiXforms - Process Monitor (pre-beta version)
|
Shawn
Administrator
   
Registered: 1999-08-13
Posts: 8611
|
Is this it, cant really tell if its correct using random data:
code:
$py = 0 While $frmMain.Visible for $x = 0 to 199 $y=rnd(100) $prgCPU.Value = $y $y = 50-$y/2 $picCPU.Line($x-1,$py,$x,$y) ; inverse sleep 0.1 $py = $y next $nul=Execute($frmMain.DoEvents) Loop
|
|
Top
|
|
|
|
#89337 - 2002-11-07 10:40 PM
Re: KiXforms - Process Monitor (pre-beta version)
|
Shawn
Administrator
   
Registered: 1999-08-13
Posts: 8611
|
scary
|
|
Top
|
|
|
|
#89338 - 2002-11-07 10:40 PM
Re: KiXforms - Process Monitor (pre-beta version)
|
Chris S.
MM club member
   
Registered: 2002-03-18
Posts: 2368
Loc: Earth
|
Beatcha by a minnit.
|
|
Top
|
|
|
|
#89339 - 2002-11-07 10:46 PM
Re: KiXforms - Process Monitor (pre-beta version)
|
Chris S.
MM club member
   
Registered: 2002-03-18
Posts: 2368
Loc: Earth
|
I'm sitting here playing with this script and I gotta say...this is pretty . I didn't think I could do something like this, but I tried anyway.
Thanks, Shawn, for the mondo cool toy.
|
|
Top
|
|
|
|
Moderator: Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart
|
0 registered
and 671 anonymous users online.
|
|
|