You are not logged in.
Pages: 1
Hi. I have a strange issue with my old CPU, it reboots when idle (<5% usage) so whenever I login I usually go to a tty and execute a top -d 0.05, enough to keep my P3 busy. It works but I'd like to make a small daemon for that, so I wrote a script that executes that top. I then copy it to /etc/rc.d and add it to rc.conf. However, it executes before I login and I am forced to quit top to be able to login. I have tried writing an @ before the script name in rc.conf but doesn't work. It doesn't work either top -d 0.05 > /dev/null. I have also tried with a & after the script, it executes in the background but doesn't use any cpu (maybe because it is not printing=)
Is there a way to do what I want? I guess there are many ways to keep the cpu usage at about 10% but can I achieve this with top? Is there any way to execute it at background and not to print anything and use cpu? Like an ordinary daemon.
Anyway, if it is not possible I'd write a simple C program with some loops and waits...
Thanks.
Last edited by Hiperi0n (2008-06-27 21:47:05)
Offline
But why does your CPU reboot when idle ?
The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...
Offline
Moljac024 That is the question of the millenium. I posted it in several forums. People can't give me a clue. It could be the motherboard, it is a bit old. However, the fact is that it reboots when idle, not when running at 100%. I have tried many programs, benchmarks, stressing, unplugging things, HD... the only thing I haven't tried is the power supply. It is a Pentium 3 coppermine 866mhz
Offline
This is not really an answer to your question, but what about having it start when you start X?
Offline
But why does your CPU reboot when idle ?
maybe his energy saving policy is too aggressive!
Offline
If you really want a cpu usage daemon, you should choose Boinc. It keeps your CPU at the usage level you want, and you are doing work for science too. There are many projects to work for.
But maybe its just your power supply. A broken one can be responsible for the wierdest errors.
Offline
+1 for Boinc
The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...
Offline
Thanks for your answers. I guess I will try boinc. However I was just wondering how to write a daemon on my own, I am sure there are many programs to achieve so. I can't init with X, as I haven't installed xorg yet. I have been googling a bit and I found I must fork the process so it becomes autonomous. After that I should be able to login (the problem I had with the top script).
Anyway I will give boinc a try. Thank you all
Offline
As long as you are using CPU cycles, you might as well put them to good use::D
Offline
I give up using Boinc. I can't find a tutorial of the command line mode of boinc. I guess it is a nice project but there is little or no help regarding its usage. Maybe the GUI versions are easy to use but not the CLI version. I might give it a try when I have more spare time but not right now...
Offline
I give up using Boinc. I can't find a tutorial of the command line mode of boinc. I guess it is a nice project but there is little or no help regarding its usage. Maybe the GUI versions are easy to use but not the CLI version. I might give it a try when I have more spare time but not right now...
Have you even tried looking for the documentation or some other help? Didn't even took me a minute to find plenty of howtos, tutorials and other documentation.
http://boinc.berkeley.edu/wiki/User_manual and http://www.xtremesystems.org/forums/sho … p?t=137278 are just two examples.
Offline
I also didnt get the CLI-Version to work. Maybe we can help, if you tell us, where you got stuck?
Have you tried searching the arch forums for "boinc"?
Offline
thanks, I fill kinda stupid now. I have been looking for this kind of help but I couldn't find it. I have been able to attach to a project. I now must limit the cpu usage of it and start it with the system. I guess rc.conf would do
thanks smoon
Offline
Good to read that its working now. The CPU usage is configurable in the global settings of each project. There you can set up the settings for the project, and the settings for boinc (global settings, which apply for every project, every boinc project should have a site to do this).
Which project did you choose, if i may ask?
Offline
I am at einstein@home. However I now have some more problems. I wrote 2 scripts, one for the client and the other for the boinc_cmd. I put them in /etc/rc.d/ and in rc.conf but it is not working, i have the authorization failure error and I end up with my / folder with some boinc files, which it is a mess. I don't know why as I am cd-ing to my boinc-workdir in the scripts. I know I should not be using boinc as root but step by step please...
These are my two scripts:
boinc-client-script:
#!/bin/bash
cd /root/boinc-workdir
boinc_client --daemon
boinc-cmd-script:
#!/bin/bash
cd /root/boinc-workdir/
nice -n 19 /usr/bin/boinc_cmd --project_attach http://einstein.phys.uwm.edu/ <my-key>
I fell like a bit stupid, I have been too long in desktop environments....
Offline
Well, it seems I have partially solved my problems. The --dir option in boinc_client specifies the working directory. However, the client executes at startup, nice, but the boinc_cmd doesn't attach to the project, as if my boinc_cmd script doesn't wait its predecessor (boinc-client script) to end. But if I am not wrong, unless I writen an @ before the script name, they execute sequentialy, waiting to finish the previous script.
If I execute the boinc_cmd script myself after logging in it does attach and begin to work nicely, so I suppose it could be what I have said before...
Offline
Now I am quite surprised, I have rebooted for the tenth time and it works. As soon as I login, I can see the einstein_S5R3...... process with a NICE of 19 eating my oldie cpu. I guess the only thing left is adjusting its cpu usage.
I am not expert in kernel scheduling methods, but what do you think about not limiting boinc and executing it with a NICE of 19 (lowest priority)? Should I limit its cpu usage (with cpu-limiter I think, there is no option implemented yet to throttle cpu in boinc software) or leave it that way? I am also worried about the memory usage, as I only have 384mb and I plan on installing a desktop environment...
Offline
You can set up memory and cpu usage in every boinc project globaly. No need for extra tools. Set your settings here: "Your account" (link to einstein). Every project has different memory usages, some require quite large ammounts to work.
Einstein seems to use about ~70 MB (FAQ). Currently i am crunching work for a project of a german university, they are studying magnetic reactions. Only 24 resident MB are used.
Edit: Link to the german project: Spinhenge@home
Last edited by Doc Angelo (2008-06-27 19:43:04)
Offline
Thanks Doc Angelo, I might try the spinhenge project. I have configured a 90% usage of CPU but what it does is to use 100% cpu 90% of the time, not 90% cpu all the time. It worries me as my cpu must be active all the time, a couple of seconds being idle are enough to make it reboot. I think cpu limiter is the only choice to get what I want. Thanks anyway
After having resolved the cpu usage issues I am now ready to tickle further into arch ^^ thank you all for your help :*
Offline
Well but stay tuned for the next episode of Hiperi0n's bizarre hiperactive rebooting CPU
I still can't find an answer to the rebooting-when-idle problem, the mobo is old and some capacitors are leaking a little bit, but that shouldn't affect the cpu...
Offline
Pages: 1