Announcement

Collapse
No announcement yet.

script

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • script

    hi all,

    i'am searching for a script wich i can send from my workspace out to the renderfarm, wich gave them the order to shutdown.

    i'am sitting here in one room with the farm, and when the farm is running i could even go to the airport to work under a running turbine.....

    there is a door coming to close the farm, but the carpenter said he must order it and it's coming in 8 weeks so i shutdown the farm as often i can.
    at the moment i'am doing it over vnc to every single mashine, but i'am sure this can do by script.

    any ideas?

    best regards
    Jonas
    Jonas

    www.jonas-balzer.de
    www.shack.de

  • #2
    Well its elementary my dear watson.

    Use the default windows shutdown command

    just make batch file and for each machine you want shutdown add a new line with the appropriate commands and machine name.

    For example:

    shutdown -s -m \\x2 -c "shutting down"

    That will shutdown my remote machine called X2 and display the text shutting down.

    There are many more options which you can get to by running shutdown /? in the command prompt.

    You can get it to restart..etc..pretty handy little program

    Abit more details for those of you not to sure on how to make a batch file.

    First of all open notepad

    And if you simply want to shutdown a machine then enter the following text

    shutdown -s -m \\COMPUTERNAME

    That will shutdown the machine without warning or without any messages.
    Then for each additional machine.. just paste that line again and change the machine name.
    Then save the file and where it says "save as type" change that to all files and then name the file WHATEVER.bat
    Then when you double click the file it will shutdown all the machines listed.
    If you want to edit the file just right click it and choose EDIT

    The other commands are listed below.. like if you want to restart instead of shutdown .. or display a message..etc.


    Code:
            No args                 Display this message (same as -?)
            -i                      Display GUI interface, must be the first option
            -l                      Log off (cannot be used with -m option)
            -s                      Shutdown the computer
            -r                      Shutdown and restart the computer
            -a                      Abort a system shutdown
            -m \\computername       Remote computer to shutdown/restart/abort
            -t xx                   Set timeout for shutdown to xx seconds
            -c "comment"            Shutdown comment (maximum of 127 characters)
            -f                      Forces running applications to close without warning
            -d [u][p]:xx:yy         The reason code for the shutdown
                                    u is the user code
                                    p is a planned shutdown code
                                    xx is the major reason code (positive integer less than 256)
                                    yy is the minor reason code (positive integer less than 65536)

    You can also just shut down or restart a machine just by going into the start menu and choosing run then type in the same as you would put into the batch file. That will do one machine at a time.. so you dont need to make a batch file for a once off.

    Comment


    • #3
      http://www.chaosgroup.com/forum/phpB...light=mikeeee2

      This is is an old thread but I find it useful. It is a gui for pstools that allows you to batch start stop , reboot the servers. The only thing it doesn't do is turn on dormant machines. I hope you find it useful, I sure do.

      Mike

      Comment


      • #4
        interesting... the batch file does nothing except run non-stop. When I try in in the run prompt or the cmd window nothing happens either.
        Architecture Drop-out...

        Comment


        • #5
          Originally posted by DaForce
          Well its elementary my dear watson.
          Nuno de Castro

          www.ene-digital.com
          nuno@ene-digital.com
          00351 917593145

          Comment


          • #6
            Rt3:
            What are you using to get it to run? maybe you have one of the switches/arguments wrong and thats causing it not work.

            Comment


            • #7
              Daforce: tried even the -i and using the GUI but i think its going to end being a permissions issue... On one machine however the "-" was replaced with "/" and that seemed to get it started at least. these are a couple of good resources: http://www.maximumpcguides.com/use-t...rked-computer/
              http://support.microsoft.com/kb/317371
              Architecture Drop-out...

              Comment


              • #8
                Yeah Jonas was having some permission issues "access denied" when I was talking to him on msn last night.

                There are a couple of fixes around. Not sure if they worked for him tho.

                Comment


                • #9
                  ok back again.

                  fist of all, thanks daforce!!!!

                  i havn't figured it out why it wan't work yet, cause looots of work. but will take another look today.
                  will tell if its working or not
                  Jonas

                  www.jonas-balzer.de
                  www.shack.de

                  Comment

                  Working...
                  X