[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [K12OSN] GNUChess

This might be a good case to try building an application server dedicated to GNUchess. If GNUchess will run acceptably on a lesser box, and you have an old spare one to use for this, it could be a good experiment. Even if it fails, the impact would be insignificant (as opposed to trying this w/OOo which everyone depends on). And when it sucks up all the CPU cycles, who cares, as those cycles aren't used for anything else.


Martin Woolley wrote:
On Thursday 14 April 2005 03:15, Sudev Barar wrote:

On Wed, 2005-04-13 at 20:24 +0200, M.Pribik wrote:

I have the same experience with cca 100% utilisation of CPU by GNUchess.
I have 3GHz hyperthreading P4.
CPU1 and CPU2 cyclicly alternates between cca. zero and cca. 100%.


See my message sometimes last summers. The only way to protect your LTSP
setup is to remove the program as by default it sucks up as much
resources as available to do its computation. Alternatively you have to
run it with higher nice level. Maybe some guru can point HOWTO.

On our system, the kde menus run the command xboard. The binary for gnuchess is /usr/bin/xboard. I wrote the following wrapper /usr/local/bin/xboard which informs the user that they can only play chess after school and when they do so, the command is executed at the lowest priority. Even at the lowest priority it still hogs the cpu, but we don't care after hours. You must have the Perl/TK libraries installed for this script to work.

-- cut here --

# @(#) xboard v1.00 - 14/01/05 (c) 2005 Handsworth Grammar School       #
# Author: Martin Woolley (Handsworth Grammar School)                    #
# Written: 14/01/05                                                     #
# Reason: This is a wrapper for /usr/bin/xboard (gnuchess).             #
#         gnuchess is a cpu hog and while we could just remove it, we   #
#         are not completly heartless, so we will allow them to run     #
#         the program after 15:00 hours.                                #

use Tk;

if ($HOUR < 15) {

my $mw = MainWindow->new;
$mw->title("Handsworth Grammar School");

$message = "You may only play chess after 3:00pm. We apologise for any inconvienience caused." ;
$mw->Message(-text => $message)->pack;

$mw->Button(-text => "OK", -command =>
 sub { $mw->destroy() } )
 ->pack(-side=>'left', -expand=> 1, -fill => 'x');


else {
$CMD="/bin/nice -n 19 /usr/bin/xboard";

exit 0;
-- end cut --

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]