L'Alliance Francophone > L'AFabric

[PS3] Comment cruncher sans clavier, ni souris

(1/7) > >>

ThierryH:
Le problème avec BOINC sur PS3, c'est d'avoir à laisser en permanence un clavier et une souris dessus pour povoir s'identifier, lancer BOINC et rebooter sous l'OS de Sony. C'est lourd et ça décourage :(

Voici la solution :bounce:

Une fois tout correctement configuré, voici la marche à suivre pour passer de l'OS Sony au lancement de BOINC:
- Demander le redémarrage sous un autre OS. C'est tout :love:

Marche à suivre pour passer de BOINC à l'OS Sony:
- Appuyer 2 secondes sur le bouton I/O en face avant. La PS3 émet un bip et la led verte clignote.
- Une fois la led au rouge, redémarrer la PS3 normalement. C'est tout :love:


Maintenant, on passe au plus dûr: la configuration. Bien entendu, pour cette étape, il vous faut disposer d'un clavier et d'une souris connectés à la PS3 ;)

ThierryH:
Ce tuto est une adaptation à la PS3 et à YDL du travail de M300A sur HRF.

Tout d'abord, ouvrez une session sur le compte root.
Ensuite, ouvrez un éditeur de texte et faites un copier/coller du script suivant:


--- Citer ---
#!/bin/sh

# boincctl - Control boinc.  Stop it/Start it/Restart it.  Originally
#            meant to be used as a boot time script so that boinc starts
#            at boot time, but can be used any time.  For a boot time script
#            put this in /etc/init.d and make the appropriate links from
#            the appropriate run level areas (ie. /etc/rc3.d).  (This was
#            developed on RedHat 9 so I know what the boot areas are there.
#            It should also work on Solaris,  I'm not familiar with other
#            flavors of Linix/UNIX.)

# Author:    Charles Dennett/Rochester, NY USA.
# Email:     dennett@rochester.rr.com
# Date:      December 12, 2003.
# Version:   1.0
#
# History:   Version 1.1.  May 20. 2004.
#            Update stop function to use SIGTERM (15).
#            Version 1.2.  September 18, 2004
#            Comments about functions.
#
# Comment:   Copyright by the author.  Feel free to make modifications.
#            However, please keep these comments intact.

# Use:       To start:   boincctl start
#            To stop:    boincctl stop
#            To restart: boincctl restart
#            Status:     boincctl status

#
# Variables that will need to be configured.
#
#  BOINC_HOME:  The directory where boinc will run.  It should be run
#               in its own directory to keep its files and subdirectories
#               separate form others.
#
#  BOINC_BIN:   The full path to the boinc executable.
#
#  RUN_AS:      Username that boinc is to run as.
#
#  BOINC_OUT:   File to direct output from boinc.  If you don't want this,
#               set it to /dev/null.
#
#  BOINC_PARMS: Any command line parameters for boinc you wish to pass to
#               it.  If you don't want any, simply use a null list ("").
#
#  FUNCT:       Should be use if your distribution is not redhat or debian
#               based. Can be set to pkill to use pkill or killproc to use
#      killproc to kill the client.

BOINC_HOME=/root/Desktop/boinc/run
BOINC_BIN=/root/Desktop/boinc/bin/boinc_client
RUN_AS=root
BOINC_OUT=boinc.out
BOINC_ERR=boinc.err
BOINC_PARMS="--daemon --allow_remote_gui_rpc"
#BOINC_PARMS="-allow_remote_gui_rpc"
#BOINC_PARMS="-return_results_immediately"
#BOINC_PARMS="-return_results_immediately -allow_remote_gui_rpc"
FUNCT=pkill


start()
{
   echo -n "Starting BOINC..."
   eval $SU_CMD
   /sbin/other-os-flash-util -b `/sbin/find-other-os-flash`
   echo " done."
}

stop()
{
   echo -n "Stopping BOINC..."
 
   if [ "$FUNCT" = "pkill" ]
   then
   pkill -15 `basename $BOINC_BIN`
   fi

   if [ "$FUNCT" = "killproc" ]
   then
   killproc `basename $BOINC_BIN` -15
   fi

   echo " done."
}

restart()
{
   stop
   echo  "Be patient.  Waiting 10 seconds for all to stop."
   sleep 10
   start
}

#----------------------------------------------------------------------------
#
# Start of mainline code
#

# If the user running this script is not the user we want boinc to run as, set
# up the su command so that we can become that user.  Note, we will have to
# know this user's password.  If this script is run at boot time, it is root
# that is running this script and no password is required.

WHO_AM_I=`whoami`
CMD="$BOINC_BIN $BOINC_PARMS >> $BOINC_OUT 2>> $BOINC_ERR &"

if [ "$WHO_AM_I" != "$RUN_AS" ]; then
   SU_CMD="su $RUN_AS -c \"$CMD\""
else
   SU_CMD=$CMD
fi



# Go to where we want boinc to run

cd $BOINC_HOME

case "$1" in
  start)
         start
         ;;
  stop)
         stop
         ;;
  restart)
         restart
         ;;
  status)
         echo "What do I do here for status?"
         tail -20 $BOINC_OUT
         ;;
  *)
         echo "Usage:     `basename $0` start|stop|restart|status"
         exit 1
         ;;
esac

--- Fin de citation ---


Ce script sous-entend que vous avez installé BOINC dans le répertoire /root/Desktop/boinc. Si ce n'est pas le cas, adaptez les lignes "BOINC_HOME=/root/Desktop/boinc/run" et "BOINC_BIN=/root/Desktop/boinc/bin/boinc_client" en conséquence.

Entrgistrez ce fichier sous le nom boincctl sous le répertoire /root/Desktop.
Ouvrez Terminal.
Entez les comandes suivantes:


--- Citer ---
cd /root/Desktop
chmod 750 boincctl
mv boincctl /etc/init.d/
ln -s /etc/init.d/boincctl /usr/bin/boincctl
cd /etc/rc.d/rc0.d
ln -s /etc/init.d/boincctl K25boincctl
cd /etc/rc.d/rc1.d
ln -s /etc/init.d/boincctl K25boincctl
cd /etc/rc.d/rc2.d
ln -s /etc/init.d/boincctl S90boincctl
cd /etc/rc.d/rc3.d
ln -s /etc/init.d/boincctl S90boincctl
cd /etc/rc.d/rc4.d
ln -s /etc/init.d/boincctl S90boincctl
cd /etc/rc.d/rc5.d
ln -s /etc/init.d/boincctl S90boincctl
cd /etc/rc.d/rc6.d
ln -s /etc/init.d/boincctl K25boincctl

--- Fin de citation ---


Et voila. C'est fini. Vous pouvez redémarrer et faire des tests :)

 :jap:

ThierryH:
Certains ne manqueront pas de se poser la question: comment savoir si ça crunch puisque je n'ai plus de clavier pour entrer le mot de passe ?

Deux solutions:
- Vous allez sur le site du projet et vous regardez si le score évolu. Avec 22h par wu sur PS3GRID, ce n'est pas gagné :(
- Vous attaquez le BOINC de la PS3 depuis le BoincManager de votre PC :)

Pour que cette dernière solution fonctionne, il va falloir entrer un mot de passe dans le fichier gui_rpc_auth.cfg qui se trouve dans le répertoire /run du boinc de votre PS3.

Marche à suivre:
- Ouvrez Terminal et entrez la commande suivante: boincctl stop
- A l'aide de l'explorateur de fichiers, ouvrez le fichier gui_rpc_auth.cfg dans le répertoire /run de boinc.
- Mettez le mot de passe que vous souhaitez.
- Enregistrez et fermez.
- Dans la fenêtre Terminal, entrez la commande suivante: boincctl start

 :jap:

ThierryH:
Je viens de passer un bon bout de temps à traduire le tuto en anglais sur le forum de PS3GRID et j'ai tout perdu à cause de leur anti-spam qui a refusé mon tuto :fou:

celtar:
Beau travail Thierry !

lorsque les PS3 vont baisser ça va servir à pas mal de monde

merci

Navigation

[0] Index des messages

[#] Page suivante

Utiliser la version classique