IronBits
04-11-2009, 11:59 AM
All this below is for a Port 8000 NPLB setup. You can edit it for any port you want to participate in.
Care Packages
http://www.ironbits.net/files/llrnet-1core-linux.rar - for Linux, single core, make copies into another directory for mulit-cores
http://www.ironbits.net/files/llrnet-4core-win.rar - for Winders - 4 core version ready to go
http://www.ironbits.net/files/llrnet-8core-win.rar - for Winders - 8 core version ready to go
For Linux, cd into each directory and run ./llrnet
For Winders, cd into each directory and run llrnet.exe
or you can use this script for Winders versions
(assuming the location for the directories PATH is as follows C:\dcprojects\NPLB\Port8000\... )
Put this script in C:\dcprojects\NPLB and call it Port8000nplb.bat
@echo off
start "NPLB-1" /D C:\dcprojects\NPLB\Port8000\NPLB1 cmd.exe /C llrnet.exe
start "NPLB-2" /D C:\dcprojects\NPLB\Port8000\NPLB2 cmd.exe /C llrnet.exe
start "NPLB-3" /D C:\dcprojects\NPLB\Port8000\NPLB3 cmd.exe /C llrnet.exe
start "NPLB-4" /D C:\dcprojects\NPLB\Port8000\NPLB4 cmd.exe /C llrnet.exe
start "NPLB-5" /D C:\dcprojects\NPLB\Port8000\NPLB5 cmd.exe /C llrnet.exe
start "NPLB-6" /D C:\dcprojects\NPLB\Port8000\NPLB6 cmd.exe /C llrnet.exe
start "NPLB-7" /D C:\dcprojects\NPLB\Port8000\NPLB7 cmd.exe /C llrnet.exe
start "NPLB-8" /D C:\dcprojects\NPLB\Port8000\NPLB8 cmd.exe /C llrnet.exe
For Vista, you can use this script (Vista allows you to set affinity for your cores http://www.free-dc.org/forum/images/smilies/smile.gif )
Put this in C:\dcprojects\NPLB and call it Port8000nplb.bat
@echo off
start "NPLB-1" /D C:\dcprojects\NPLB\Port8000\NPLB1 /AFFINITY 1 cmd.exe /C llrnet.exe
start "NPLB-2" /D C:\dcprojects\NPLB\Port8000\NPLB2 /AFFINITY 2 cmd.exe /C llrnet.exe
start "NPLB-3" /D C:\dcprojects\NPLB\Port8000\NPLB3 /AFFINITY 4 cmd.exe /C llrnet.exe
start "NPLB-4" /D C:\dcprojects\NPLB\Port8000\NPLB4 /AFFINITY 8 cmd.exe /C llrnet.exe
start "NPLB-5" /D C:\dcprojects\NPLB\Port8000\NPLB5 /AFFINITY 10 cmd.exe /C llrnet.exe
start "NPLB-6" /D C:\dcprojects\NPLB\Port8000\NPLB6 /AFFINITY 20 cmd.exe /C llrnet.exe
start "NPLB-7" /D C:\dcprojects\NPLB\Port8000\NPLB7 /AFFINITY 40 cmd.exe /C llrnet.exe
start "NPLB-8" /D C:\dcprojects\NPLB\Port8000\NPLB8 /AFFINITY 80 cmd.exe /C llrnet.exe
Edit the above scripts for the amount of cores you have and directory paths etc.
On the *-win.rar files, just be sure to edit each llr-clientconfig.txt at the following line 'usename=', for each core/directory you use, everything else is good to go http://www.free-dc.org/forum/images/smilies/smile.gif
username = "LaurenU2" ; put your LoginID/UserName/Screen Name here
It don't get any easier than that folks. Join in the fun, it's only TWO days, then back to what you were doing http://www.free-dc.org/forum/images/smilies/biggrin.gif
For Linux folks, here is a setup I use for starting the clients using screen
Don't know how screen works, here's the manual http://www.gnu.org/software/screen/manual/screen.html :)
You need to change LoginID to your LoginID, create a nplb directory, then inside that directory, nplb1, nplb2, nplb3, nplb4 (for 4 cores etc)
Edit the llr-clientconfig.txt for you LoginID/UserName/Screen Name
Create a script called start8000, make sure you chmod 775 start8000 and put it in the root of your home directory
#!/bin/sh
screen -O -S nplbclients -c ~/.screenrc-8000
Create another file called .screenrc-8000 and put it in the root of your home directory (note the . character at the beginning of the filename (makes it hidden))
(The 'hardstatus string' is all on one line, don't let it line wrap)
startup_message off
autodetach on
hardstatus alwayslastline
hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{=kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B}%Y-%m-%d %{W}%c %{g}]'
#chdir
#screen -t shell 0
chdir /home/LoginID/nplb/8000/nplb1
screen -t 8000-1 1 ./llrnet
chdir /home/LoginID/nplb/8000/nplb2
screen -t 8000-2 2 ./llrnet
chdir /home/LoginID/nplb/8000/nplb3
screen -t 8000-3 3 ./llrnet
chdir /home/LoginID/nplb/8000/nplb4
screen -t 8000-4 4 ./llrnet
Done http://www.free-dc.org/forum/images/smilies/cheers.gif
For Linux, I have a script I use to manage my 'screens'
Copy paste this into a file called screens, chmod 755 screens, put it in your $PATH
#!/bin/bash
# filters the screen -ls output to show the sesssions
sessions=`screen -ls | sed -ne 's/[[:space:]]//' -ne 's/\((Attached)\|(Detached)\)// p'`
res=`echo "$sessions" | wc -w`
if (( $res == 0 ))
then
echo " No existing SCREEN session to reattach to..."
exit
fi
echo ''
echo " CURRENT SESSIONS"
echo " ------------------------"
#screen -ls | sed -ne 's/[[:space:]]//' -ne 's/\((Attached)\|(Detached)\)// p' | cat -n
echo "$sessions" | cat -n
echo " ------------------------"
echo ''
#if first argument is not specified, script will ask for number of screen
if [ -z $1 ]
then
echo -n " Reattach to session: "
read session
else
session=$1
fi
#attach to specified session
linenum=0
name=`screen -ls | sed -ne 's/[[:space:]]//' -ne 's/\((Attached)\|(Detached)\)// p' |
while read line
do
let "linenum += 1"
if [[ "$linenum" -eq "$session" ]]
then
echo $line
break
fi
done`
if [[ "$name" != "" ]]
then
screen -d -r "$name"
else
echo " Could not reattach to '$session'"
fi
Now just type screens and if you have any screen session running, it will show you all of them and you can choose which one you want to work with. :D
Care Packages
http://www.ironbits.net/files/llrnet-1core-linux.rar - for Linux, single core, make copies into another directory for mulit-cores
http://www.ironbits.net/files/llrnet-4core-win.rar - for Winders - 4 core version ready to go
http://www.ironbits.net/files/llrnet-8core-win.rar - for Winders - 8 core version ready to go
For Linux, cd into each directory and run ./llrnet
For Winders, cd into each directory and run llrnet.exe
or you can use this script for Winders versions
(assuming the location for the directories PATH is as follows C:\dcprojects\NPLB\Port8000\... )
Put this script in C:\dcprojects\NPLB and call it Port8000nplb.bat
@echo off
start "NPLB-1" /D C:\dcprojects\NPLB\Port8000\NPLB1 cmd.exe /C llrnet.exe
start "NPLB-2" /D C:\dcprojects\NPLB\Port8000\NPLB2 cmd.exe /C llrnet.exe
start "NPLB-3" /D C:\dcprojects\NPLB\Port8000\NPLB3 cmd.exe /C llrnet.exe
start "NPLB-4" /D C:\dcprojects\NPLB\Port8000\NPLB4 cmd.exe /C llrnet.exe
start "NPLB-5" /D C:\dcprojects\NPLB\Port8000\NPLB5 cmd.exe /C llrnet.exe
start "NPLB-6" /D C:\dcprojects\NPLB\Port8000\NPLB6 cmd.exe /C llrnet.exe
start "NPLB-7" /D C:\dcprojects\NPLB\Port8000\NPLB7 cmd.exe /C llrnet.exe
start "NPLB-8" /D C:\dcprojects\NPLB\Port8000\NPLB8 cmd.exe /C llrnet.exe
For Vista, you can use this script (Vista allows you to set affinity for your cores http://www.free-dc.org/forum/images/smilies/smile.gif )
Put this in C:\dcprojects\NPLB and call it Port8000nplb.bat
@echo off
start "NPLB-1" /D C:\dcprojects\NPLB\Port8000\NPLB1 /AFFINITY 1 cmd.exe /C llrnet.exe
start "NPLB-2" /D C:\dcprojects\NPLB\Port8000\NPLB2 /AFFINITY 2 cmd.exe /C llrnet.exe
start "NPLB-3" /D C:\dcprojects\NPLB\Port8000\NPLB3 /AFFINITY 4 cmd.exe /C llrnet.exe
start "NPLB-4" /D C:\dcprojects\NPLB\Port8000\NPLB4 /AFFINITY 8 cmd.exe /C llrnet.exe
start "NPLB-5" /D C:\dcprojects\NPLB\Port8000\NPLB5 /AFFINITY 10 cmd.exe /C llrnet.exe
start "NPLB-6" /D C:\dcprojects\NPLB\Port8000\NPLB6 /AFFINITY 20 cmd.exe /C llrnet.exe
start "NPLB-7" /D C:\dcprojects\NPLB\Port8000\NPLB7 /AFFINITY 40 cmd.exe /C llrnet.exe
start "NPLB-8" /D C:\dcprojects\NPLB\Port8000\NPLB8 /AFFINITY 80 cmd.exe /C llrnet.exe
Edit the above scripts for the amount of cores you have and directory paths etc.
On the *-win.rar files, just be sure to edit each llr-clientconfig.txt at the following line 'usename=', for each core/directory you use, everything else is good to go http://www.free-dc.org/forum/images/smilies/smile.gif
username = "LaurenU2" ; put your LoginID/UserName/Screen Name here
It don't get any easier than that folks. Join in the fun, it's only TWO days, then back to what you were doing http://www.free-dc.org/forum/images/smilies/biggrin.gif
For Linux folks, here is a setup I use for starting the clients using screen
Don't know how screen works, here's the manual http://www.gnu.org/software/screen/manual/screen.html :)
You need to change LoginID to your LoginID, create a nplb directory, then inside that directory, nplb1, nplb2, nplb3, nplb4 (for 4 cores etc)
Edit the llr-clientconfig.txt for you LoginID/UserName/Screen Name
Create a script called start8000, make sure you chmod 775 start8000 and put it in the root of your home directory
#!/bin/sh
screen -O -S nplbclients -c ~/.screenrc-8000
Create another file called .screenrc-8000 and put it in the root of your home directory (note the . character at the beginning of the filename (makes it hidden))
(The 'hardstatus string' is all on one line, don't let it line wrap)
startup_message off
autodetach on
hardstatus alwayslastline
hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{=kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B}%Y-%m-%d %{W}%c %{g}]'
#chdir
#screen -t shell 0
chdir /home/LoginID/nplb/8000/nplb1
screen -t 8000-1 1 ./llrnet
chdir /home/LoginID/nplb/8000/nplb2
screen -t 8000-2 2 ./llrnet
chdir /home/LoginID/nplb/8000/nplb3
screen -t 8000-3 3 ./llrnet
chdir /home/LoginID/nplb/8000/nplb4
screen -t 8000-4 4 ./llrnet
Done http://www.free-dc.org/forum/images/smilies/cheers.gif
For Linux, I have a script I use to manage my 'screens'
Copy paste this into a file called screens, chmod 755 screens, put it in your $PATH
#!/bin/bash
# filters the screen -ls output to show the sesssions
sessions=`screen -ls | sed -ne 's/[[:space:]]//' -ne 's/\((Attached)\|(Detached)\)// p'`
res=`echo "$sessions" | wc -w`
if (( $res == 0 ))
then
echo " No existing SCREEN session to reattach to..."
exit
fi
echo ''
echo " CURRENT SESSIONS"
echo " ------------------------"
#screen -ls | sed -ne 's/[[:space:]]//' -ne 's/\((Attached)\|(Detached)\)// p' | cat -n
echo "$sessions" | cat -n
echo " ------------------------"
echo ''
#if first argument is not specified, script will ask for number of screen
if [ -z $1 ]
then
echo -n " Reattach to session: "
read session
else
session=$1
fi
#attach to specified session
linenum=0
name=`screen -ls | sed -ne 's/[[:space:]]//' -ne 's/\((Attached)\|(Detached)\)// p' |
while read line
do
let "linenum += 1"
if [[ "$linenum" -eq "$session" ]]
then
echo $line
break
fi
done`
if [[ "$name" != "" ]]
then
screen -d -r "$name"
else
echo " Could not reattach to '$session'"
fi
Now just type screens and if you have any screen session running, it will show you all of them and you can choose which one you want to work with. :D