Skip to content

Instantly share code, notes, and snippets.

@prestelpirate
Last active December 7, 2016 12:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prestelpirate/fb6892cea0e8436ba027aed759b76a5a to your computer and use it in GitHub Desktop.
Save prestelpirate/fb6892cea0e8436ba027aed759b76a5a to your computer and use it in GitHub Desktop.
During performance testing on F15k domains, it was required to remove memory from several system boards to gauge relative performance when increasing CPU count, memory, and both together. Rather than physically removing the boards, this script was developed. It uses the Sunfire’s DR to unconfigured memory from selected system boards. The operati…
#!/bin/ksh
# See http://www.gaeltd.com/scripts-and-tools/ for more details
# 2004-06-08 Tom Kranz (tom@siliconbunny.com)
# This script is distributed under the GNU Public License (GPL) with the
# following extra conditions:
# - attritbution must be maintained
# - CD-ROM or similar media for commercial distribution without the prior
# approval of the author
# Unconfigure memory from SBs in a clever script that will impress and amaze
# Use this as the basis for all sorts of automated DR fun!
# Show em what we have
echo ""
echo "Finding memory slots on system boards ......\n"
cfgadm -al -s "select=type(memory)"
# Ask the user what they want to unconfigure
echo ""
echo "Which system boards need their memory disabling?\n"
read BOARDS
# Do the DR magic dance!
for BOARD in $BOARDS
do
echo ""
echo "Disabling memory on system board ${BOARD}::memory !"
echo ""
cfgadm -l ${BOARD}::memory
done
# Exercise for the reader - how do you put the memory back again? :-)
# And I'm spent
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment