View previous topic :: View next topic |
Author |
Message |
plate Bodhisattva
Joined: 25 Jul 2002 Posts: 1663 Location: Berlin
|
Posted: Fri Jan 10, 2003 1:56 am Post subject: |
|
|
Resistance is futile, you will be assimilated...
New avatar, anyone?
[img:c1483ec810]http://www.decipher.com/libraryimages/startrek/rules/locutussquare.jpg[/img:c1483ec810] |
|
Back to top |
|
|
Carlos Guru
Joined: 07 Aug 2002 Posts: 458 Location: Providence, RI
|
Posted: Fri Jan 10, 2003 10:06 am Post subject: |
|
|
plate wrote: | Resistance is futile, you will be assimilated... | My thoughts exactly. Or we could go Biblical and do "Our name is Imhof, for we are many."
Not that we're exactly many now - there are ten boxen on the team - but amazingly enough, we're actually in 35th place in terms of work completed during the last 24 hours. So even at this rate, if the project lasts long enough, we'll be in the running for some money.
Edit: Misspelled Tantive's name. _________________ Man must shape his tools lest they shape him.
Last edited by Carlos on Fri Jan 10, 2003 11:48 am; edited 1 time in total |
|
Back to top |
|
|
Tantive Retired Dev
Joined: 14 May 2002 Posts: 72
|
Posted: Fri Jan 10, 2003 11:37 am Post subject: |
|
|
Please note that my name is "Imhof" (just one f)
TaT |
|
Back to top |
|
|
Carlos Guru
Joined: 07 Aug 2002 Posts: 458 Location: Providence, RI
|
Posted: Fri Jan 10, 2003 11:48 am Post subject: |
|
|
Tantive wrote: | Please note that my name is "Imhof" (just one f) | Sorry! Editing... _________________ Man must shape his tools lest they shape him. |
|
Back to top |
|
|
Zu` l33t
Joined: 26 May 2002 Posts: 716 Location: BE
|
Posted: Fri Jan 10, 2003 12:50 pm Post subject: |
|
|
I tried it as non-root, gave me a permission error (I'll paste the output later -- sorry). Perhaps someone can look into it, I seems kinda weird to run it as root. Also it opens a port, which isn't quite clear to me yet -- why does it have to open a port to the internet ? IIRC, seti didn't have to do this.
My box is idd showing up as 'haku.local.box'
Tantive: Any chance this project could make it into the next GWN ? Would be cool and we could get the word out, not every Gentoo user reads these forums. |
|
Back to top |
|
|
Carlos Guru
Joined: 07 Aug 2002 Posts: 458 Location: Providence, RI
|
Posted: Fri Jan 10, 2003 1:03 pm Post subject: |
|
|
Zu` wrote: | I tried it as non-root, gave me a permission error (I'll paste the output later -- sorry). Perhaps someone can look into it, I seems kinda weird to run it as root. Also it opens a port, which isn't quite clear to me yet -- why does it have to open a port to the internet ? IIRC, seti didn't have to do this. | Last time I tried to run it as a user, the java process grew until it used all my memory and swap (512MB and 1024MB), at which point my system was competely unusable, and I couldn't even SSH. So I've been running it as root, which isn't so strange, and not inconvenient because of the nohup.
Quote: | My box is idd showing up as 'haku.local.box' | Nice to be able to attach faces - er... - avatars to the boxen. Mine is flogiston.dyndns.org.
Quote: | Tantive: Any chance this project could make it into the next GWN ? Would be cool and we could get the word out, not every Gentoo user reads these forums. | *cough cough* _________________ Man must shape his tools lest they shape him. |
|
Back to top |
|
|
Zu` l33t
Joined: 26 May 2002 Posts: 716 Location: BE
|
Posted: Fri Jan 10, 2003 1:13 pm Post subject: |
|
|
herring wrote: |
Now I want to add ./zeta.sh
to my
/etc/conf.d/local.start
to have it up and running at boottime
Q: Will just adding
./opt/zetagrid/zeta.sh
do the trick ? |
Not quite. |
|
Back to top |
|
|
Zu` l33t
Joined: 26 May 2002 Posts: 716 Location: BE
|
Posted: Fri Jan 10, 2003 1:17 pm Post subject: |
|
|
Carlos wrote: |
Quote: | Tantive: Any chance this project could make it into the next GWN ? Would be cool and we could get the word out, not every Gentoo user reads these forums. | *cough cough* |
Woops. Forgive my ignorance.
I admit reading through it very fast last time |
|
Back to top |
|
|
Carlos Guru
Joined: 07 Aug 2002 Posts: 458 Location: Providence, RI
|
Posted: Fri Jan 10, 2003 1:40 pm Post subject: |
|
|
Zu` wrote: | herring wrote: |
Now I want to add ./zeta.sh
to my
/etc/conf.d/local.start
to have it up and running at boottime
Q: Will just adding
./opt/zetagrid/zeta.sh
do the trick ? |
Not quite. | Actually, considering that you can put anything in there, from hdparm settings to goodness knows what else, I think it would work.
Quote: | Woops. Forgive my ignorance.
I admit reading through it very fast last time | No problem; I've been surprisingly ignorant of the articles in there at times myself. I do wish that the newsletter could refer to the drive to win money for Gentoo, but I guess it's too late. _________________ Man must shape his tools lest they shape him. |
|
Back to top |
|
|
Zu` l33t
Joined: 26 May 2002 Posts: 716 Location: BE
|
Posted: Fri Jan 10, 2003 1:45 pm Post subject: |
|
|
Carlos wrote: | Zu` wrote: | herring wrote: |
Now I want to add ./zeta.sh
to my
/etc/conf.d/local.start
to have it up and running at boottime
Q: Will just adding
./opt/zetagrid/zeta.sh
do the trick ? |
Not quite. | Actually, considering that you can put anything in there, from hdparm settings to goodness knows what else, I think it would work.
|
Yeah; but it wouldn't be nice. It wouldn't be conform with the Gentoo way of handling rc-scripts. I'm looking into writing an rc-script for zetagrid, which can't be too hard, but if anyone else with more experience in this feels like writing one .. go ahead.
This should then also be included in the ebuild.
EDIT:
Perhaps it would be cool to be able to do a
Code: |
/etc/init.d/zetagrid status
|
and then it shows the progress ? |
|
Back to top |
|
|
Lovechild Advocate
Joined: 17 May 2002 Posts: 2858 Location: Århus, Denmark
|
Posted: Fri Jan 10, 2003 1:51 pm Post subject: |
|
|
I tried adding to local.start and that didn't work... I would LOVE an rc script for the ebuild , maybe even with a configuration file that matches the default setup for our project. |
|
Back to top |
|
|
Tantive Retired Dev
Joined: 14 May 2002 Posts: 72
|
Posted: Fri Jan 10, 2003 1:53 pm Post subject: |
|
|
Zu: Having an rc-scripts sounds good, if you make one i'll include it in the ebuild. (showing progress on status sounds great!)
Our zetagrid team was mentioned in the last gwn and i'm trying to push it into the next release, but before that i'd like to find a way that let's users with gcc3 based systems run it (best would be without merging gcc2)...
I already wrote a mail to sebastian about that.
TaT
btw: we are growing |
|
Back to top |
|
|
simon Apprentice
Joined: 26 Apr 2002 Posts: 225 Location: Vienna
|
Posted: Fri Jan 10, 2003 2:38 pm Post subject: |
|
|
Tantive wrote: |
Our zetagrid team was mentioned in the last gwn and i'm trying to push it into the next release, but before that i'd like to find a way that let's users with gcc3 based systems run it (best would be without merging gcc2)...
|
Hmm,
I'm already running zeta on two gcc3 based systems.
Simon |
|
Back to top |
|
|
Zu` l33t
Joined: 26 May 2002 Posts: 716 Location: BE
|
Posted: Fri Jan 10, 2003 2:50 pm Post subject: |
|
|
simon wrote: | Tantive wrote: |
Our zetagrid team was mentioned in the last gwn and i'm trying to push it into the next release, but before that i'd like to find a way that let's users with gcc3 based systems run it (best would be without merging gcc2)...
|
Hmm,
I'm already running zeta on two gcc3 based systems.
Simon |
Did you compile it yourself using GCC3 ? That's what we're trying to accomplish I think ! No problem to run the ebuild that's in portage now, on GCC3.x systems... I guess that has been proven already, as far as I've read in this thread, Carlos and I also use it on a GCC3.x system.
On another note:
Since I don't like nohup and what it does I edited zeta.sh like this:
Code: |
nice -19 java -Xmx128m -Djava.library.path=. -Dsun.net.inetaddr.ttl=0 -Dnetworka
ddress.cache.ttl=0 -Dnetworkaddress.cache.negative.ttl=0 -cp zeta.jar:zeta_clien
t.jar zeta.ZetaClient >/tmp/zeta.log 2>&1 &
|
No output at all when you start it, and still a nice log that I can watch if I want to with tail -f . Also my /tmp is a seperate partition so if it fills up, it won't bother the rest of my system.
And another note:
Tantive: I'm looking into the rc-script. Any idea on how to find the pid for killing it ? The setiathome rc-script uses 'killall setiathome' but I can't just 'killall java' Probably do-able with ps and grep, though. Or is there a way to make zetagrid write it's own pid to a file ? That would be even more easy. |
|
Back to top |
|
|
simon Apprentice
Joined: 26 Apr 2002 Posts: 225 Location: Vienna
|
Posted: Fri Jan 10, 2003 2:57 pm Post subject: |
|
|
Hi,
no I haven't compiled it myself, just emerged it from portage.
I have modiefied my zeta.sh as follows:
Code: |
cd /opt/zetagrid
nohup nice -19 /opt/sun-jdk-1.4.1.01/bin/java -Xmx128m -Djava.library.path=. -Dsun.net.inetaddr.ttl=0 -Dnetworkaddress.cache.ttl=0 -Dnetworkaddress.cache.negative.ttl=0 -cp zeta.jar:zeta_client.jar zeta.ZetaClient &
|
I have inserted cd /opt/zetagrid and the full path to java to start it with a very dirty init-script:
Code: |
#!/sbin/runscript
start() {
ebegin "Starting zetagrid"
/opt/zetagrid/zeta.sh
/opt/zetagrid/zeta_progress.sh > /dev/vc/11 &
eend $?
}
|
I also added the full path to java in zeta_progress.sh
I don't take care of stopping, because I will not stop it. It get's killed during system shutdown and the work is saved.
Simon |
|
Back to top |
|
|
Tantive Retired Dev
Joined: 14 May 2002 Posts: 72
|
Posted: Fri Jan 10, 2003 3:42 pm Post subject: |
|
|
ps -ax|grep java|grep ZetaClient|sed -e 's/^\(.\{5\}\).*$/\1/'
should do the job and give you the correct pid back
TaT |
|
Back to top |
|
|
Zu` l33t
Joined: 26 May 2002 Posts: 716 Location: BE
|
Posted: Fri Jan 10, 2003 3:49 pm Post subject: |
|
|
Tantive wrote: | ps -ax|grep java|grep ZetaClient|sed -e 's/^\(.\{5\}\).*$/\1/'
should do the job and give you the correct pid back
TaT |
Thanks for your answer Tantive, guess I should brush up on reg. expressions
Code: |
haku ~ $ ps ax | grep java | grep ZetaClient | sed -e 's/^\(.\{5\}\).*$/\1/'
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2105
haku ~ $
|
I only need that last one, that's the one that should be killed (looking at what top tells me). Any way to find out ? |
|
Back to top |
|
|
skedz n00b
Joined: 10 Jan 2003 Posts: 10
|
Posted: Fri Jan 10, 2003 9:54 pm Post subject: |
|
|
I emerged the ebuild, configured zeta.cfg file and launched ./zeta.sh in /opt/zetagrid/ as root but it didn't work. I think the error comes from java as root : the command "java" exists as normal user, but not as root !
How can I solve this problem ?
(zeta.sh requires root) |
|
Back to top |
|
|
simon Apprentice
Joined: 26 Apr 2002 Posts: 225 Location: Vienna
|
Posted: Fri Jan 10, 2003 10:50 pm Post subject: |
|
|
skedz wrote: | I emerged the ebuild, configured zeta.cfg file and launched ./zeta.sh in /opt/zetagrid/ as root but it didn't work. I think the error comes from java as root : the command "java" exists as normal user, but not as root !
How can I solve this problem ?
(zeta.sh requires root) |
Can you post the exact error message? what happens if you execute
as root?
Simon |
|
Back to top |
|
|
henke Apprentice
Joined: 30 Sep 2002 Posts: 165 Location: Stockholm, Sweden
|
Posted: Sat Jan 11, 2003 12:54 am Post subject: |
|
|
I have a similar problem. (No java as root)
When logged in as root I get
Code: | #which java
which: no java in (/sbin:/bin:/usr/sbin:/usr/bin) |
Code: | #./zeta.sh
nohup: appending output to `nohup.out' |
Code: | #cat nohup.out
nice: java: No such file or directory |
Do you get the same error skedz? |
|
Back to top |
|
|
Zu` l33t
Joined: 26 May 2002 Posts: 716 Location: BE
|
Posted: Sat Jan 11, 2003 2:50 am Post subject: |
|
|
henke wrote: | I have a similar problem. (No java as root) |
So when you are logged in as non-root which java gives you reasonable output ? Could you paste it please ?
Could you also paste the output of these two commands please:
Code: |
emerge -s sun-j2sdk
grep ROOTPATH /etc/profile.env
|
_________________ No growth without resistance.
No action without reaction.
No desire without restraint. |
|
Back to top |
|
|
Zu` l33t
Joined: 26 May 2002 Posts: 716 Location: BE
|
Posted: Sat Jan 11, 2003 3:16 am Post subject: |
|
|
Here's a first try at an rc-script for zetagrid.
Save as /etc/init.d/zetagrid :
Code: |
#!/sbin/runscript
opts="${opts} progress"
ZETADIR=/opt/zetagrid/
start() {
ebegin "Starting zetagrid"
cd ${ZETADIR}
./zeta.sh >/dev/null
eend $? "Failed to start zetagrid"
}
stop() {
ebegin "Stopping zetagrid"
kill `ps ax | grep java | grep ZetaClient | sed -e 's/^\(.\{5\}\).*$/\1/' | tail -1`
eend $? "Failed to stop zetagrid"
}
progress() {
if [ `ps ax | grep java | grep ZetaClient | sed -e 's/^\(.\{5\}\).*$/\1/' | tail -1` ]
then
ebegin "Showing zetagrid progress (Cancel with ^C) "
cd ${ZETADIR}
echo ""
./zeta_progress.sh
echo ""
echo ""
else
eend $? "zetagrid is not started"
fi
}
|
I know it's far from perfect, but it works.
'/etc/init.d/zetagrid status' will just show you if it's running or not, it's a standard feature, I decided not to change it.
Please give feedback.
Thanks
UPDATE:
Added check for "progress" to see first if ZetaGrid is running. _________________ No growth without resistance.
No action without reaction.
No desire without restraint. |
|
Back to top |
|
|
henke Apprentice
Joined: 30 Sep 2002 Posts: 165 Location: Stockholm, Sweden
|
Posted: Sat Jan 11, 2003 3:32 am Post subject: |
|
|
As non root
Code: | $java -version
java version "1.3.1"
Java(TM) 2 Runtime Environment, Standard Edition (build Blackdown-1.3.1-FCS)
Java HotSpot(TM) Client VM (build Blackdown-1.3.1-FCS, mixed mode) |
Code: |
* dev-java/sun-j2sdk
Latest version available: 1.4.0-r2
Latest version installed: [ Not Installed ]
Homepage: http://wwws.sun.com/software/java2/download.html
Description: Sun's J2SE Development Kit, version 1.4.0
* dev-java/blackdown-jdk
Latest version available: 1.3.1-r7
Latest version installed: [ Not Installed ]
Homepage: http://www.blackdown.org
Description: Blackdown Java Development Kit 1.3.1
* dev-java/blackdown-jre
Latest version available: 1.3.1-r7
Latest version installed: 1.3.1-r7
Homepage: http://www.blackdown.org
Description: Blackdown Java Runtime Environment 1.3.1 |
Code: | $ grep ROOTPATH /etc/profile.env
export ROOTPATH='/usr/local/bin:/opt/bin:/usr/X11R6/bin:/opt/blackdown-jre-1.3.1/bin:/usr/qt/3/bin:/usr/qt/2/bin:/usr/kde/3/bin:/opt/mldonkey' |
ROOTPATH contains /opt/blackdown-jre-1.3.1/bin, which contains java but
Code: | $echo $PATH # as non root gives me
/bin:/usr/bin:/usr/local/bin:/opt/bin:/usr/X11R6/bin:/opt/blackdown-jre-1.3.1/bin:/usr/qt/3/bin:/usr/qt/2/bin:/usr/kde/3/bin:/usr/games/bin:/opt/mldonkey |
and
Code: | #echo $PATH # as root gives me
/sbin:/bin:/usr/sbin:/usr/bin |
Is roots path not affected by ROOTPATH? |
|
Back to top |
|
|
Zu` l33t
Joined: 26 May 2002 Posts: 716 Location: BE
|
Posted: Sat Jan 11, 2003 3:51 am Post subject: |
|
|
henke wrote: |
Code: | #echo $PATH # as root gives me
/sbin:/bin:/usr/sbin:/usr/bin |
|
Are you switching to root using 'su' ? Try using this instead:
snippet from 'man su':
Code: |
su is used to become another user during a login session. Invoked with-
out a username, su defaults to becoming the super user. The optional
argument - may be used to provide an environment similiar to what the
user would expect had the user logged in directly.
...
The current environment is passed to the new shell. The value of $PATH
is reset to /bin:/usr/bin for normal users, or
/sbin:/bin:/usr/sbin:/usr/bin for the super user.
|
_________________ No growth without resistance.
No action without reaction.
No desire without restraint. |
|
Back to top |
|
|
henke Apprentice
Joined: 30 Sep 2002 Posts: 165 Location: Stockholm, Sweden
|
Posted: Sat Jan 11, 2003 11:33 am Post subject: |
|
|
Thanks that worked.
Now for the next problem. Running zeta.sh gives me the following exception.
Code: | Exception in thread "main" java.lang.UnsatisfiedLinkError: /opt/zetagrid/libcrypto2.so: libstdc++-libc6.2-2.so.3: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1382)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1306)
at java.lang.Runtime.loadLibrary0(Runtime.java:749)
at java.lang.System.loadLibrary(System.java:820)
at zeta.ZetaClient.<clinit>(Unknown Source) |
I seem to be missing libstdc++-libc6.2-2.so.3
Code: | #updatedb
#locate libstdc++-libc6.2-2.so.3
# locate libstdc++-libc6.2-2.so
# |
Most of you seem to be using Suns JRE. Has anyone else been able to get ./zeta.sh running using the Blackdown JRE? |
|
Back to top |
|
|
|