I stopped reading this thread a few days back (when it went off the
rails) but the code does the following every 5 seconds to determine CPU
usage:


                GetProcessTimes (handle, &creationTime, &exitTime,
                                                &kernelTime,
&totalTime);
                GetSystemTimeAsFileTime(&nowTime);

                m_fCPUPercent =
(totalTime-lastTotalTime)/(nowTime-lastNow);
                lastNow = nowTime;
                lastTotalTime = totalTime;

So we ask windows how much time did you give me and how long have I been
running, and we take those away from the last sample. In a HT or SMP
configurations this could result in each process consuming 100% cpu
(100% execution time on one CPU).


- Alfred

----Original Message----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Whisper Sent:
Friday, May 20, 2005 11:37 AM To: [email protected]
Subject: Re: [hlds] Re: What does RCON STATS CPU Really mean?

> --
> [ Picked text/plain from multipart/alternative ] Yeah, sprout, you
> missed the point of the entire thread!!!
>
> On 5/21/05, sprout <[EMAIL PROTECTED]> wrote:
> >
> > country and western? did I miss something?
> > ----- Original Message -----
> > From: "Whisper" <[EMAIL PROTECTED]>
> > To: <[email protected]>
> > Sent: Friday, May 20, 2005 12:00 PM
> > Subject: Re: [hlds] Re: What does RCON STATS CPU Really mean?
> >
> >
> > > --
> > > [ Picked text/plain from multipart/alternative ] We like both
> > > types of music here Country AND Western!
> > > > D
> > >
> > > On 5/21/05, sprout <[EMAIL PROTECTED]> wrote:
> > > >
> > > > I run 2 40 person servers on a p4 3.0 ghz 1 gig of ram with
> > > > about 40 people total im running about 85% usage(working on
> > > > getting a duel processor computer) that should fix alot of my
> > > > problems with low fps ----- Original Message ----- From: "Ian
> > > > mu" <[EMAIL PROTECTED]>
> > > > To: <[email protected]>
> > > > Sent: Friday, May 20, 2005 3:09 AM
> > > > Subject: Re: [hlds] Re: What does RCON STATS CPU Really mean?
> > > >
> > > >
> > > > > Out of interest, how much cpu do others think a 40 slot game
> > > > > server would take when fully loaded? Not sure if you said what
> > > > > spec the CPUs are. I'd probably guess its about right (can't
> > > > > be "that" far off whatever) and expect most current CPUs to
> > > > > hit 85% or so with that.
> > > > >
> > > > > On 5/20/05, Whisper <[EMAIL PROTECTED]> wrote:
> > > > > > --
> > > > > > [ Picked text/plain from multipart/alternative ] There does
> > > > > > appear to be a correlation between the FPS and the CPU
> > > > > > numbers The 18 player server though seems to cope quite
> > > > > > well with: fps_max 600 sv_maxrate 2000
> > > > > > sv_maxupdaterate 120
> > > > > > tickrate 100
> > > > > > whilst maintaining >500 FPS
> > > > > > The 40 player server though (which I never expect to run
> > > > > > constantly at  500 fps) seems to cope quite well with:
> > > > > > fps_max 600
> > > > > > sv_maxrate 2000
> > > > > > sv_maxupdaterate 100
> > > > > > tickrate 66
> > > > > > The but the overall playing experience on the 40 Player
> > > > > > server for people with client computers that can keep up,
> > > > > > results in a excellent end
> > > > result
> > > > > > especially considering the numbers of players.
> > > > > > On 5/20/05, Alexander Kobbevik <[EMAIL PROTECTED]> wrote:
> > > > > > >
> > > > > > > Look at the FPS though... it drops, right?
> > > > > > > And maybe the stats command stress the CPU or HLDS? :-)
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > -----Original Message-----
> > > > > > > From: [EMAIL PROTECTED]
> > > > > > > [mailto:[EMAIL PROTECTED] On Behalf Of
> > > > > > > Whisper Sent: 20. mai 2005 06:05
> > > > > > > To: [email protected]
> > > > > > > Subject: Re: [hlds] Re: What does RCON STATS CPU Really
> > > > > > > mean?
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > [ Picked text/plain from multipart/alternative ] Clayton
> > > > > > > the sampling might be correct, but how would that explain
> > > > > > > the results I get when I spam "rcon stats" into console
> > > > > > > and receive
> > > > numbers
> > > > > > > that
> > > > > > > are all within 10% of each other?
> > > > > > > Here is exmple:
> > > > > > > 14:03:37 stats
> > > > > > > 14:03:37 CPU In Out Uptime Users FPS Players
> > > > > > > 86.53 73784.24 227882.64 177 6 56.87 39
> > > > > > > 14:03:38 stats
> > > > > > > 14:03:38 CPU In Out Uptime Users FPS Players
> > > > > > > 86.53 74690.58 228744.00 177 6 63.98 39
> > > > > > > 14:03:38 stats
> > > > > > > 14:03:38 CPU In Out Uptime Users FPS Players
> > > > > > > 86.77 75565.57 229665.05 177 6 35.32 39
> > > > > > > 14:03:38 stats
> > > > > > > 14:03:38 CPU In Out Uptime Users FPS Players
> > > > > > > 86.77 76380.45 231317.58 177 6 34.13 39
> > > > > > > 14:03:39 stats
> > > > > > > 14:03:39 CPU In Out Uptime Users FPS Players
> > > > > > > 86.77 77197.75 232984.47 177 6 34.13 39
> > > > > > > 14:03:39 stats
> > > > > > > 14:03:39 CPU In Out Uptime Users FPS Players
> > > > > > > 86.77 77256.87 234898.08 177 6 30.10 39
> > > > > > > 14:03:39 stats
> > > > > > > 14:03:39 CPU In Out Uptime Users FPS Players
> > > > > > > 95.31 77242.05 236992.31 177 6 26.96 39
> > > > > > > 14:03:39 stats
> > > > > > > 14:03:39 CPU In Out Uptime Users FPS Players
> > > > > > > 95.31 77264.55 238138.23 177 6 33.02 39 14:03:40 stats
> > > > > > > 14:03:40 CPU In Out Uptime Users FPS Players
> > > > > > > 95.31 77243.81 238387.27 177 6 33.04 39 14:03:40 stats
> > > > > > > 14:03:40 CPU In Out Uptime Users FPS Players
> > > > > > > 94.57 77214.17 238615.45 177 6 40.99 39 14:03:40 stats
> > > > > > > 14:03:40 CPU In Out Uptime Users FPS Players
> > > > > > > 94.57 77057.98 238889.06 177 6 34.12 39 14:03:40 stats
> > > > > > > 14:03:40 CPU In Out Uptime Users FPS Players
> > > > > > > 94.57 76746.83 239109.53 177 6 33.05 39
> > > > > > > 14:03:41 stats
> > > > > > > 14:03:41 CPU In Out Uptime Users FPS Players
> > > > > > > 94.57 76242.27 239287.92 177 6 57.57 39
> > > > > > > 14:03:41 stats
> > > > > > > 14:03:41 CPU In Out Uptime Users FPS Players 94.30
> > > > > > > 75778.00 238699.22 177 6 37.94 39 14:03:41 stats
> > > > > > > 14:03:41 CPU In Out Uptime Users FPS Players 94.30
> > > > > > > 75704.43 238780.63 177 6 60.21 39 14:03:41 stats
> > > > > > > 14:03:42 CPU In Out Uptime Users FPS Players 94.30
> > > > > > > 75405.64 238652.98 177 6 25.60 39 14:03:42 stats
> > > > > > > 14:03:42 CPU In Out Uptime Users FPS Players
> > > > > > > 93.41 75245.19 238275.91 177 6 28.43 39
> > > > > > > 14:03:42 stats
> > > > > > > 14:03:42 CPU In Out Uptime Users FPS Players
> > > > > > > 93.41 75358.87 238213.38 177 6 27.67 39
> > > > > > > 14:03:42 stats
> > > > > > > 14:03:42 CPU In Out Uptime Users FPS Players
> > > > > > > 93.41 75571.36 237885.63 177 6 28.46 39
> > > > > > > 14:03:43 stats
> > > > > > > 14:03:43 CPU In Out Uptime Users FPS Players
> > > > > > > 93.41 76112.34 237668.05 177 6 30.11 39
> > > > > > > 14:03:43 stats
> > > > > > > 14:03:43 CPU In Out Uptime Users FPS Players
> > > > > > > 89.06 76824.73 237348.69 177 6 60.34 39
> > > > > > > 14:03:43 stats
> > > > > > > 14:03:43 CPU In Out Uptime Users FPS Players
> > > > > > > 89.06 77527.95 237276.89 177 6 36.56 39
> > > > > > > 14:03:43 stats
> > > > > > > 14:03:44 CPU In Out Uptime Users FPS Players
> > > > > > > 89.06 77854.19 237533.16 177 6 46.56 39
> > > > > > > 14:03:44 stats
> > > > > > > 14:03:44 CPU In Out Uptime Users FPS Players
> > > > > > > 90.63 77517.18 238679.83 177 6 34.15 39
> > > > > > > 14:03:44 stats
> > > > > > > 14:03:44 CPU In Out Uptime Users FPS Players
> > > > > > > 90.63 77084.93 240084.63 177 6 36.57 39
> > > > > > > 14:03:44 stats
> > > > > > > 14:03:44 CPU In Out Uptime Users FPS Players
> > > > > > > 90.63 76791.86 241383.80 177 6 31.04 39
> > > > > > > 14:03:45 stats
> > > > > > > 14:03:45 CPU In Out Uptime Users FPS Players
> > > > > > > 90.63 76871.59 242368.47 177 6 22.76 39
> > > > > > > 14:03:45 stats
> > > > > > > 14:03:45 CPU In Out Uptime Users FPS Players
> > > > > > > 91.71 77053.85 242882.44 177 6 23.81 39
> > > > > > > 14:03:45 stats
> > > > > > > 14:03:45 CPU In Out Uptime Users FPS Players
> > > > > > > 91.71 77454.66 242307.06 177 6 32.04 39
> > > > > > > 14:03:45 stats
> > > > > > > 14:03:46 CPU In Out Uptime Users FPS Players
> > > > > > > 91.71 78062.38 240988.48 177 6 35.32 39
> > > > > > > 14:03:46 stats
> > > > > > > 14:03:46 CPU In Out Uptime Users FPS Players
> > > > > > > 91.71 78272.21 239666.45 177 6 32.02 39
> > > > > > > 14:03:46 stats
> > > > > > > 14:03:46 CPU In Out Uptime Users FPS Players
> > > > > > > 91.83 78384.60 238314.08 177 6 36.57 39
> > > > > > > 14:03:46 stats
> > > > > > > 14:03:46 CPU In Out Uptime Users FPS Players
> > > > > > > 91.83 78409.96 237305.31 177 6 33.04 39 Now you cannot
> > > > > > > tell me that this is not odd and that this is some sort
> > > > > > > of
> > > > > > > time sampling mismatch
> > > > > > > task manager ought to damn well show something that
> > > > > > > approximates what SRCDS is reporting back or vice versa,
> > > > > > > but it does not! On 5/20/05, Clayton Macleod
> > > > > > > <[EMAIL PROTECTED]> wrote:
> > > > > > > >
> > > > > > > > true, but you have to sample for a certain period of
> > > > > > > > time to get
> > a
> > > > > > > > percentage reading. Obviously I'm just guessing that the
> > > > > > > > period
> > > > that
> > > > > > > > the game's using is shorter than the period that task
> > > > > > > > manager uses, but it would seem to make sense
> > > > > > > > considering the observations.
> > Why
> > > > > > > > would that be so hard to accept? If you're only sampling
> > > > > > > > usage
> > for
> > > > > > > > 0.1
> > > > > > > > seconds and you see a 99% value there's nothing wrong
> > > > > > > > with that,
> > > > even
> > > > > > > > if task manager only showed 10% usage at the same time,
> > > > > > > > since
> > task
> > > > > > > > manager samples for 1.0 seconds and it could have been
> > > > > > > > idle for the other 0.9 seconds, which would indeed mean
> > > > > > > > 10% usage for task manager's period.
> > > > > > > >
> > > > > > > > On 5/19/05, Whisper <[EMAIL PROTECTED]> wrote:
> > > > > > > > > --
> > > > > > > > > [ Picked text/plain from multipart/alternative ] Well
> > > > > > > > > it is not like anybody has stepped up and stated
> > > > categorically
> > > > > > > what
> > > > > > > > it
> > > > > > > > > really means and is able to explain the discrepancies
> > > > > > > > > between the
> > > > 2
> > > > > > > that
> > > > > > > > a
> > > > > > > > > critically thinking human being would accept.
> > > > > > > >
> > > > > > > >
> > > > > > > > --
> > > > > > > > Clayton Macleod
> > > > > > > >
> > > > > > > > _______________________________________________
> > > > > > > > To unsubscribe, edit your list preferences, or view the
> > > > > > > > list archives, please visit:
> > > > > > > > http://list.valvesoftware.com/mailman/listinfo/hlds
> > > > > > > >
> > > > > > > --
> > > > > > >
> > > > > > > _______________________________________________
> > > > > > > To unsubscribe, edit your list preferences, or view the
> > > > > > > list archives, please visit:
> > > > > > > http://list.valvesoftware.com/mailman/listinfo/hlds
> > > > > > >
> > > > > > >
> > > > > > > _______________________________________________
> > > > > > > To unsubscribe, edit your list preferences, or view the
> > > > > > > list archives, please visit:
> > > > > > > http://list.valvesoftware.com/mailman/listinfo/hlds
> > > > > > >
> > > > > > --
> > > > > >
> > > > > > _______________________________________________
> > > > > > To unsubscribe, edit your list preferences, or view the
> > > > > > list archives, please visit:
> > > > > > http://list.valvesoftware.com/mailman/listinfo/hlds
> > > > > >
> > > > >
> > > > > _______________________________________________
> > > > > To unsubscribe, edit your list preferences, or view the list
> > > > > archives, please visit:
> > > > > http://list.valvesoftware.com/mailman/listinfo/hlds
> > > >
> > > >
> > > > _______________________________________________
> > > > To unsubscribe, edit your list preferences, or view the list
> > > > archives, please visit:
> > > > http://list.valvesoftware.com/mailman/listinfo/hlds
> > > >
> > > --
> > >
> > > _______________________________________________
> > > To unsubscribe, edit your list preferences, or view the list
> > > archives, please visit:
> > > http://list.valvesoftware.com/mailman/listinfo/hlds
> >
> >
> > _______________________________________________
> > To unsubscribe, edit your list preferences, or view the list
> > archives, please visit:
> > http://list.valvesoftware.com/mailman/listinfo/hlds

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlds

Reply via email to