# renderstatus.sh # Davis D. Remmel # # Last modified: Fri, Nov. 9, 2012 # # DESCRIPTION # # This script determines if LuxRender nodes are available based on a list of known nodes contained in a text file. # # # USAGE # # Make a text file called "rendernodes.list" using the following format: # # hostname1 # hostname2 # hostnameX # # Then, run the script and wait for an output which can be copied and pasted into Blender's LuxRender network # panel. # # # RESTRICTIONS # # Due to differences in native program flags, this script is meant to be run on a BSD-similar system (tested with # OS X 10.6.8). # # #!/bin/sh FILE="rendernodes.list" # File containing list of known render nodes exec < $FILE # Parse the file line-by-line and ping the node. If no response, move on to next node. LINECOUNT=0 while read line do LINECOUNT=`expr $LINECOUNT + 1`; # Do something ping -o -t 3 "$line" > /dev/null 2>&1 # The ending redirects the output away from console if [ $? -eq 0 ] # Ping returns 0 if node is found then echo -n "$line:18018, " # Echo in format that can be copy and pasted into Blender LuxRender panel fi done echo # Newline