It is definatly not accurate on FreeBSD. But that is probably a FreeBSD
issue rather than {hl,src}ds problem./Bjorn On Thu, 23 Apr 2009, Saint K. wrote: > Thanks all for the replies. > > We use CACTI to graph everything, so we don't require the scripts. > > I guess as some one mentions the best we can do is just test beforehand > and see if there are result differences. > > Cheers, > > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of f0rkz > Sent: Thursday, April 23, 2009 8:59 PM > To: Half-Life dedicated Linux server mailing list > Subject: Re: [hlds_linux] 'stats' cpu load > > There is a perl library that can run rcon on a server. > > http://www.gruntle.org/projects/hl2/Rcon-HL2-0.05.tar.gz > > I use this small script to get info from a server. > > ===================================================== > #!/usr/bin/perl > > use Rcon::HL2; > > my $command = shift @ARGV; # bring in the title from argv > > my $rcon = Rcon::HL2->new( > hostname => "XX.XX.XX.XX", > password => "rconpasshere", > ); > > $rcon->run("$command"); > print $rcon->response(); > ===================================================== > For instance: > $ perl rcon.pl stats > 0CPU In Out Uptime Users FPS Players > 0.00 0.00 0.00 3976 8 124.35 0 > > This can be easily greped and parsed. > > > On Apr 23, 2009, at 1:24 PM, Carl wrote: > > > you could check it yourself by using an rcon script. Rcon into the > > server, run the stats command, capture the output, and then compare it > > to top. I would suggest running top just before grabing the cpu load, > > rconing in and grabbing cpuload, and then again afterwards. > > > > > > Here is the C Source: http://www.asyserver.com/~cstrike/rcon.c > > > > Or if you prefer python: http://sourceforge.net/projects/srcdspy/ > > > > > > Saint K. wrote: > >> Hi, > >> > >> Does anyone know if the output value on the CPU load of a server is > >> correctly reported when you type 'stats' ? > >> > >> We're currently creating graphs on the CPU load using 'top' as > >> reference > >> data, but as we also query the server for total player numbers and > >> server FPS it would be more easy to also draw the CPU load from there > >> instead of using top. > >> > >> Cheers, > >> > >> _______________________________________________ > >> To unsubscribe, edit your list preferences, or view the list > >> archives, please visit: > >> http://list.valvesoftware.com/mailman/listinfo/hlds_linux > >> > > > > > > _______________________________________________ > > To unsubscribe, edit your list preferences, or view the list > > archives, please visit: > > http://list.valvesoftware.com/mailman/listinfo/hlds_linux > > f0rkz > f7lans.com - Not your moms marble madness > > > _______________________________________________ > To unsubscribe, edit your list preferences, or view the list archives, > please visit: > http://list.valvesoftware.com/mailman/listinfo/hlds_linux > > No virus found in this incoming message. > Checked by AVG - www.avg.com > Version: 8.5.287 / Virus Database: 270.12.2/2074 - Release Date: > 04/23/09 06:30:00 > > _______________________________________________ > To unsubscribe, edit your list preferences, or view the list archives, please > visit: > http://list.valvesoftware.com/mailman/listinfo/hlds_linux > _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlds_linux

