Results 1 to 11 of 11

Thread: stop/start SoB intelligently on Linux?

  1. #1
    Senior Member Frodo42's Avatar
    Join Date
    Nov 2002
    Location
    Jutland, Denmark
    Posts
    299

    Question stop/start SoB intelligently on Linux?

    I have access to a number of Linux machines that are turned on 24-7. I could not stand the temptation of starting to sieve on them all.
    My problem is that people don't like to see sb taking all the CPU when they check with top.
    At present I use at to start and stop the client from so that it only runs during the night when noone sees and and complains.
    If just crontab worked on the system things would be a lot easier, but the administrater has'nt enabled it. So i set at for some amount of days, but it is rather problematic. Is there another way without using crontab?
    Is there a way to hide sb from top so that people don't see it or perhaps something that starts the client when no one is logged in?
    I have tried with batch (which should start the process when load is <80% but the problem with that is that the client does not stop when load rises again.
    As I see there exist a few Linux (UNIX?) process' to start a client, but the only way to stop it is to make a kill script that is run by at.
    Well I hope you get the idea of my problem out there, any ideas?

  2. #2
    Nothing to add, but my own request that the client please aquire some abilities of communication. Either it needs to understand a couple command-line parameters (like -runfor n minutes or -stop_after_n blocks or -stop-after-current-proth-test or such) or otherwise it needs some channel of cummunication to receive instructions from the outside (at the bare bones least it needs to trap something like USR1 and shut down cleanly when it receives that signal).

    As it is, theres absolutely no (documented) provision for a clean shutdown under linux at all -- whether by chron or by hand.

  3. #3
    Senior Member eatmadustch's Avatar
    Join Date
    Nov 2002
    Location
    Switzerland
    Posts
    154
    sob is on idle (39, I think) priority. That means, it only uses the processor when it would otherwise be doing nothing. As soon as someone does something that task will get prioity. That means sob doesn't slow down your computer. So why don't you explain that to these guys, so you can run it at day, too?

    About switching off the client, I would like to know how to do that too, when I asked last time some joker told me to use "init 0" (that halts the system, but he didn't get me ). Right now I use CTRL-C, but you lose work like this!
    EatMaDust


    Stop Microsoft turning into Big Brother!
    http://www.againsttcpa.com

  4. #4
    Senior Member Frodo42's Avatar
    Join Date
    Nov 2002
    Location
    Jutland, Denmark
    Posts
    299
    I did also mention that it uses nice priority 19. But they argued that using nice (to control the process') also slows the computers and that they are slow enough already, so now I try to hide the SoB from them :-)
    I am not able to notice any diffrence when I run SoB, but I see no point in provoking them. The problem is also that people don't like to see that someone else is using the CPU on a computer they are using, I think they are used to think of process' that run under anther username when they are logged in as an unterminated process, and that actually os a problem since they seldom run at low priority ...

  5. #5
    Former QueueMaster Ken_g6[TA]'s Avatar
    Join Date
    Nov 2002
    Location
    Colorado
    Posts
    184
    I could be mistaken, but I believe "MaxRetries 1" in your sclient.conf will implement (mostly) -stop-after-current-proth-test.

    Edit: Also, did you get permission from the owner(s) of the systems to run SoB? You could face criminal charges if you don't. Just ask David McOwen.

  6. #6
    Senior Member Frodo42's Avatar
    Join Date
    Nov 2002
    Location
    Jutland, Denmark
    Posts
    299
    I did actually get things working allright by making a script that sets at for the coming week, I just run the script every monday morning, and then the computers run SoB when it does not bother anyone for the coming week.

    I did read the story on David McOwen, I did actually not get permission, but on the other hand people are allowed to use the computers for whatever as long as it is legal and there is nothing illegal in SoB ... or (SoB does also not use wery much bandwidht to my knowledge).

  7. #7
    Sieve it, baby!
    Join Date
    Nov 2002
    Location
    Potsdam, Germany
    Posts
    959
    Not really a lot of bandwidth. But maybe someone complaints about "higher strain for the hardware" or "possible incompatibility issues" or something like that...

    Plus, who knows - maybe we switched over to nuclear simulations a while ago.

  8. #8
    Senior Member Frodo42's Avatar
    Join Date
    Nov 2002
    Location
    Jutland, Denmark
    Posts
    299
    Well I don't think that the owners of the computers would mind that SoB started doing nuclear simulations as a lot of the computers already do that, they are located at the institute of physics in Århus
    But you're right i ought to ask for permission, but I don't want to because I'm pretty sure that they won't support it. If they say that I have to stop using the computers then I'll do it, but unitl then I'll live with the risk
    Last edited by Frodo42; 04-02-2003 at 05:50 AM.

  9. #9
    Junior Member bagleyd's Avatar
    Join Date
    Mar 2003
    Location
    Northern New Jersey - US
    Posts
    9
    I thought of a solution to a similar problem.

    There is a problem I am working on where I need the program to run a long time on a Sun that does not get rebooted. The process id is 561. Also on that machine it has cron disabled.
    I start the controlling script below at 9am:

    sleep 28800
    kill -25 561
    sleep 57600
    kill -23 561
    ... repeat except on friday when
    sleep 28800
    kill -25 561
    sleep 230400
    kill -23 561

    It may be stupid but it does the job.
    Cheers,
    David Bagley

  10. #10
    That requires that the underlying binary honors SIGSTOP and SIGCONT.

    However the sb binary ignores the STOP signal entirely and exits (completey) upon reception of a CONT.

    That's why I'm asking that it please start trapping and heeding signals.

  11. #11
    Senior Member eatmadustch's Avatar
    Join Date
    Nov 2002
    Location
    Switzerland
    Posts
    154
    Originally posted by Ken_g6[TA]
    I could be mistaken, but I believe "MaxRetries 1" in your sclient.conf will implement (mostly) -stop-after-current-proth-test.
    I thought it means that sob will get a new test after the connection failed and it couldn't report. I wouldn't recommend you set this to one, if it really does mean that!
    EatMaDust


    Stop Microsoft turning into Big Brother!
    http://www.againsttcpa.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •