Last active
December 7, 2016 12:18
-
-
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…
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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