ª r©(8sm_cmd_hdr.vcfsckOptsVerify a File Systemsmit.cat/usr/sbin/fsck -pList All Mounted File Systemssmit.cat/usr/sbin/mountmountOptsMount a File Systemsmit.cat/usr/sbin/mountmountgOptsMount a Group of File Systemssmit.cat/usr/sbin/mountumountgOptsUnmount a Group of File Systemssmit.cat/usr/sbin/umountumountfsOptsUnmount a File Systemsmit.cat/usr/sbin/umountList All File Systemssmit.cat/usr/sbin/lsfsfcrfsCmdOptAdd a Standard Journaled File Systemsmit.catx() { LIST= FLAG=0 for i in "$@" do case "$i" in Megabytes) FLAG=1;; Gigabytes) FLAG=2;; 512bytes) ;; size=*) case "$FLAG" in 1) LIST="$LIST \"$i\"M" FLAG=0;; 2) LIST="$LIST \"$i\"G" FLAG=0;; 0) LIST="$LIST \"$i\"" ;; esac ;; *) LIST="$LIST \"$i\"" ;; esac done eval /usr/sbin/crfs -v jfs $LIST } xccrfsCmdOptAdd a Compressed Journaled File Systemsmit.catx() { LIST= FLAG=0 for i in "$@" do case "$i" in Megabytes) FLAG=1;; Gigabytes) FLAG=2;; 512bytes) ;; size=*) case "$FLAG" in 1) LIST="$LIST \"$i\"M" FLAG=0;; 2) LIST="$LIST \"$i\"G" FLAG=0;; 0) LIST="$LIST \"$i\"" ;; esac ;; *) LIST="$LIST \"$i\"" ;; esac done eval /usr/sbin/crfs -v jfs -a compress=LZ $LIST } xlcrfsCmdOptAdd a Large File Journaled File Systemsmit.catx() { LIST= FLAG=0 for i in "$@" do case "$i" in Megabytes) FLAG=1;; Gigabytes) FLAG=2;; 512bytes) ;; size=*) case "$FLAG" in 1) LIST="$LIST \"$i\"M" FLAG=0;; 2) LIST="$LIST \"$i\"G" FLAG=0;; 0) LIST="$LIST \"$i\"" ;; esac ;; *) LIST="$LIST \"$i\"" ;; esac done eval /usr/sbin/crfs -v jfs -a bf=true $LIST } xjcrfslvCmdOptAdd a Standard Journaled File Systemsmit.cat/usr/sbin/crfs -v jfscjcrfslvCmdOptAdd a Compressed Journaled File Systemsmit.cat/usr/sbin/crfs -v jfs -a compress=LZljcrfslvCmdOptAdd a Large File Enabled Journaled File Systemsmit.cat/usr/sbin/crfs -v jfs -a bf=truejchfsCmdOptChange/Show Characteristics of a Journaled File Systemsmit.catx() { LIST= FLAG=0 for i in "$@" do case "$i" in Megabytes) FLAG=1;; Gigabytes) FLAG=2;; 512bytes) ;; size=) LIST="${LIST%\"-a\"}" ;; size=*) case "$FLAG" in 1) LIST="$LIST \"$i\"M" FLAG=0;; 2) LIST="$LIST \"$i\"G" FLAG=0;; 0) LIST="$LIST \"$i\"" ;; esac ;; *) LIST="$LIST \"$i\"" ;; esac done eval /usr/sbin/chfs $LIST } x/usr/sbin/lsjfs _rawnamejrmfsOptRemove a Journaled File Systemsmit.cat/usr/sbin/rmfscdcrfsOptAdd a CDROM File Systemsmit.cat/usr/sbin/crfs -v cdrfs -p rocdchfsCmdOptChange/Show Characteristics of a CDROM File Systemsmit.cat/usr/sbin/chfs/usr/sbin/lsfs -c _rawnamecdrmfsOptRemove a CDROM File Systemsmit.cat/usr/sbin/rmfsdejfsCmdOptDefragment a Journaled File Systemsmit.cat/usr/sbin/defragfschtz_sysChange Time Zonesmit.cattz_proc() { chtz $1 exit_chtz="$?" if [ $exit_chtz = 0 ] then echo ' ' echo $(dspmsg smit.cat -s 30 9 'Any changes made to the time zone will take effect\\nat the next system boot.') else exit 1 fi } tz_proc /usr/lib/nls/lstz -a _rawnamechtz_user_opts,chtz_commonChange Time Zonesmit.catchtz_proc() { if [ "$2" = ',' -a "$3" = ',' ] then chtz "$1" elif [ "$3" = ',' -a "$4" = ',' ] then chtz "$1$2" elif [ "$4" = ',' -a "$5" = ',' ] then chtz "$1$2$3" elif [ "$5" = ',' -a "$6" = ',' ] then chtz "$1$2$3$4" else chtz "$1$2$3$4$5$6$7$8" fi exit_chtz="$?" if [ $exit_chtz = 0 ] then echo ' ' echo $(dspmsg smit.cat -s 30 9 'Any changes made to the time zone will take effect \\n at the next system boot.') else exit 1 fi } chtz_procdisc_proc() { echo '#STD_ID:STD_OFF:DST_ID:DST_OFF:STRT_DY:STRT_TM:STP_DY:STP_TM' if (echo $TZ | grep -qv "/") || (echo $TZ | cut -d/ -f1 | grep -q "[0-9]") then echo $TZ | /usr/bin/awk '{ str1=""; str2=""; timestr="[-+]{0,1}[0-9]{1,2}:{0,1}[0-9]{0,2}:{0,1}[0-9]{0,2}"; match($0,/[a-zA-Z]*/); #Check for the STANDARD TIME ID if (RLENGTH != -1) { str1 = substr($0,1,RLENGTH); str2 = substr($0,RLENGTH+1); indx=match(str2,timestr); #Check for the STANDARD TIME OFFSET if (indx != 0) { str1 = str1"@"substr(str2,1,RLENGTH); str2 = substr(str2, RLENGTH+1); indx1=match(str2,/[a-zA-Z]*/); #Check for the DAYLIGHT SAVINGS TIME ID if (indx1 != 0) { str1 = str1"@"substr(str2,1,RLENGTH); str2 = substr(str2, RLENGTH+1); #Get Daylight Savings Offset indx2=match(str2,/,/); #If no start,stop specifier, we are done if (indx2 != 0) { str1 = str1"@"substr(str2,1,indx2-1); str2 = substr(str2, indx2+1); #Check for stop specifier indx3=match(str2,/,/); if (indx3 != 0) { #Append start time indx4 = match(str2,/\//); if (indx4==0||indx4>indx3) { str1 = str1"@"substr(str2,1,indx3-1)"@"; str2 = substr(str2, indx3+1); } } } gsub("[,/]","@",str2); } } } str = str1"@"str2; gsub(":","#!:",str); gsub("@",":",str); print str;}' fi } disc_procbackfsOptsBackup a Filesystemsmit.cat/usr/sbin/backupbackfileOptsBackup a File or Directorysmit.catx() { ARGS='' JFSFS='' JFS2FS='' LFLAG=0 while getopts 'b:f:lps:vUZ' OPTION; do case $OPTION in b) cd $OPTARG || exit $? ;; f) DEVICE=$OPTARG ;; l) LFLAG=1 JFSFS='-fstype jfs' JFS2FS='-fstype jfs2' ;; p) ARGS=$ARGS' -p' ;; s) SOURCE=$OPTARG ;; v) ARGS=$ARGS' -v' ;; U) ARGS=$ARGS' -U' ;; Z) ARGS=$ARGS' -Z' ;; esac done if [ $LFLAG = 1 ] then ( /usr/bin/find $SOURCE $JFSFS -print ; /usr/bin/find $SOURCE $JFS2FS -print ) | /usr/sbin/backup -iq -f $DEVICE $ARGS else /usr/bin/find $SOURCE -print | /usr/sbin/backup -iq -f $DEVICE $ARGS fi } xrestfsOptsRestore a Filesystemsmit.catx() { ARGS='' while getopts 'b:d:f:nv' OPTION; do case $OPTION in b) ARGS=$ARGS' -b '$OPTARG ;; d) cd $OPTARG || exit $? ;; f) DEVICE=$OPTARG ;; n) ARGS=$ARGS' -n' ;; v) ARGS=$ARGS' -v' ;; esac done /usr/sbin/restore -rq -f $DEVICE $ARGS } xrestfileOptsRestore a File or Directorysmit.catx() { ARGS='' TARGET='' while getopts 'b:d:f:nt:v' OPTION; do case $OPTION in b) ARGS=$ARGS' -b '$OPTARG ;; d) cd $OPTARG || exit $? ;; f) DEVICE=$OPTARG ;; n) ARGS=$ARGS' -n' ;; t) TARGET=$OPTARG ;; v) ARGS=$ARGS' -v' ;; esac done /usr/sbin/restore -xdq -f $DEVICE $ARGS $TARGET } xlisttocOptsList Contents of a Backupsmit.cat/usr/sbin/restore 2>&1 -TqkillOptsRemove a Processsmit.cat/usr/bin/killShow all Current Processessmit.catps -efShow all Current Processes and Threadssmit.catps -efmo THREADShow Process Statussmit.cat/usr/bin/ps gvnice_oSet Initial Priority of a Processsmit.cat/usr/bin/nicerenice_oAlter the Priority of a Running Processsmit.cat/usr/sbin/renicebindproc_optBind a Process to a Processorsmit.catbindprocessorubindproc_optUnbind a Processsmit.catbindprocessorwallOptsBroadcast Message to all Userssmit.catwalldateOptsChange / Show Day and Timesmit.catdate_proc () # MM dd hh mm ss yy # dialogue param order # 2 3 4 5 6 1 { yy=$1 MM=$2 dd=$3 hh=$4 mm=$5 ss=$6 yy=${yy##*(0)} MM=${MM##*(0)} dd=${dd##*(0)} hh=${hh##*(0)} mm=${mm##*(0)} ss=${ss##*(0)} DATE_STR=`/usr/bin/printf "%02d%02d%02d%02d.%02d%02d" $(($MM)) $(($dd)) $(($hh)) $(($mm)) $(($ss)) $(($yy))` /usr/bin/date "$DATE_STR" } date_proc /usr/bin/echo '#cur_month:cur_day:cur_hour:cur_min:cur_sec:cur_year' /usr/bin/date +%m:%d:%H:%M:%S:%yiconvOptsConvert Flat Filesmit.catx(){ if [ ! -r $5 ] then dspmsg iconv.cat -s 2 1 'Cannot read %s. ' $5 >&2 exit 1 fi if [ -d $5 ] then if [ -f $6 ] then dspmsg iconv.cat -s 2 2 '%s must be a directory. ' $6 >&2 exit 1 fi if [ ! -d $6 ] then mkdir $6 if [ $? -ne 0 ] then dspmsg iconv.cat -s 2 3 'Cannot make directory %s. ' $6 >&2 exit 1 fi fi if [ ! -w $6 ] then dspmsg iconv.cat -s 2 4 'Cannot write to %s. ' $6 >&2 exit 1 fi wd=`pwd` cd $5 ret=1 for i in * do if [ -d $i ] then dspmsg iconv.cat -s 2 5 'The directory %1$s/%2$s was not converted. ' $5 $i >&2 else iconv $1 $2 $3 $4 $i > /tmp/smit.iconv$$ if [ $? -eq 0 ] then cd $wd cp /tmp/smit.iconv$$ $6/$i cd $5 ret=0 else dspmsg iconv.cat -s 2 6 'The file %1$s/%2$s was not converted. ' $5 $i >&2 fi rm -f /tmp/smit.iconv$$ fi done exit $ret else iconv $1 $2 $3 $4 $5 > /tmp/smit.iconv$$ ret=$? if [ $ret -eq 0 ] then if [ ! -d $6 ] then cp /tmp/smit.iconv$$ $6 if [ $? -ne 0 ] then ret=1 fi else cp /tmp/smit.iconv$$ $6/`basename $5` if [ $? -ne 0 ] then ret=1 fi fi else dspmsg -s 44 smit.cat 270 \ 'Error : The codeset conversion from %1$s to %2$s failed. ' $2 $4 >&2 fi rm -f /tmp/smit.iconv$$ exit $ret fi } xcatalog_optConvert System Messagessmit.cat convert_msg_cat() { while getopts a:b:c:d: Option "$@" do case $Option in a) source_msg_cat=$OPTARG;; b) source_locale=$OPTARG;; c) target_msg_cat=$OPTARG;; d) target_locale=$OPTARG;; esac done echo $source_locale | grep -q '\[' if [[ $? -eq 0 ]] then source_locale=`echo $source_locale | cut -f2 -d'[' | cut -c1-5` fi echo $target_locale | grep -q '\[' if [[ $? -eq 0 ]] then target_locale=`echo $target_locale | cut -f2 -d'[' | cut -c1-5` fi if [[ -z $target_locale ]] then first_char=`echo $source_locale | cut -c1-1` rest_of_chars=`echo $source_locale | cut -c2-128` if [ `expr "$first_char" : "[[:lower:]]"` -ne 0 ] then new_first_char=`echo $first_char | tr "[:lower:]" "[:upper:]"` else new_first_char=`echo $first_char | tr "[:upper:]" "[:lower:]"` fi target_locale=${new_first_char}${rest_of_chars} fi if [[ `dirname $source_msg_cat` = '.' ]] then source_msg_cat=/usr/lib/nls/msg/$source_locale/$source_msg_cat fi if [[ -z $target_msg_cat ]] then target_msg_cat=`echo $source_msg_cat | sed "s/$source_locale/$target_locale/g"` fi if [[ `dirname $target_msg_cat` = '.' ]] then target_msg_cat=/usr/lib/nls/msg/$target_locale/$target_msg_cat fi locale -a | grep -xq $source_locale if [[ $? -ne 0 ]] then dspmsg -s 44 smit.cat 250 'Error : The source locale %s is not installed. ' $source_locale dspmsg -s 44 smit.cat 240 'The message catalog %s was not converted. ' $source_msg_cat exit 1 fi locale -a | grep -xq $target_locale if [[ $? -ne 0 ]] then dspmsg -s 44 smit.cat 260 'Error : The target locale %s is not installed. ' $target_locale dspmsg -s 44 smit.cat 240 'The message catalog %s was not converted. ' $source_msg_cat exit 1 fi ## ## Figure out the source and target codesets by generating ## a dummy message catalog in each locale and reading the ## header of thre resulting msg catalog ## echo '$set 1 1 ""' | LC_CTYPE=$source_locale gencat /tmp/.source.cat echo >> /tmp/.source.cat source_codeset=`cut -b9-28 /tmp/.source.cat` rm -f /tmp/.source.cat echo '$set 1 1 ""' | LC_CTYPE=$target_locale gencat /tmp/.target.cat echo >> /tmp/.target.cat target_codeset=`cut -b9-28 /tmp/.target.cat` rm -f /tmp/.target.cat LC_CTYPE=$source_locale dspcat -g $source_msg_cat > /tmp/.working_source.$$ if [[ $? -ne 0 ]] then dspmsg -s 44 smit.cat 240 'The message catalog %s was not converted. ' $source_msg_cat rm -f /tmp/.working_source.$$ exit 1 fi if [[ $source_codeset != $target_codeset ]] then iconv -f $source_codeset -t $target_codeset /tmp/.working_source.$$ > /tmp/.converted_source.$$ if [[ $? -ne 0 ]] then dspmsg -s 44 smit.cat 270 'Error : The codeset conversion from %1$s to %2$s failed. ' $source_codeset $target_codeset dspmsg -s 44 smit.cat 240 'The message catalog %s was not converted. ' $source_msg_cat rm -f /tmp/.working_source.$$ /tmp/.converted_source.$$ exit 1 fi else mv -f /tmp/.working_source.$$ /tmp/.converted_source.$$ fi rm -f $target_msg_cat LC_CTYPE=$target_locale gencat $target_msg_cat /tmp/.converted_source.$$ if [[ $? -ne 0 ]] then dspmsg -s 44 smit.cat 240 'The message catalog %s was not converted. ' $source_msg_cat rm -f /tmp/.converted_source.$$ exit 1 fi echo $target_msg_cat exit 0 } convert_msg_catatOptsSchedule a Jobsmit.catat_proc () # Shell Hour:Minute Month Day, Year Job # dialogue param order # 6 4 5 2 3 1 7 { at $6 $4:$5 $2 $3, $1 </dev/null else /usr/bin/lsallq fi }; is_ext_mklque_optsAdd a Queuesmit.catps_mkpq_attach_user-definedCmdHdrOptAdd a Print Queuesmit.cat/usr/sbin/piomisc_base mkpq_other ps_mkpq_attach_remoteCmdHdrcommonOpt,ps_mkpq_attach_remoteCmdHdrOptAdd a Remote Print Queuesmit.cat/usr/sbin/piomisc_base mkpq_remote_base ps_mkprinterCmdHdrOptsAdd a Queue Device to an Existing Queuesmit.cat/usr/sbin/piomisc_base mkprinter List All Queuessmit.cat/usr/bin/lsallqchqueOptsChange / Show Characteristics of a Queuesmit.cat/usr/bin/chquedisp_info() { MSGFALSE=`/usr/bin/dspmsg smit.cat -s 18 168 FALSE` /usr/bin/lsque -c -q $1 | /usr/bin/awk -F':' '{ if (substr($1,1,1) != "#") { if ($5 == "FALSE") $5 = "'$MSGFALSE'" } printf ("%s:%s:%s:%s:%s:%s:%s:%s:%s\n",$1, $2, $3, $4, $5, $6, $7, $8, $9) }' } disp_infoqueue_name_rmque_optsRemove a Queuesmit.cat/usr/bin/rmque_rmquedev_optsRemove a Queue Devicesmit.cat/usr/bin/rmquedevlsallqdevOptList All Queue Devicessmit.cat/usr/bin/dspmsg -s 18 smit.cat 92 'List of Devices Attached to Queue: '; /usr/bin/lsallqdev -q_mkquedev_optsAdd a Queue Device to an Existing Queuesmit.cat/usr/bin/mkquedevchquedevOptsChange / Show Characteristics of a Queue Devicesmit.cat/usr/bin/chquedevdisp_info() { MSGFALSE=`/usr/bin/dspmsg smit.cat -s 18 168 FALSE` MSGNEVER=`/usr/bin/dspmsg smit.cat -s 18 169 never` /usr/bin/lsquedev -c -q $2 -d $4 | /usr/bin/awk -F':' '{ if (substr($1,1,1) != "#") { if ($2 == "FALSE") $2 = "'$MSGFALSE'" if ($4 == "never") $4 = "'$MSGNEVER'" } printf ("%s:%s:%s:%s:%s:%s:%s:%s\n", $1, $2, $3, $4, $5, $6, $7, $8) }' } disp_info -q queue_name -d queue_deviceqcanOptsCancel a Print Jobsmit.cat/usr/bin/enq qchkOptsShow the Status of Print Jobssmit.cat/usr/sbin/piomisc_base get_job_statusfunction default_queue { default=${LPDEST:-$PRINTER} print "#default_queue" print "${default:-$(/usr/bin/lsallq | /usr/bin/head -1)}" }; default_queueqdefaultOptSet System's Default Print Queuesmit.cat/usr/lib/lpd/pio/etc/piochdfq -q qhldOptsHold / Release Print Jobssmit.cat/usr/bin/enqqmovOptsMove a Job Between Print Queuessmit.cat/usr/bin/enq_qpri_printjobPrioritize a Print Jobsmit.catunset LPDEST PRINTER; /usr/bin/enq ps_qprt_common1Opt,ps_qprt_common2Opt,ps_qprt_common3Opt,ps_qprt_common4Opt,ps_qprt_genericCmdHdrOptStart a Print Jobsmit.cat/usr/bin/enqfunction x { if [ -z "$2" ] then print '#input_queue' print $1 else print '#input_queue' print $1#!:$2 fi }; xqueue_name queue_deviceps_qstartCmdHdrOptStart a Print Queuesmit.cat/usr/bin/enq -U -Pfunction x { print '#cmdhdr_queue' print $1#!:$2 }; xqueue_name queue_deviceps_qstartCmdHdrOptStop a Print Queuesmit.cat/usr/bin/enq -D -Pfunction x { print '#cmdhdr_queue' print $1#!:$2 }; xqueue_name queue_deviceps_qstatusOptsShow Status of Print Queuessmit.catfunction queue_status { /usr/bin/enq -e "$@" | /usr/bin/awk ' $1 ~ /:$/ { print $0; next } { if (substr($0,1,7) != " ") print substr($0,1,24); }' }; queue_statusps_rmpq_genericCmdHdrOptRemove a Queuesmit.cat/usr/sbin/piomisc_base rmpq_generic function x { print '#remove_queue' print $1#!:$2 }; xqueue_name queue_deviceShow Status of the Print Server Subsystemsmit.cat/usr/bin/lssrc -s lpdrmitabOptsStop the Print Server Subsystemsmit.cat/usr/sbin/piomisc_base server_stop_when mkitabOptsStart the Print Server Subsystemsmit.cat/usr/sbin/piomisc_base server_start_when /usr/bin/ruser -sP; if [[ $? -eq 1 ]] then /usr/bin/dspmsg -s 18 smit.cat 145 'There are no clients with print access.' fi _mkhostslpdAdd Print Access for a Remote Clientsmit.cat/usr/bin/ruser _rmhostslpdRemove Print Access for a Remote Clientsmit.cat/usr/bin/ruser chprtsubsystem1Change / Show Current Print Subsystemsmit.cat/usr/sbin/switch.prt -s /usr/sbin/switch.prt -drun_script_optsRun Scriptsmit.cat/usr/bin/chquesend_mail_recovery_optsSend Mailsmit.cat/usr/bin/chqueretry_recovery_optsRetrysmit.catx() { for i in "$@" do args="$args \"$i\"" done eval /usr/bin/chque $args } xList All Subsystemssmit.catlssrc -asubsys.pid.optQuery a Subsystemsmit.catlssrc -lsubsys.name.optStart a Subsystemsmit.catstartsrcgetparam() { if [ $1 = sendmail ]; then subsysparam='-bd -q30m' fi echo '#subsysname:subsysparam'; echo $1:$subsysparam; }; getparam_rawnamesubsys.pid.opt,stopssys.optStop a Subsystemsmit.catstopsrcstopssys.optStop All Subsystemssmit.catstopsrc -asubsys.pid.optRefresh a Subsystemsmit.catrefreshsubsys.pid.opt,start.trace.optStart Tracesmit.cattracesonsubsys.pid.optStop Tracesmit.cattracesoffsubsvr.name.opt,pid.subsys.opt,query.type.optQuery a Subserversmit.catlssrcsubsvr.name.opt,pid.subsys.optStart a Subserversmit.catstartsrcsubsvr.name.opt,pid.subsys.opt,stopserver.optStop a Subserversmit.catstopsrcsubsvr.name.opt,pid.subsys.opt,start.trace.optStart Tracesmit.cattracesonsubsvr.name.opt,pid.subsys.optStop Tracesmit.cattracesoffunameOptsShow System Levelsmit.catunameinstalled_license_opt,common_licenseShow Installed License Agreementssmit.catx(){ /usr/sbin/inulag -l $@ | fold -s } xlicense_on_mediaShow License Agreements on Installation Mediasmit.cat/usr/sbin/installp -Elecho "#"accept_license_optAccept License Agreementssmit.catx() { ERROR=`dspmsg smit.cat -s 1 668 "Failure to accept the license agreement terms will prevent the use of this system. "` yes=`dspmsg smit.cat -s 30 18 "yes"` PRESSENTER=`dspmsg smit.cat -s 8 18 "Press Enter to continue."` if [ $1 = $yes ] then /usr/sbin/inulag -A else echo "$ERROR" echo "$PRESSENTER" read -r RC=-1 fi exit $RC } xinstalled_license_r,common_license,common_opts_rShow Installed License Agreementssmit.catx(){ /usr/sbin/inulag -l $@ | fold -s } xswma_view_optView Software Maintenance Agreementssmit.catx() { # Get the value of LC_MESSAGES, taking into account LANG, LC_ALL & LC_MESSAGES: MESSAGES=`locale|awk -F='/LC_MESSAGES/{gsub(",,$2); print $2}'` if [ ! -f /usr/swlag/${MESSAGES}/swma.la ] then MESSAGES=en_US fi cat /usr/swlag/${MESSAGES}/swma.la } xswma_accept_license_optAccept Software Maintenance Terms and Conditionssmit.catx() { yes=`dspmsg smit.cat -s 30 18 "yes"` if [ $1 = $yes ] then /usr/lib/instl/swma_create -accept else /usr/lib/instl/swma_create -decline fi } xfcrfs2CmdOptAdd an Enhanced Journaled File Systemsmit.catx() { LIST= FLAG=0 for i in "$@" do case "$i" in Megabytes) FLAG=1;; Gigabytes) FLAG=2;; 512bytes) ;; quota=all) LIST="$LIST \"quota=userquota,groupquota\"" ;; size=*) case "$FLAG" in 1) LIST="$LIST \"$i\"M" FLAG=0;; 2) LIST="$LIST \"$i\"G" FLAG=0;; 0) LIST="$LIST \"$i\"" ;; esac ;; *) LIST="$LIST \"$i\"" ;; esac done eval /usr/sbin/crfs -v jfs2 $LIST } xjcrfs2lvCmdOptAdd an Enhanced Journaled File Systemsmit.catx() { LIST= FLAG=0 for i in "$@" do case "$i" in quota=all) LIST="$LIST \"quota=userquota,groupquota\"" ;; *) LIST="$LIST \"$i\"" ;; esac done eval /usr/sbin/crfs -v jfs2 $LIST } xjchfs2CmdOptChange/Show Characteristics of an Enhanced Journaled File Systemsmit.catx() { LIST= FLAG=0 for i in "$@" do case "$i" in Megabytes) FLAG=1;; Gigabytes) FLAG=2;; 512bytes) FLAG=0;; quota=all) LIST="$LIST \"quota=userquota,groupquota\"" ;; quota=no) LIST="${LIST%\"-a\"} -d quota" ;; size=) LIST="${LIST%\"-a\"}" ;; size=*) case "$FLAG" in 1) LIST="$LIST \"$i\"M" FLAG=0;; 2) LIST="$LIST \"$i\"G" FLAG=0;; 0) LIST="$LIST \"$i\"" ;; esac ;; *) LIST="$LIST \"$i\"" ;; esac done eval /usr/sbin/chfs $LIST } xmassage() { /usr/sbin/lsjfs2 $1 | sed -e 's/userquota,groupquota/all/' } massage _rawnamejrmfs2OptRemove an Enhanced Journaled File Systemsmit.cat/usr/sbin/rmfsdejfs2CmdOptDefragment an Enhanced Journaled File Systemsmit.cat/usr/sbin/defragfsfcrintsnapj2CmdOptCreate Snapshot for an Enhanced Journaled File System in File Systemsmit.cat/usr/sbin/snapshotfcrsnapj2CmdOptCreate Snapshot for an Enhanced Journaled File System in New Logical Volumesmit.catx() { LIST= FLAG=0 for i in "$@" do case "$i" in Megabytes) FLAG=1;; Gigabytes) FLAG=2;; 512bytes) ;; size=*) case "$FLAG" in 1) LIST="$LIST \"$i\"M" FLAG=0;; 2) LIST="$LIST \"$i\"G" FLAG=0;; 0) LIST="$LIST \"$i\"" ;; esac ;; *) LIST="$LIST \"$i\"" ;; esac done eval /usr/sbin/snapshot $LIST } xjcrsnapj2lvCmdOptCreate Snapshot for an Enhanced Journaled File Systemsmit.cat/usr/sbin/snapshotjlssnapCmdOptList Snapshots for an Enhanced Journaled File Systemsmit.cat/usr/sbin/snapshot -q jchsnapCmdOptChange Snapshot for an Enhanced Journaled File Systemsmit.catx() { LIST= FLAG=0 for i in "$@" do case "$i" in Megabytes) FLAG=1;; Gigabytes) FLAG=2;; 512bytes) FLAG=0;; size=*) case "$FLAG" in 1) LIST="$LIST \"$i\"M" FLAG=0;; 2) LIST="$LIST \"$i\"G" FLAG=0;; 0) LIST="$LIST \"$i\"" ;; esac ;; *) LIST="$LIST \"$i\"" ;; esac done eval /usr/sbin/snapshot $LIST } x/usr/sbin/snapshot -c':' -q _rawnamejrbackintsnapCmdOptsRollback an Enhanced Journaled File System to an Internal Snapshotsmit.cat/usr/sbin/rollback jrbackextsnapCmdOptsRollback an Enhanced Journaled File System to an External Snapshotsmit.cat/usr/sbin/rollback intbacksnapnmOptsCreate and back up a snapshotsmit.cat/usr/sbin/backsnap -iq backsnapnmOptsCreate and back up a snapshotsmit.catx() { LIST= FLAG=0 for i in "$@" do case "$i" in Megabytes) FLAG=1;; Gigabytes) FLAG=2;; 512bytes) ;; size=*) case "$FLAG" in 1) LIST="$LIST \"$i\"M" FLAG=0;; 2) LIST="$LIST \"$i\"G" FLAG=0;; 0) LIST="$LIST \"$i\"" ;; esac ;; *) LIST="$LIST \"$i\"" ;; esac done eval /usr/sbin/backsnap -iq $LIST } xmntsnapOptsMount Snapshot for an Enhanced Journaled File Systemsmit.catx() { FLAGS= MNT= CRMNT= for i in "$@" do case "$i" in -CRMNT) CRMNT=1 ;; MNT=*) MNT="`echo $i | cut -c 5-`" if [ $CRMNT -a ! -e "$MNT" ] then mkdir -p "$MNT" || return 1 fi ;; *) FLAGS="$FLAGS \"$i\"" ;; esac done eval mount -v jfs2 -o snapshot $FLAGS $MNT } xjrmintsnapOptRemove Internal Snapshot of an Enhanced Journaled File Systemsmit.cat/usr/sbin/snapshot -djrmextsnapOptRemove External Snapshot of an Enhanced Journaled File Systemsmit.cat/usr/sbin/snapshot -dunmntsnapOptsUnmount Snapshot for an Enhanced Journaled File Systemsmit.cat/usr/sbin/umountintbacksnapsysOptsCreate and back up a snapshot by inodesmit.cat/usr/sbin/backsnap backsnapsysOptsCreate and back up a snapshot by inodesmit.catx() { LIST= FLAG=0 for i in "$@" do case "$i" in Megabytes) FLAG=1;; Gigabytes) FLAG=2;; 512bytes) ;; size=*) case "$FLAG" in 1) LIST="$LIST \"$i\"M" FLAG=0;; 2) LIST="$LIST \"$i\"G" FLAG=0;; 0) LIST="$LIST \"$i\"" ;; esac ;; *) LIST="$LIST \"$i\"" ;; esac done eval /usr/sbin/backsnap $LIST } xj2enablequotasOptsEnable / Disable Quota Managementsmit.catx() { LIST= for i in "$@" do case "$i" in quota=all) LIST="$LIST \"quota=userquota,groupquota\"" ;; quota=no) LIST="${LIST%\"-a\"} -d quota" ;; *) LIST="$LIST \"$i\"" ;; esac done eval /usr/sbin/chfs $LIST } xmassage() { /usr/sbin/lsjfs2 $1 | sed -e 's/quota//g' -e 's/user,group/all/' } massage _rawnamej2enforcequotasOptsStop / Restart Quota Limits Enforcementsmit.catx() { LIST= for i in "$@" do case "$i" in quota*) LIST=$i" $LIST" ;; *) LIST="$LIST "$i ;; esac done eval $LIST } xj2repquotaOptsList Quota Usagesmit.catrepquotaj2quotacheckOptsRecalculate Current Disk Block and File Usage Statisticssmit.catquotacheckj2addlimitOptsAdd a Limits Classsmit.catx() { CMD= OPT= REST= for i in "$@" do case "$i" in -[bf]?) OPT=$i ;; -[KGM]) AU=${i##-} ;; *) case "$OPT" in -bs) BS="$i" ;; -bh) BH="$i" ;; -bg) BG="$i" ;; -bu) BU="$i" ;; -fs) FS="$i" ;; -fh) FH="$i" ;; -fg) FG="$i" ;; -fu) FU="$i" ;; *) REST="$REST $i" ;; esac OPT= ;; esac done RCD="$BS$AU $BH$AU $FS $FH $BG$BU $FG$FU" ACTION=",d\na\n+ $RCD\n.\nw\nq\n" CMD="echo \"$ACTION\" | EDITOR=/usr/bin/ed j2edlimit -e $REST" eval "$CMD" | awk 'NR > 2 {print $0}' } xj2changelimitOptsChange / Show Characteristics of a Limits Classsmit.catx() { CMD= OPT= REST= for i in "$@" do case "$i" in -lcid) OPT=$i ;; -[bf]?) OPT=$i ;; -[KGM]) AU=${i##-} ;; *) case "$OPT" in -bs) BS="$i" ;; -bh) BH="$i" ;; -bg) BG="$i" ;; -bu) BU="$i" ;; -fs) FS="$i" ;; -fh) FH="$i" ;; -fg) FG="$i" ;; -fu) FU="$i" ;; -lcid) LCID="$i" ;; *) REST="$REST $i" ;; esac OPT= ;; esac done RCD="$LCID $BS$AU $BH$AU $FS $FH $BG$BU $FG$FU" ACTION=",d\na\n$RCD\n.\nw\nq\n" CMD="echo \"$ACTION\" | EDITOR=/usr/bin/ed j2edlimit -e $REST" eval "$CMD" | awk 'NR > 2 {print $0}' } xj2edlimit -c _rawlcid _rawtype _rawfsnamej2defaultlimitOptsMake a Limits Class the Default Limits for a File Systemsmit.catj2edlimitj2assignlimitOpts,j2assignlimitOpts-uAssign a User to a Limits Classsmit.catj2edlimitj2assignlimitOpts,j2assignlimitOpts-gAssign a Group to a Limits Classsmit.catj2edlimitj2listlimitsOptsList Limits Classes for a File Systemsmit.catj2edlimit -lj2removelimitOptsRemove a Limits Classsmit.catx() { CMD= OPT= REST= for i in "$@" do case "$i" in -[gu]?) TYPE=$i ;; -lcid) OPT=$i ;; *) case "$OPT" in -lcid) LCID="$i" ;; *) REST="$REST $i" ;; esac OPT= ;; esac done RCD="$LCID 0 0 0 0 0 0" ACTION=",d\na\n-$RCD\n.\nw\nq\n" CMD="echo \"$ACTION\" | EDITOR=/usr/bin/ed j2edlimit $TYPE $REST" eval "$CMD" >/dev/null && j2edlimit -l $TYPE $REST } xcfgmgr_dialogInstall/Configure Devices Added After IPLsmit.catrun_cfgmgr() { MSG=`/usr/bin/dspmsg smit.cat -s 27 23 'none'` if [[ "x$1" = x"" || "x$1" = x$MSG ]] then cfgmgr exit $? else cfgmgr -i $1 exit $? fi } run_cfgmgrx() { echo "#none_value" echo $(/usr/bin/dspmsg smit.cat -s 27 23 'none') } xList All Supported Devicessmit.catlsdev -P | sort -d -fList All Defined Devicessmit.catlsdev -C | sort -d -flsattrs_hdr_optShow Characteristics of a Supported Devicesmit.catxx() { lsdev -P -c $1 -t $2 -s $3 -F'description' echo ' ' lsattr -D -c $1 -t $2 -s $3 -F'description deflt' } xxlsattrd_hdr_optShow Characteristics of a Defined Devicesmit.catxx() { lsdev -C -l $1 -F 'name description status location' echo ' ' lsattr -E -l $1 -F'description value' } xxdevcfg_ucfg_optUnconfigure a Devicesmit.catrmdevdevcfg_cfg_optConfigure a Defined Devicesmit.catmkdevList All Defined TTYssmit.catlsdev -C -c tty -Htty_add,tty_common,tty_rsdd,tty_nrsddAdd a TTYsmit.catmkdev -c tty attribs () { l1=$( lsattr -c tty -s $1 -t $2 -D -O ) l11=$( echo "$l1" | head -1 ) l12=$( echo "$l1" | tail -1 ) l2=$( lsattr -l $3 -D -O ) l21=$( echo "$l2" | head -1 | sed -e 's/.//' ) l22=$( echo "$l2" | tail -1 ) echo "$l11:$l21" echo "$l12:$l22" } attribs subclass type parenttty_add,tty_common,tty_rsddAdd a TTYsmit.catmkdev -c tty attribs () { l1=$( lsattr -c tty -s $1 -t $2 -D -O ) l11=$( echo "$l1" | head -1 ) l12=$( echo "$l1" | tail -1 ) l2=$( lsattr -l $3 -D -O ) l21=$( echo "$l2" | head -1 | sed -e 's/.//' ) l22=$( echo "$l2" | tail -1 ) echo "$l11:$l21" echo "$l12:$l22" } attribs subclass type parenttty_add,tty_common,tty_lionddAdd a TTYsmit.catmkdev -c tty attribs () { l1=$( lsattr -c tty -s $1 -t $2 -D -O ) l11=$( echo "$l1" | head -1 ) l12=$( echo "$l1" | tail -1 ) l2=$( lsattr -l $3 -D -O | sed -e 's/\\/\\\\\\\\/g' ) l21=$( echo "$l2" | head -1 | sed -e 's/.//' ) l22=$( echo "$l2" | tail -1 ) echo "$l11:$l21" echo "$l12:$l22" } attribs subclass type parenttty_mvMove a TTY to Another Portsmit.catchdev tty_chg,tty_common,tty_rsdd,tty_nrsddChange/Show Characteristics of a TTYsmit.catchdev lsattr -l logicname -E -Otty_chg,tty_common,tty_rsddChange/Show Characteristics of a TTYsmit.catchdev lsattr -l logicname -E -Otty_chg,tty_common,tty_lionddChange/Show Characteristics of a TTYsmit.catchdev lsattr -l logicname -E -Ormvtty_optRemove a TTYsmit.catrmdev cfgtty_optConfigure a Defined TTY smit.catmkdev rrbtty_manage_optManage Remote Reboot Facilitysmit.catchdevlsattr -l logicname -E -Ompiopath_list_all_optList/Export All Pathssmit.catxx() { FOPT1="status name path_id parent connection" FOPT2="status:name:path_id:parent:connection" if [[ $1 = "All" ]] then PSTATE="" else PSTATE="-s $1" fi if [[ $# = 3 ]] then if [[ $2 = "parent" ]] then lspath -F "$FOPT2" $PSTATE | sort +3b >$3 elif [[ $2 = "status" ]] then lspath -F "$FOPT2" $PSTATE | sort >$3 else lspath -F "$FOPT2" $PSTATE >$3 fi else if [[ $2 = "parent" ]] then lspath -F "$FOPT1" $PSTATE | sort -b -k 4,4 -k 2,3 elif [[ $2 = "status" ]] then lspath -F "$FOPT1" $PSTATE | sort -b -k 1,1 -k 2,3 else lspath -F "$FOPT1" $PSTATE | sort +1 -b -k 2,3 fi fi } xxmpiopath_list_dev_optList All Paths for a Devicesmit.cat xx(){ lspath -l $1 -F'status name path_id parent connection' | sort -b -k3,3 }; xxmpiopath_list_par_optList All Paths under a Parentsmit.cat xx(){ lspath -p $1 -F'status name path_id parent connection' | sort -b -k 2,3 }; xxmpiopath_enable_all_optEnable Selected or All Pathssmit.caten_path() { paths=$1 set -- $1 all=`dspmsg -s 27 smit.cat 1049 'All Paths'|cut -d' ' -f1` if [[ $1 = $all ]] then paths=`lspath -s dis -F 'status name path_id parent connection';lspath -s fai -F 'status name path_id parent connection'` fi set -- $paths while [[ $# != 0 ]] do chpath -s ena -l $2 -p $4 -w $5 shift shift shift shift shift done } en_pathecho "#path";dspmsg -s 27 smit.cat 1049 'All Paths'mpiopath_enable_dev_opt2Enable Paths for a Devicesmit.caten_path() { dev=$1 paths=$2 set -- $2 all=`dspmsg -s 27 smit.cat 1049 'All Paths'|cut -d' ' -f1` if [[ $1 = $all ]] then paths=`lspath -l $dev -s dis -F 'status name path_id parent connection';lspath -l $dev -s fai -F 'status name path_id parent connection'` fi set -- $paths while [[ $# != 0 ]] do chpath -s ena -l $2 -p $4 -w $5 shift shift shift shift shift done } en_pathecho "#path";dspmsg -s 27 smit.cat 1049 'All Paths'mpiopath_enable_par_opt2Enable Paths under a Parentsmit.caten_path() { parent=$1 paths=$2 set -- $2 all=`dspmsg -s 27 smit.cat 1049 'All Paths'|cut -d' ' -f1` if [[ $1 = $all ]] then paths=`lspath -p $parent -s dis -F 'status name path_id parent connection';lspath -p $parent -s fai -F 'status name path_id parent connection'` fi set -- $paths while [[ $# != 0 ]] do chpath -s ena -l $2 -p $4 -w $5 shift shift shift shift shift done } en_pathecho "#path";dspmsg -s 27 smit.cat 1049 'All Paths'mpiopath_cfg_all_optConfigure Selected or All Pathssmit.catmk_path() { paths=$1 set -- $1 all=`dspmsg -s 27 smit.cat 1049 'All Paths'|cut -d' ' -f1` if [[ $1 = $all ]] then paths=`lspath -s def -F 'name parent connection'` fi set -- $paths while [[ $# != 0 ]] do mkpath -l $1 -p $2 -w $3 shift shift shift done } mk_pathecho "#path";dspmsg -s 27 smit.cat 1049 'All Paths'mpiopath_cfg_dev_opt2Configure Paths for a Devicesmit.catmk_path() { dev=$1 paths=$2 set -- $2 all=`dspmsg -s 27 smit.cat 1049 'All Paths'|cut -d' ' -f1` if [[ $1 = $all ]] then paths=`lspath -l $dev -s def -F 'name parent connection'` fi set -- $paths while [[ $# != 0 ]] do mkpath -l $1 -p $2 -w $3 shift shift shift done } mk_pathecho "#path";dspmsg -s 27 smit.cat 1049 'All Paths'mpiopath_cfg_par_opt2Configure Paths under a Parentsmit.catmk_path() { parent=$1 paths=$2 set -- $2 all=`dspmsg -s 27 smit.cat 1049 'All Paths'|cut -d' ' -f1` if [[ $1 = $all ]] then paths=`lspath -p $parent -s def -F 'name parent connection'` fi set -- $paths while [[ $# != 0 ]] do mkpath -l $1 -p $2 -w $3 shift shift shift done } mk_pathecho "#path";dspmsg -s 27 smit.cat 1049 'All Paths'mpiopath_add_optAdd a Pathsmit.catmk_path() { if [[ $1 = "y" ]] then cfgmgr else if [[ $# = 4 ]] then mkpath -d -l $2 -p $3 -w $4 fi fi } mk_pathmpiopath_disable_all_optDisable Selected or All Pathssmit.catdis_path() { paths=$1 set -- $1 all=`dspmsg -s 27 smit.cat 1049 'All Paths'|cut -d' ' -f1` if [[ $1 = $all ]] then paths=`lspath -s ena -F 'status name path_id parent connection' ; lspath -s fai -F 'status name path_id parent connection'` fi set -- $paths while [[ $# != 0 ]] do chpath -s dis -l $2 -p $4 -w $5 shift shift shift shift shift done } dis_pathecho "#path";dspmsg -s 27 smit.cat 1049 'All Paths'mpiopath_disable_dev_opt2Disable Paths for a Devicesmit.catdis_path() { dev=$1 paths=$2 set -- $2 all=`dspmsg -s 27 smit.cat 1049 'All Paths'|cut -d' ' -f1` if [[ $1 = $all ]] then paths=`lspath -l $dev -s ena -F 'status name path_id parent connection'; lspath -l $dev -s fai -F 'status name path_id parent connection'` fi set -- $paths while [[ $# != 0 ]] do chpath -s dis -l $2 -p $4 -w $5 shift shift shift shift shift done } dis_pathecho "#path";dspmsg -s 27 smit.cat 1049 'All Paths'mpiopath_disable_par_opt2Disable Paths under a Parentsmit.catdis_path() { parent=$1 paths=$2 set -- $2 all=`dspmsg -s 27 smit.cat 1049 'All Paths'|cut -d' ' -f1` if [[ $1 = $all ]] then paths=`lspath -p $parent -s ena -F 'status name path_id parent connection'; lspath -p $parent -s fai -F 'status name path_id parent connection'` fi set -- $paths while [[ $# != 0 ]] do chpath -s dis -l $2 -p $4 -w $5 shift shift shift shift shift done } dis_pathecho "#path";dspmsg -s 27 smit.cat 1049 'All Paths'mpiopath_remove_path_optRemove a Pathsmit.catrm_path() { if [[ $2 = n ]] then delete=-d else delete= fi set -- $1 rmpath -l $2 -p $4 -w $5 $delete } rm_pathmpiopath_remove_dev_opt2Remove a Path for a Devicesmit.catrm_path() { if [[ $2 = n ]] then delete=-d else delete= fi set -- $1 rmpath -l $2 -p $4 -w $5 $delete } rm_pathmpiopath_remove_par_opt2Remove Paths under a Parentsmit.catrm_path() { parent=$1 paths=$2 if [[ $3 = n ]] then delete=-d else delete= fi set -- $2 all=`dspmsg -s 27 smit.cat 1049 'All Paths'|cut -d' ' -f1` if [[ $1 = $all ]] then paths=`lspath -p $parent -F 'status name path_id parent connection'` fi set -- $paths while [[ $# != 0 ]] do rmpath -l $2 -p $4 -w $5 $delete shift shift shift shift shift done } rm_pathecho "#path";dspmsg -s 27 smit.cat 1049 'All Paths'List All MPIO Devicessmit.catxx() { devs=`lspath -r name` for i in $devs do lsdev -C -l $i done } xxmpiodev_list_dev_optList MPIO Devices under a Parentsmit.catxx() { devs=`lspath -p $1 -r name` for i in $devs do lsdev -C -l $i done } xxmpiodev_list_par_optList Parents for an MPIO Devicesmit.catxx() { devs=`lspath -l $1 -r parent` for i in $devs do lsdev -C -l $i done } xxmpio_devname2_optConfigure an MPIO Devicesmit.catmkdevmpiodev_rem_optRemove an MPIO Devicesmit.catrmdevList All Parents for All MPIO Devicessmit.catxx() { devs=`lspath -r parent` for i in $devs do lsdev -C -l $i done } xxdevrsrv_query_optQuery Reservation Statussmit.catODMDIR=/etc/objrepos devrsrv -c query -l $1devrsrv_query_pr_optQuery Persistent Reservation Valuessmit.catODMDIR=/etc/objrepos devrsrv -c prin -s 1 -l $1devrsrv_release_optRelease a single path or persistent reservationsmit.catODMDIR=/etc/objrepos devrsrv -f -n -l $1List PCI Hot Plug Slotssmit.catlsslot -c pcirepdrpci_hdr_optReplace/Remove a PCI Hot Plug Adaptersmit.catdrslot -c pci iddrpci_hdr_optIdentify a PCI Hot Plug Slotsmit.catdrslot -c pci -i adddrpci_hdr_optAdd a PCI Hot Plug Adaptersmit.catdrslot -c pci -a _cmdlvmchlvChange a Logical Volumesmit.cat/usr/sbin/chlvlvdisc () { Sched='p'; Perm='r'; BadBlk='n'; Verify='n'; MirrWC='n'; OverlapIO='n'; InfiniteRetry='n'; if test $1 -eq 1 then Sched='s' fi if test $1 -eq 4 then Sched='ps' fi if test $1 -eq 8 then Sched='pr' fi if test $2 -eq 1 then Perm='w' fi if test $3 -eq 1 then BadBlk='y' fi if test $4 -eq 1 then Verify='y' fi if test $5 -eq 1 then MirrWC='y' elif test $5 -eq 3 then MirrWC='p' fi if test $6 -eq 1 then OverlapIO='y' fi if test $7 -eq 1 then InfiniteRetry='y' fi echo '#:::::::::Sched:Permissions:BadBlk:Verify:MirrWC:OverlapIO:InfiniteRetry'; echo ':::::::::'$Sched':'$Perm':'$BadBlk':'$Verify':'$MirrWC':'$OverlapIO':'$InfiniteRetry; }; lvdiscSched Permissions BadBlk Verify MirrWC OverlapIO InfiniteRetry_cmdlvmrenamelvRename a Logical Volumesmit.cat/usr/sbin/chlv_cmdlvmchpvChange Characteristics of a Physical Volumesmit.cat/usr/sbin/chpv_rawname_cmdlvmchvgChange a Volume Groupsmit.cat/usr/sbin/chvgvgdisc () { echo '#VGName:Auto-On:quorum:chg_to_conc_capable'; AutoOn=`/usr/sbin/getlvodm -u $1`; quorum=`/usr/sbin/getlvodm -Q $1`; Q1=`/usr/sbin/getlvodm -X $1`; if [[ $Q1 = 'y' ]] then conc='-C'; else conc='-l'; fi echo $1:$AutoOn:$quorum:$conc; }; vgdisc_rawname_cmdlvmcplvpreCopy over an existing logical volumesmit.cat/usr/sbin/cplv_cmdlvmcplvuserCopy to a user created logical volumesmit.cat/usr/sbin/cplv_cmdlvmcplvsysCopy to a system created logical volumesmit.cat/usr/sbin/cplv_cmdlvmexportvgExport a Volume Groupsmit.cat/usr/sbin/exportvg_cmdlvmextendlvIncrease the Size of a Logical Volumesmit.cat/usr/sbin/extendlv_cmdlvmextendvgAdd a Physical Volume to a Volume Groupsmit.cat/usr/sbin/extendvg_cmdlvmimportvgImport a Volume Groupsmit.cat/usr/sbin/importvg_cmdlvmlslvShow Characteristics of a Logical Volumesmit.cat/usr/sbin/lslv_rawnameList All Logical Volumes by Volume Groupsmit.cat/usr/sbin/lsvg -o|/usr/sbin/lsvg -i -l_cmdlvmlspvList Contents of a Physical Volumesmit.cat/usr/sbin/lspv_rawnamesmit.cat/usr/sbin/lspv | /usr/bin/awk '{print $1}'_cmdlvmlsvgList Contents of a Volume Groupsmit.cat/usr/sbin/lsvg_rawname_cmdlvmlsvg2List All Volume Groupssmit.cat/usr/sbin/lsvg_cmdlvmmigratepvMove Contents of a Physical Volumesmit.cat/usr/sbin/migratepv_cmdlvmmklvAdd a Logical Volumesmit.cat/usr/sbin/mklv_cmdlvmmklvcopyAdd Copies to a Logical Volumesmit.cat/usr/sbin/mklvcopy_rawname_cmdlvmmkvg,_cmdlvmmkovgAdd an Original Volume Groupsmit.catx(){ ARGS='' ARGS=`echo $* | sed 's/-sDEFAULT//g'` /usr/sbin/mkvg $ARGS } x_cmdlvmmkvg,_cmdlvmmkovgAdd a Big Volume Groupsmit.catx(){ ARGS='' ARGS=`echo $* | sed 's/-sDEFAULT//g'` /usr/sbin/mkvg -B $ARGS } x_cmdlvmmkvg,_cmdlvmmksvgAdd a Scalable Volume Groupsmit.catx(){ ARGS='' ARGS=`echo $* | sed 's/-sDEFAULT//g'` /usr/sbin/mkvg -S $ARGS } x_cmdlvmreducevgRemove a Physical Volume from a Volume Groupsmit.cat/usr/sbin/reducevg_cmdlvmrmvgRemove a Volume Groupsmit.cat/usr/sbin/reducevg -df_cmdlvmreorgvgReorganize a Volume Groupsmit.cat/usr/sbin/reorgvg_cmdlvmrmlvRemove a Logical Volumesmit.cat/usr/sbin/rmlv -f_cmdlvmrmlvcopyRemove Copies from a Logical Volumesmit.cat/usr/sbin/rmlvcopy_cmdlvmvaryoffvgDeactivate a Volume Groupsmit.cat/usr/sbin/varyoffvg_cmdlvmvaryonvgActivate a Volume Groupsmit.cat/usr/sbin/varyonvg_cmdlvmmirrorvgMirror a Volume Groupsmit.cat/usr/sbin/mirrorvg_cmdlvmunmirrorvgUnmirror a Volume Groupsmit.cat/usr/sbin/unmirrorvg_cmdlvmsyncvg_vgSynchronize by Volume Groupsmit.cat/usr/sbin/syncvg -v_cmdlvmsyncvg_lvSynchronize by Logical Volumesmit.cat/usr/sbin/syncvg -l_cmdlvmsyncvg_pvSynchronize by Physical Volumesmit.cat/usr/sbin/syncvg -pList All Defined Printers/Plotterssmit.catlsdev -C -c printer | sort -uList All Supported Printers/Plotterssmit.catlsdev -P -c printer -F "type subclass description" | sort -uprt_add,prt_common,prt_serial,prt_serial_rsddAdd a Printer/Plottersmit.catmkdev -c printer lsattr -c printer-s subclass -t type -D -Oprt_add,prt_common,prt_serial,prt_serial_lionddAdd a Printer/Plottersmit.catmkdev -c printer lsattr -c printer-s subclass -t type -D -Oprt_add,prt_common,prt_serial,prt_serial_cxmaddAdd a Printer/Plottersmit.catmkdev -c printer lsattr -c printer-s subclass -t type -D -Oprt_add,prt_common,prt_serial,prt_serial_cxmaddAdd a Printer/Plottersmit.catmkdev -c printer lsattr -c printer-s subclass -t type -D -Oprt_add,prt_common,prt_serial,prt_serial_cxmaddAdd a Printer/Plottersmit.catmkdev -c printer lsattr -c printer-s subclass -t type -D -Oprt_add,prt_common,prt_serial,prt_serial_cxmaddAdd a Printer/Plottersmit.catmkdev -c printer lsattr -c printer-s subclass -t type -D -Oprt_add,prt_common,prt_serialAdd a Printer/Plottersmit.catmkdev -c printer lsattr -c printer-s subclass -t type -D -Oprt_add,prt_common,prt_parallelAdd a Printer/Plottersmit.catmkdev -c printer lsattr -c printer-s subclass -t type -D -Oprt_mvMove a Printer/Plotter to Another Portsmit.catchdev prt_chg,prt_common,prt_serial,prt_serial_rsddChange/Show Characteristics of a Printer/Plottersmit.catchdev lsattr -l logicname -E -Oprt_chg,prt_common,prt_serial,prt_serial_lionddChange/Show Characteristics of a Printer/Plottersmit.catchdev lsattr -l logicname -E -Oprt_chg,prt_common,prt_serial,prt_serial_cxmaddChange/Show Characteristics of a Printer/Plottersmit.catchdev lsattr -l logicname -E -Oprt_chg,prt_common,prt_serial,prt_serial_cxmaddChange/Show Characteristics of a Printer/Plottersmit.catchdev lsattr -l logicname -E -Oprt_chg,prt_common,prt_serial,prt_serial_cxmaddChange/Show Characteristics of a Printer/Plottersmit.catchdev lsattr -l logicname -E -Oprt_chg,prt_common,prt_serial,prt_serial_cxmaddChange/Show Characteristics of a Printer/Plottersmit.catchdev lsattr -l logicname -E -Oprt_chg,prt_common,prt_serialChange/Show Characteristics of a Printer/Plottersmit.catchdev lsattr -l logicname -E -Oprt_chg,prt_common,prt_parallelChange/Show Characteristics of a Printer/Plottersmit.catchdev lsattr -l logicname -E -Ormvprt_optRemove a Printer/Plottersmit.catrmdev cfgprt_optConfigure a Defined Printer/Plottersmit.catmkdev pty_attrChange / Show Characteristics of the PTYsmit.catchdev -l pty0lsattr -l pty0 -E -ORemove the PTY; Keep Definitionsmit.catrmdev -l pty0Configure the Defined PTYsmit.catmkdev -l pty0System Hang Detection Statussh.catshconf -dsh.catshpriocfg_optChange/Show Characteristics of Priority Problem Detectionsh.catshconf -l prioshconf -E -O -l priosh.catRestore Default Priority Problem Configurationsh.catshconf -R -l priosh.catshliocfg_optChange/Show Characteristics of Lost I/O Detectionsh.catshconf -l lioshconf -E -O -l lioRestore Default Lost I/O Detection Configurationsh.catshconf -R -l liochgsys_opt,chgsys_MS_optChange / Show Characteristics of Operating Systemsmit.catchdev -l sys0lsattr -E -O -l sys0chgsys_opt,chgsys_MS_opt,chgsys_CPUG_optChange / Show Characteristics of Operating Systemsmit.catchdev -l sys0lsattr -E -O -l sys0chgsys_opt,chgsys_CPUG_optChange / Show Characteristics of Operating Systemsmit.catchdev -l sys0lsattr -E -O -l sys0chgsys_optChange / Show Characteristics of Operating Systemsmit.catchdev -l sys0lsattr -E -O -l sys0chcons_1Assign the Consolesmit.catchcons lscons -bOswcons_1Redirect Console Outputsmit.catswcons lscons -Oalog -t console -oShow all configurationswlmcntrl.catfor config in $(lswlmconf -r); do echo " $config : \c" if [ -f /etc/wlm/$config/description ] then head -c40 /etc/wlm/$config/description else echo "" fi donewlmcntrl.catwlmconfig_copy_listCopy a Configurationwlmcntrl.catcopyconfig() { mkdir /etc/wlm/$2 && cp -pr /etc/wlm/$1/* /etc/wlm/$2 } copyconfig wlmcntrl.catwlmconfig_create_listCreate a Configurationwlmcntrl.catcreateconfig() { mkdir /etc/wlm/$1 && cp -pr /etc/wlm/template/* /etc/wlm/$1 } createconfig wlmcntrl.catwlmconfig_select_listSelect a Configurationwlmcntrl.catselconfig() { case "$1" in ""|-|current) echo "WLM_CONF=;WLM_DIRCONF=;" >> $SmitDATA ;; *) lsclass -d "$1" >/dev/null || exit 1; echo "WLM_CONF=\"-d $1\" ; WLM_DIRCONF=\"$1\"" >> $SmitDATA ;; esac echo "WLM_SUPERCLASS= ; WLM_DIRCLASS= " >> $SmitDATA [ -r $SmitDATA ] && . $SmitDATA lsclass -r $WLM_CONF exit 0 } selconfig [ -r $SmitDATA ] && . $SmitDATA echo "#configuration: $WLM_DIRCONF:" wlmcntrl.catwlmconfig_enter_desConfiguration Descriptionwlmcntrl.catw_des () { [ -r $SmitDATA ] && . $SmitDATA echo $1 >/etc/wlm/${WLM_DIRCONF:=current}/description } w_desr_des () { [ -r $SmitDATA ] && . $SmitDATA FIC_DES=/etc/wlm/${WLM_DIRCONF:=current}/description [ -s $FIC_DES ] && TXT_DES=`cat $FIC_DES | tr ':' ' '` echo "#description: $TXT_DES:" } r_deswlmcntrl.catwlmconfig_delete_listRemove a Configurationwlmcntrl.catdelconfig() { [ "$1" = current -o "$1" = `lswlmconf -c` ] && { dspmsg -s 16 wlmcntrl.cat 46 "The selected configuration is 'current' and cannot then be deleted" exit 1 } for set in `lswlmconf -s 2>/dev/null`; do for config in `confsetcntrl -l -d $set | sed -n 's,:$,,p' | sort -u`; do [ "$1" = "$config" ] && setlist="$setlist $set" done done [ -z "$setlist" ] || { dspmsg -s 16 wlmcntrl.cat 47 "The selected configuration belongs to one or more sets and cannot then be deleted. Please remove this configuration from the sets first. Here is the list of involved configuration sets: " echo "$setlist" | sort -u exit 1 } rm -r /etc/wlm/$1 } delconfig wlmcntrl.catwlmsubclass_select_listSelect a Superclass or -wlmcntrl.catselsuperclass() { if [ "$1" = - ] then echo "WLM_SUPERCLASS= ; WLM_DIRCLASS= " >> $SmitDATA else [ -r $SmitDATA ] && . $SmitDATA lsclass $WLM_CONF "$1" >/dev/null || exit 1 echo "WLM_SUPERCLASS=\"-S $1\"; WLM_DIRCLASS=\"$1/\"" >> $SmitDATA fi . $SmitDATA lsclass $WLM_SUPERCLASS $WLM_CONF exit 0 } selsuperclass [ -r $SmitDATA ] && . $SmitDATA lswlmconf -ld ${WLM_DIRCONF:-current} | grep '/' >/dev/null && { dspmsg -s 16 wlmcntrl.cat 50 "This selection only applies to regular configurations, and the current one is actually a configuration set. Please go first to the \"Work on alternate configurations\" menu and select a regular configuration there." exit 1 } SELCLASS=$(echo $WLM_SUPERCLASS | awk '{print $2}') echo "#selectedclass: ${SELCLASS:=-}:" wlmcntrl.catShow current focuswlmcntrl.cat[ -r $SmitDATA ] && . $SmitDATA if lswlmconf -ld ${WLM_DIRCONF:-current} | grep '/' >/dev/null then dspmsg -s 16 wlmcntrl.cat 43 "Configuration set: " echo ${WLM_DIRCONF:-current} dspmsg -s 16 wlmcntrl.cat 44 "Currently active configuration of the set: " lswlmconf -ld ${WLM_DIRCONF:-current} | sed 's,.*/,,' else dspmsg -s 16 wlmcntrl.cat 42 "Configuration: " echo ${WLM_DIRCONF:=current} if [ "$WLM_SUPERCLASS" = "" ] then echo Class set: Superclasses else echo Class set: Subclasses of ${WLM_DIRCLASS} fi fi echo echo "current -> `lswlmconf -c`" wlmcntrl.catList all Classeswlmcntrl.cat[ -r $SmitDATA ] && . $SmitDATA lsclass $WLM_SUPERCLASS $WLM_CONF exit 0[ -r $SmitDATA ] && . $SmitDATA lswlmconf -ld ${WLM_DIRCONF:-current} | grep '/' >/dev/null && { dspmsg -s 16 wlmcntrl.cat 50 "This selection only applies to regular configurations, and the current one is actually a configuration set. Please go first to the \"Work on alternate configurations\" menu and select a regular configuration there." exit 1 } echo '#xxx:\n:' wlmcntrl.catwlmaddclass_desGeneral Characteristics of a classwlmcntrl.cat[ -r $SmitDATA ] && . $SmitDATA ; mkclass $WLM_SUPERCLASS $WLM_CONF[ -r $SmitDATA ] && . $SmitDATA lswlmconf -ld ${WLM_DIRCONF:-current} | grep '/' >/dev/null && { dspmsg -s 16 wlmcntrl.cat 50 "This selection only applies to regular configurations, and the current one is actually a configuration set. Please go first to the \"Work on alternate configurations\" menu and select a regular configuration there." exit 1 } lsclass $WLM_SUPERCLASS $WLM_CONF -Dwlmcntrl.catwlmclass_des_galGeneral Characteristics of a classwlmcntrl.cat[ -r $SmitDATA ] && . $SmitDATA ; chclass $WLM_SUPERCLASS $WLM_CONF[ -r $SmitDATA ] && . $SmitDATA lswlmconf -ld ${WLM_DIRCONF:-current} | grep '/' >/dev/null && { dspmsg -s 16 wlmcntrl.cat 50 "This selection only applies to regular configurations, and the current one is actually a configuration set. Please go first to the \"Work on alternate configurations\" menu and select a regular configuration there." exit 1 } lsclass -C $WLM_SUPERCLASS $WLM_CONF _rawnamewlmcntrl.catwlmclass_des_cpuCPU resource Managementwlmcntrl.cat[ -r $SmitDATA ] && . $SmitDATA ; chclass $WLM_SUPERCLASS $WLM_CONF[ -r $SmitDATA ] && . $SmitDATA lswlmconf -ld ${WLM_DIRCONF:-current} | grep '/' >/dev/null && { dspmsg -s 16 wlmcntrl.cat 50 "This selection only applies to regular configurations, and the current one is actually a configuration set. Please go first to the \"Work on alternate configurations\" menu and select a regular configuration there." exit 1 } lsclass -C $WLM_SUPERCLASS $WLM_CONF_rawnamewlmcntrl.catwlmclass_des_memMemory resource Managementwlmcntrl.cat[ -r $SmitDATA ] && . $SmitDATA ; chclass $WLM_SUPERCLASS $WLM_CONF[ -r $SmitDATA ] && . $SmitDATA lswlmconf -ld ${WLM_DIRCONF:-current} | grep '/' >/dev/null && { dspmsg -s 16 wlmcntrl.cat 50 "This selection only applies to regular configurations, and the current one is actually a configuration set. Please go first to the \"Work on alternate configurations\" menu and select a regular configuration there." exit 1 } lsclass -C $WLM_SUPERCLASS $WLM_CONF_rawnamewlmcntrl.catwlmclass_des_biodiskIO resource Managementwlmcntrl.cat[ -r $SmitDATA ] && . $SmitDATA ; chclass $WLM_SUPERCLASS $WLM_CONF[ -r $SmitDATA ] && . $SmitDATA lswlmconf -ld ${WLM_DIRCONF:-current} | grep '/' >/dev/null && { dspmsg -s 16 wlmcntrl.cat 50 "This selection only applies to regular configurations, and the current one is actually a configuration set. Please go first to the \"Work on alternate configurations\" menu and select a regular configuration there." exit 1 } lsclass -C $WLM_SUPERCLASS $WLM_CONF_rawnamewlmcntrl.catwlmclass_des_proclimitProcess total resource managementwlmcntrl.catchclass_unit() { [ -r $SmitDATA ] && . $SmitDATA cr=`getopt A:a:B:b:C:c:v:d $*` while [ $# -gt 0 ] do case $1 in -A) shift; [ "$1" = "" ] && { dspmsg -s 16 wlmcntrl.cat 30 'Illegal value: Used - to reset a maximum'; exit 1 } totalConnecttime=$1; shift; continue ;; -a) shift; totalConnecttimeunit=$1; shift; continue ;; -B) shift; [ "$1" = "" ] && { dspmsg -s 16 wlmcntrl.cat 30 'Illegal value: Used - to reset a maximum'; exit 1 } totalDiskIO=$1; shift; continue ;; -b) shift; totalDiskIOunit=$1; shift; continue ;; -C) shift; [ "$1" = "" ] && { dspmsg -s 16 wlmcntrl.cat 30 'Illegal value: Used - to reset a maximum'; exit 1 } totalCPU=$1; shift; continue ;; -c)shift; totalCPUunit=$1; shift; continue ;; -v)shift; [ "$1" = "" ] && { dspmsg -s 16 wlmcntrl.cat 30 'Illegal value: Used - to reset a maximum'; exit 1 } totalVM=$1; shift; continue ;; -d)shift; totalVMunit=$1; shift; continue ;; *) break ;; esac done deftotalCPU=`lsclass -C $WLM_SUPERCLASS $WLM_CONF $1 | tail -1 | awk -F: '{print $22}'` deftotalCPUunit=`lsclass -C $WLM_SUPERCLASS $WLM_CONF $1 | tail -1 | awk -F: '{print $23}'` deftotalDiskIO=`lsclass -C $WLM_SUPERCLASS $WLM_CONF $1 | tail -1 | awk -F: '{print $24}'` deftotalDiskIOunit=`lsclass -C $WLM_SUPERCLASS $WLM_CONF $1 | tail -1 | awk -F: '{print $25}'` deftotalConnecttime=`lsclass -C $WLM_SUPERCLASS $WLM_CONF $1 | tail -1 | awk -F: '{print $26}'` deftotalConnecttimeunit=`lsclass -C $WLM_SUPERCLASS $WLM_CONF $1 | tail -1 | awk -F: '{print $27}'` deftotalVM=`lsclass -C $WLM_SUPERCLASS $WLM_CONF $1 | tail -1 | awk -F: '{print $37}'` deftotalVMunit=`lsclass -C $WLM_SUPERCLASS $WLM_CONF $1 | tail -1 | awk -F: '{print $38}'` for i in totalCPU totalConnecttime totalDiskIO totalVM do eval echo \$$i | read h eval echo \$${i}unit | read u eval echo \$def${i} | read dh eval echo \$def${i}unit | read du if [ -n "$h" ] then # hardmax is modified if [ "$h" = "-" ] then # hardmax set to - unset ${i}unit; else # hardamx not set to -. Use the unit specified if any otherwise use the default eval "${i}unit="\${${i}unit:-$du} fi else # hardmax is not modified if [ "$dh" = "-" ] then # hardmax is - unset ${i}unit; else #hardmax is not -. if [ -n "$u" ] then #Use default hardmax and Use the unit specified . eval "${i}="\${${i}:-$dh} fi fi fi done cmd= for i in totalCPU totalConnecttime totalDiskIO totalVM do eval echo \$$i | read h eval echo \$${i}unit | read u if [ -n "$h" -o -n "$u" ] then case $i in totalCPU) cmd="$cmd -C " ;; totalConnecttime) cmd="$cmd -A " ;; totalDiskIO) cmd="$cmd -B " ;; totalVM) cmd="$cmd -v " ;; esac cmd="$cmd hardmax=$h$u" fi done chclass $WLM_SUPERCLASS $WLM_CONF $cmd $1 } chclass_unit[ -r $SmitDATA ] && . $SmitDATA lswlmconf -ld ${WLM_DIRCONF:-current} | grep '/' >/dev/null && { dspmsg -s 16 wlmcntrl.cat 50 "This selection only applies to regular configurations, and the current one is actually a configuration set. Please go first to the \"Work on alternate configurations\" menu and select a regular configuration there." exit 1 } lsclass -C $WLM_SUPERCLASS $WLM_CONF_rawnamewlmcntrl.catwlmclass_des_classlimitClass total resource managementwlmcntrl.catx() { [ -r $SmitDATA ] && . $SmitDATA; cmd="" cnt=1 while [ $cnt -le $# ] do eval echo \$$cnt | read val if [ "$val" = "-V" ] then cnt=`expr $cnt + 1` eval echo \$$cnt | read arg cnt=`expr $cnt + 1` eval echo \$$cnt | read unit cmd="$cmd $val $arg$unit" else if [ "$val" != "KB" -a "$val" != "MB" -a "$val" != "GB" -a "$val" != "TB" ] then cmd="$cmd $val" fi fi cnt=`expr $cnt + 1` done chclass $WLM_SUPERCLASS $WLM_CONF $cmd } x[ -r $SmitDATA ] && . $SmitDATA lswlmconf -ld ${WLM_DIRCONF:-current} | grep '/' >/dev/null && { dspmsg -s 16 wlmcntrl.cat 50 "This selection only applies to regular configurations, and the current one is actually a configuration set. Please go first to the \"Work on alternate configurations\" menu and select a regular configuration there." exit 1 } lsclass -C $WLM_SUPERCLASS $WLM_CONF_rawnamewlmcntrl.catwlmrmclass_listRemove a Classwlmcntrl.catdelclass() { [ -r $SmitDATA ] && . $SmitDATA rmclass $WLM_SUPERCLASS $WLM_CONF $1 && exit 0 grep "^$1" /etc/wlm/${WLM_DIRCONF:-current}/${WLM_DIRCLASS}rules && dspmsg -s 16 wlmcntrl.cat 24 " Please go first to the \"Class assignment rules\" menu to delete all rules which refer to this class." exit 1 } delclass [ -r $SmitDATA ] && . $SmitDATA lswlmconf -ld ${WLM_DIRCONF:-current} | grep '/' >/dev/null && { dspmsg -s 16 wlmcntrl.cat 50 "This selection only applies to regular configurations, and the current one is actually a configuration set. Please go first to the \"Work on alternate configurations\" menu and select a regular configuration there." exit 1 } echo '#name:\n:' wlmcntrl.catList all Ruleswlmcntrl.cat [ -r $SmitDATA ] && . $SmitDATA echo " # Class User Group Application Type Tag " awk '/^\*/{ ; next } { if (length($3) > 10) $8 = "..."substr($3,length($3)-7+1); else $8 = $3; if (length($4) > 10) $9 = "..."substr($4,length($4)-7+1); else $9 = $4; if (length($5) > 21) $10 = "..."substr($5,length($5)-21+1); else $10 = $5; if (length($6) > 10) $11 = "..."substr($6,length($6)-7+1); else $11 = $6; if (length($7) > 10) $12 = "..."substr($7,length($7)-7+1); else $12 = $7; printf("%03d %-10.10s%-10.10s%-10.10s%-24.24s%-10.10s%-10.10s\n",++lnum, $1, $8, $9, $10, $11, $12); }' /etc/wlm/${WLM_DIRCONF:=current}/${WLM_DIRCLASS}rules[ -r $SmitDATA ] && . $SmitDATA lswlmconf -ld ${WLM_DIRCONF:-current} | grep '/' >/dev/null && { dspmsg -s 16 wlmcntrl.cat 50 "This selection only applies to regular configurations, and the current one is actually a configuration set. Please go first to the \"Work on alternate configurations\" menu and select a regular configuration there." exit 1 } echo '#xxx:\n:' wlmcntrl.catwlmrs_creCreate a new Rulewlmcntrl.catcrrule () { [ -r $SmitDATA ] && . $SmitDATA while getopts 'l:d:u:c:g:a:y:t:' OPTION; do case $OPTION in l) logicname=$OPTARG ;; d) order=$OPTARG ;; c) class=$OPTARG ;; u) user=$OPTARG ;; g) group=$OPTARG ;; a) appli=$OPTARG ;; y) type=$OPTARG ;; t) tag=$OPTARG ;; esac done order=${order:--} user=${user:--} group=${group:--} appli=${appli:--} type=${type:--} tag=${tag:--} if [ $order -lt 1 ] then dspmsg -s 16 wlmcntrl.cat 51 'order needs to be a value greater than 0.' exit 1 fi lsclass $WLM_SUPERCLASS $WLM_CONF $class >/dev/null || exit 1 user=$(echo "$user" | sed -e 's/[ ,]\{1,\}/,/g') group=$(echo "$group" | sed -e 's/[ ,]\{1,\}/,/g') appli=$(echo "$appli" | sed -e 's/[ ,]\{1,\}/,/g') type=$(echo "$type" | sed -e 's/[ ,]\{1,\}/,/g') tag=$(echo "$tag" | sed -e 's/[ ,]\{1,\}/,/g') LINE="${class} - ${user} ${group} ${appli} ${type} ${tag}" wlmcheck $WLM_CONF $WLM_SUPERCLASS -r "${LINE}" || exit 1 WORK=/etc/wlm/${WLM_DIRCONF:=current}/${WLM_DIRCLASS} cp ${WORK}rules ${WORK}rules.tmp || exit 1 awk -v nb=${order} -v line="${LINE}" '/^\*/{ print; next } { if (++lnum == nb) print line; print; } END { if (lnum < nb) print line } ' ${WORK}rules.tmp > ${WORK}rules } crrule wlmcntrl.catwlmrs_chgChange/Show Characteristics of a Rulewlmcntrl.catchrule () { [ -r $SmitDATA ] && . $SmitDATA while getopts 'l:d:u:c:g:a:y:t:' OPTION; do case $OPTION in l) logicname=$OPTARG ;; d) order=$OPTARG ;; c) class=$OPTARG ;; u) user=$OPTARG ;; g) group=$OPTARG ;; a) appli=$OPTARG ;; y) type=$OPTARG ;; t) tag=$OPTARG ;; esac done order=${order:--} user=${user:--} group=${group:--} appli=${appli:--} type=${type:--} tag=${tag:--} lsclass $WLM_SUPERCLASS $WLM_CONF $class >/dev/null || exit 1 user=$(echo "$user" | sed -e 's/[ ,]\{1,\}/,/g') group=$(echo "$group" | sed -e 's/[ ,]\{1,\}/,/g') appli=$(echo "$appli" | sed -e 's/[ ,]\{1,\}/,/g') type=$(echo "$type" | sed -e 's/[ ,]\{1,\}/,/g') tag=$(echo "$tag" | sed -e 's/[ ,]\{1,\}/,/g') LINE="${class} - ${user} ${group} ${appli} ${type} ${tag}" wlmcheck $WLM_CONF $WLM_SUPERCLASS -r "${LINE}" || exit 1 WORK=/etc/wlm/${WLM_DIRCONF:=current}/${WLM_DIRCLASS} cp ${WORK}rules ${WORK}rules.tmp || exit 1 awk -v oldnb=$logicname '/^\*/{ print; next } { if (++lnum != oldnb) print; } ' ${WORK}rules.tmp > ${WORK}rules cp ${WORK}rules ${WORK}rules.tmp || exit 1 awk -v newnb=$order -v line="${LINE}" '/^\*/{ print; next } { if (++lnum == newnb) print line; print } END { if (lnum < newnb) print line } ' ${WORK}rules.tmp > ${WORK}rules } chrule wlmcntrl.catwlmrs_delDelete a Rulewlmcntrl.catrmrule() { [ -r $SmitDATA ] && . $SmitDATA cp /etc/wlm/${WLM_DIRCONF:=current}/${WLM_DIRCLASS}rules /etc/wlm/${WLM_DIRCONF:=current}/${WLM_DIRCLASS}rules.tmp || exit 1 awk -v nb=$1 '/^\*/{ print; next } { if (++lnum != nb) print; } ' /etc/wlm/${WLM_DIRCONF:=current}/${WLM_DIRCLASS}rules.tmp > /etc/wlm/${WLM_DIRCONF:=current}/${WLM_DIRCLASS}rules } rmrule wlmcntrl.catwlmstart_listStart Workload Managerwlmcntrl.catstartwlm() { while getopts 'd:pgcanbCP' OPTION $*; do case $OPTION in p) ARG_wlmcntrl="$ARG_wlmcntrl -p" ;; g) ARG_wlmcntrl="$ARG_wlmcntrl -g" ;; a) ARG_wlmcntrl="$ARG_wlmcntrl -a" ;; c) ARG_wlmcntrl="$ARG_wlmcntrl -c" ;; C) ARG_wlmcntrl="$ARG_wlmcntrl -T class" ;; P) ARG_wlmcntrl="$ARG_wlmcntrl -T proc" ;; n) wlmcntrl $ARG_wlmcntrl || exit 1 ;; b) if lsitab wlm >/dev/null then chitab "wlm:2:once:/usr/sbin/wlmcntrl $ARG_wlmcntrl > /dev/console 2>&1" elif lsitab rset >/dev/null then mkitab -i rset "wlm:2:once:/usr/sbin/wlmcntrl $ARG_wlmcntrl > /dev/console 2>&1" else mkitab -i rc "wlm:2:once:/usr/sbin/wlmcntrl $ARG_wlmcntrl > /dev/console 2>&1" fi [ -z "$WLM_DIRCONF" ] || echo "ln -sf /etc/wlm/$WLM_DIRCONF /etc/wlm/current" >> /etc/firstboot ;; d) config=`echo $OPTARG|sed 's,/.*,,'` [ "$config" = current ] || { WLM_DIRCONF="$config" ARG_wlmcntrl="$ARG_wlmcntrl -d $config" } ;; esac done } startwlm lswlmconf -c >/dev/null || exit 1 cf=`lswlmconf -lc | sed -n 's,.*/,/,p'` echo "#config: current$cf" wlmupdate_listUpdate Workload Managerwlmcntrl.catwlmupdate() { while getopts 'd:S:' OPTION $*; do case $OPTION in d) config=`echo $OPTARG|sed 's,/.*,,'` [ "$config" = current ] || ARG_wlmcntrl="$ARG_wlmcntrl -d $config" ;; S) [ "$config" = current ] || { dspmsg -s 16 wlmcntrl.cat 11 'Superclass not allowed when changing configuration' echo; exit 1 } ARG_wlmcntrl="$ARG_wlmcntrl -S $OPTARG" ;; esac done wlmcntrl -u $ARG_wlmcntrl } wlmupdate lswlmconf -c >/dev/null || exit 1 cf=`lswlmconf -lc | sed -n 's,.*/,/,p'` echo "#config:super: current$cf:-:" wlmcntrl.catwlmstop_listStop Workload Managerwlmcntrl.catstopwlm() { while getopts 'nb' OPTION $*; do case $OPTION in n) wlmcntrl -o ;; b) rmitab wlm 2>/dev/null ;; esac done exit 0 } stopwlm wlmcntrl.catShow WLM statuswlmcntrl.cat[ -r $SmitDATA ] && . $SmitDATA ;wlmcheck $WLM_CONFwlmcntrl.catwlmassign_listAssign/Unassign processes to a class/subclasswlmcntrl.catass() { while getopts 'sSuc:p:g:' OPTION; do case $OPTION in s|S) flags="$flags -$OPTION" ;; c) class=$OPTARG ;; p) pids=$OPTARG ;; g) pgids="-g $OPTARG" ;; u) arg="-u" ;; esac done [ -z "$arg" ] || class="" echo wlmassign $flags $arg $class $pids $pgids wlmassign $flags $arg $class $pids $pgids } ass List all attribute value groupingswlmcntrl.cat groupings_filter(){ awk '/^\*/ { next } { for (i=1; i/dev/null && { dspmsg -s 16 wlmcntrl.cat 50 "This selection only applies to regular configurations, and the current one is actually a configuration set. Please go first to the \"Work on alternate configurations\" menu and select a regular configuration there." exit 1 } echo '#xxx:\n:' wlmgroupings_cr_desCreate a new attribute value groupingwlmcntrl.catgroupings_filter(){ awk '/^\*/ { next } { for (i=1; i> /etc/wlm/${WLM_DIRCONF:=current}/$WLM_DIRCLASS/groupings } groupings_cr[ -r $SmitDATA ] && . $SmitDATA lswlmconf -ld ${WLM_DIRCONF:-current} | grep '/' >/dev/null && { dspmsg -s 16 wlmcntrl.cat 50 "This selection only applies to regular configurations, and the current one is actually a configuration set. Please go first to the \"Work on alternate configurations\" menu and select a regular configuration there." exit 1 } echo '#xxx:\n:' wlmgroupings_ch_opChange an attribute value groupingwlmcntrl.catgroupings_filter(){ awk '/^\*/ { next } { for (i=1; i groupings.tmp awk -v del=$1 -F= ' $1 != del { print }' groupings.tmp > groupings rm -f groupings.tmp echo $1=$2 >> groupings } groupings_chwlmgroupings_de_opDelete an attribute value groupingwlmcntrl.catgroupings_filter(){ awk '/^\*/ { next } { for (i=1; i groupings.tmp # check name exists res=`cat groupings.tmp | awk -v n=$name -F= ' $1 == n { printf("found"); exit }'` if [ "$res" != "found" ] then dspmsg -s 16 wlmcntrl.cat 23 'Attribute Value Grouping %s not found' $name rm -f groupings.tmp return 1 fi # remove grouping entries with specified name awk -v del=$name -F= ' $1 != del { print }' groupings.tmp > groupings rm -f groupings.tmp } delgroupings [ -r $SmitDATA ] && . $SmitDATA lswlmconf -ld ${WLM_DIRCONF:-current} | grep '/' >/dev/null && { dspmsg -s 16 wlmcntrl.cat 50 "This selection only applies to regular configurations, and the current one is actually a configuration set. Please go first to the \"Work on alternate configurations\" menu and select a regular configuration there." exit 1 } echo '#xxx:\n:' wlmconfset_cre_optCreate a set of time-based configurationswlmcntrl.catconfsetcntrl -C wlmconfset_sho_optShow a set of time-based configurationswlmcntrl.catshow_set() { dspmsg -s 16 wlmcntrl.cat 40 "Configuration set description:\n" [ -s "/etc/wlm/$1/description" ] && { cat "/etc/wlm/$1/description" } dspmsg -s 16 wlmcntrl.cat 41 "\nConfiguration set content:\n" confsetcntrl -ld "$1" } show_setecho '#name:'; echo _rawnamewlmconfset_del_optDelete a set of time-based configurationswlmcntrl.catdel_set() { [ "$1" = current -o "$1" = `lswlmconf -c` ] && { dspmsg -s 16 wlmcntrl.cat 46 "The selected configuration is 'current' and cannot then be deleted" exit 1 } confsetcntrl -D "$1" } del_setecho '#name:'; echo _rawnamewlmconfset_che_optCheck a set of time-based configurationswlmcntrl.catwlmcheck -qdecho '#name:'; echo _rawnamewlmconfset_a_c_optAdd a time-based configuration to a setwlmcntrl.catadd_tr() { days=''; times=''; etimes='' [ "A$3" = A -o "A$3" = A- ] || days="$3" [ "A$4" = A -o "A$4" = A- ] || { [ "A$days" = A ] && days="$4" || days="$days-$4"; } [ "A$5" = A -o "A$5" = A- ] || times="$5:$6" [ "A$6" = A -o "A$6" = A- ] || times="$5:$6" [ "A$7" = A -o "A$7" = A- ] || etimes="$7:$8" [ "A$8" = A -o "A$8" = A- ] || etimes="$7:$8" [ "A$etimes" = A -o "A$times" = A ] || times="$times-$etimes" [ "A$days" = A -o "A$times" = A ] || days="$days," confsetcntrl -d "$1" -a "$2" "$days$times" || [ $? = 2 ] } add_tr def_range() { echo '#set:config:bday:eday:bhour:ehour:bmin:emin:' echo "$1::-:-:-:-:-:-:" } def_range _rawnamewlmconfset_d_c_optRemove a time-based configuration from a setwlmcntrl.catdel_tr() { confsetcntrl -d "$1" -r "$2" "$3" || [ $? = 2 ] } del_tr wlmconfset_desc_optConfiguration Descriptionwlmcntrl.catw_des () { echo "$2" >"/etc/wlm/$1/description" } w_desr_des () { FIC_DES="/etc/wlm/$1/description" [ -s $FIC_DES ] && TXT_DES=`cat $FIC_DES | tr ':' ' '` echo '#name:description:' echo "$1:$TXT_DES:" } r_des_rawnamewlmcntrl.catarm_limits_galEWLM configurationewlm.cat/usr/sbin/ewlm_chconfig limits /usr/sbin/ewlmcfg -Cewlm.catewlmshares_des_cpuEWLM CPU Resource Managementewlm.cat/usr/sbin/ewlmcfgCPUSHARES=`/usr/sbin/ewlmcfg -q 2>&1 | grep CPU |awk '{print $3}'` echo \#CPUshares echo ${CPUSHARES}ewlm.catShow the status of the EWLM servicesewlm.cattestewlm() { /usr/sbin/ewlmcfg -q export ODMDIR=/etc/objrepos odmget Config_Rules | grep ewlmcfg >/dev/null 2>&1 if [ $? -eq 0 ] then /usr/bin/dspmsg -s 3 ewlm.cat 7 'EWLM will be enabled at next boot.' else /usr/bin/dspmsg -s 3 ewlm.cat 8 'EWLM will be disabled at next boot.' fi } testewlm ewlm.catewlmstart_listEnable the EWLM Servicesewlm.catstartewlm() { export ODMDIR=/etc/objrepos EXC=0 USER=`/usr/bin/id -u` if [ $USER -ne 0 ] then /usr/bin/dspmsg -s 3 ewlm.cat 6 'Root authority is required to configure EWLM. ' exit 1 fi while getopts 'nb' OPTION $* do case $OPTION in n) /usr/sbin/ewlmcfg -c -s EXC=$? ;; b) odmdelete -o Config_Rules -q "rule = '/usr/sbin/ewlmcfg -c -s'" >/dev/null 2>&1; odmadd >/dev/null 2>&1 </dev/null 2>&1;; esac done exit $EXC } stopewlm ewlm.catsmtctl_cmdchangesmtChange SMT Modesmtctl.catsmtctl_set_num_smt_threadsSet Number of SMT Threadssmtctl.catsmtctllist_installed_sw,common_list_installed_swList Installed Softwaresmit.catlslpp -Llist_installed_sw_bndList Installed Software by Bundlesmit.catlslpp -Lshow_historyShow Software Installation Historysmit.catlslpp -hshow_apar_statShow Fix (APAR) Installation Statussmit.catinstfix -ivqklist_requisitesList Fileset Requisitessmit.catlslpp -plist_dependentsList Fileset Dependentssmit.catlslpp -d list_filesList Files Included in a Filesetsmit.catlslpp -fwhat_fileset,common_what_filesetList Fileset Containing Filesmit.cat lslpp_Jw () { # To avoid unexpected wildcarding we create and # cd to a known empty directory to call lslpp EMPTYDIR=/tmp/.wf$$ mkdir $EMPTYDIR 2>/dev/null (cd $EMPTYDIR 2>/dev/null; lslpp -Jw $*) rm -rf $EMPTYDIR 2>/dev/null } lslpp_Jw check_filesCheck Software File Sizes After Installationsmit.catlppchk -cverify_installVerify Software Installation and Requisitessmit.catlppchk -vlist_installed_sw_r,common_list_installed_sw,common_opts_rList Installed Softwaresmit.catlslpp -Lshow_history_r,common_opts_rShow Software Installation Historysmit.catlslpp -hlist_requisites_r,common_opts_rList Fileset Requisitessmit.catlslpp -plist_dependents_r,common_opts_rList Fileset Dependentssmit.catlslpp -dlist_files_r,common_opts_rList Files Included in a Filesetsmit.catlslpp -fwhat_fileset_r,common_what_fileset,common_opts_rList Fileset Containing Filesmit.catlslpp_Jw () { # To avoid unexpected wildcarding we create and # cd to a known empty directory to call lslpp EMPTYDIR=/tmp/.wf$$ mkdir $EMPTYDIR 2>/dev/null (cd $EMPTYDIR 2>/dev/null; lslpp -Jw $*) rm -rf $EMPTYDIR 2>/dev/null } lslpp_Jw check_files_r,common_check,common_opts_rCheck Software File Sizes After Installationsmit.catlppchk -cverify_install_r,common_opts_rVerify Software Installation and Requisitessmit.catlppchk -vList All Userssmit.catlsuser -c -a id home ALL | sed '/^#.*/d' | tr ':' '\011'user_addAdd a Usersmit.catx() { LIST= SET_A= for i in "$@" do if [ "$i" = "admin=true" ] then SET_A="-a" continue elif [ "$i" = "admin=false" ] then continue fi LIST="$LIST \"$i\"" done eval mkuser $SET_A $LIST } xlsuser -Duser_changeChange / Show Characteristics of a Usersmit.catx() { if [ $# -ge 2 ] then for i in "$@" do spam="$spam \"$i\"" done eval chuser $spam fi } xlsuser -c _rawnameuser_removeRemove a User from the Systemsmit.catrmuser List All Groupssmit.catlsgroup -c ALL | sed '/^#.*/d' | tr ':' '\011'group_addAdd a Groupsmit.catmkgroupgroup_changeChange Group Attributessmit.catx(){ CHGROUP=chgroup CGD=0 CGMD=0 CGAD=0 for arg in "$@"; do case "$arg" in id=*|admin=*) CHGROUP="$CHGROUP $arg" CGD=1 ;; users=*) CHGRPMEM="chgrpmem -m = `echo $arg | sed -e 's/users=//' -e 's/ //g'`" CGMD=1 ;; adms=*) CHGRPADM="chgrpmem -a = `echo $arg | sed -e 's/adms=//' -e 's/ //g'`" CGAD=1 ;; efs_*=*) CHGROUP="$CHGROUP $arg" CGD=1 ;; esac done rc=0 if [ $CGMD = 1 ]; then eval "$CHGRPMEM $arg" [ $? != 0 ] && rc=1 fi if [ $CGAD = 1 ]; then eval "$CHGRPADM $arg" [ $? != 0 ] && rc=1 fi if [ $CGD = 1 ]; then eval "$CHGROUP $arg" [ $? != 0 ] && rc=1 fi exit $rc } xlsgroup -c_rawnamegroup_removeRemove a Group from the Systemsmit.catrmgroup passwdChange a User's Passwordsmit.catx() { sec_info=`lsgroup -a id security` sec_id=${sec_info#*=} sec_flg=0 grps=`id -G` for i in $grps do if [[ $i = $sec_id ]] then sec_flg=1 fi done cname=`whoami` if [[ $cname = $1 ]] || [[ $cname = root ]] then passwd $1 elif (( $sec_flg == 1)) then pwdadm $1 else passwd $1 fi if [ $? -ne 0 ] then dspmsg -s 3 smit.cat 71 'Press Enter to continue.' read fi } xlockuser_optLock / Unlock a User's Accountsmit.catx() { if [ $# -ge 2 ] then for i in "$@" do args="$args \"$i\"" done eval chuser $args fi } xlsuser -c _rawnamepasswdattrs.chgChange / Show Password Attributes for a Usersmit.catx() { if [ $# -ge 2 ] then for i in "$@" do args="$args \"$i\"" done eval chuser $args fi } xlsuser -c _rawnamelogin_user_optChange / Show Login Attributes for a Usersmit.catx() { if [ $# -ge 2 ] then for i in "$@" do args="$args \"$i\"" done eval chuser $args fi } xlsuser -c _rawnamelogin_port_optChange / Show Login Attributes for a Portsmit.catx() { if [ $# -gt 2 ] then for i in "$@" do args="$args \"$i\"" done eval chsec -f /etc/security/login.cfg $args fi } xlssec -c -f /etc/security/login.cfg -a logintimes -a logindelay -a logindisable -a logininterval -a loginreenable -a port_locked -s_rawnamefailed_logins.name_selectReset User's Failed Login Countsmit.catchsec -f /etc/security/lastlog -a "unsuccessful_login_count=0" -s ldapClientCFGConfigure this Host as a LDAP Clientsmit.cat/usr/sbin/mksecldap -c List Status of Client Daemonsmit.cat/usr/sbin/ls-secldapclntdEmpty the Client Daemon Cachesmit.cat/usr/sbin/flush-secldapclntdRestart the Client Daemonsmit.cat/usr/sbin/restart-secldapclntdStart the Client Daemonsmit.cat/usr/sbin/start-secldapclntdStop the Client Daemonsmit.cat/usr/sbin/stop-secldapclntdldapServerCFGConfigure this Host as a LDAP Serversmit.cat/usr/sbin/mksecldap -s Start the LDAP Serversmit.catx() { if [[ -f /opt/IBM/ldap/V6.1/sbin/ibmslapd ]] then /opt/IBM/ldap/V6.1/sbin/ibmslapd ldapdb2 if [[ $? -eq 0 ]] then return 0 fi fi if [[ -f /opt/IBM/ldap/V6.0/sbin/ibmslapd ]] then /opt/IBM/ldap/V6.0/sbin/ibmslapd ldapdb2 if [[ $? -eq 0 ]] then return 0 fi fi SLAPD="/usr/bin/slapd" SLAPDCFG="/etc/slapd32.conf" CURLEVEL=`lslpp -lcq ldap.server.rte 2>/dev/null | head -1 | cut -d ":" -f 3` if [[ -z $CURLEVEL ]] then dspmsg -s 2 secldap.cat 6 "%s: %s version %s or higher is not installed. " "smit" "ldap.server.rte" "3.2" else VERSION=`echo $CURLEVEL | cut -d "." -f 1` if [[ $VERSION -ge 5 ]] then SLAPD="/usr/bin/ibmslapd" SLAPDCFG="/etc/ibmslapd.conf" else dspmsg -s 8 secldap.cat 11 "Starting the LDAP server. " fi $SLAPD if [[ $? != 0 ]] then dspmsg -s 8 secldap.cat 9 "LDAP server failed to start. " return 1 fi fi } xStop the LDAP Serversmit.catx() { if [[ -f /opt/IBM/ldap/V6.1/sbin/ibmslapd ]] then /opt/IBM/ldap/V6.1/sbin/ibmslapd -k ldapdb2 > /dev/null if [[ $? -eq 0 ]] then return 0 fi fi if [[ -f /opt/IBM/ldap/V6.0/sbin/ibmslapd ]] then /opt/IBM/ldap/V6.0/sbin/ibmslapd -k ldapdb2 >/dev/null if [[ $? -eq 0 ]] then return 0 fi fi PID=`ps -e | grep slapd` stat=$? PID=`echo $PID | awk '{ print $1 }'` if [[ $stat -ne 0 || -z $PID ]] then dspmsg -s 8 secldap.cat 14 "The LDAP server is not active. " return 1 fi dspmsg -s 8 secldap.cat 10 "Stopping the LDAP server. " kill $PID # Wait in loop until slapd is fully killed or timed out timer=0 while true; do kill -0 $PID >/dev/null 2>&1 [[ $? -ne 0 ]] && break (( timer = timer + 1 )) [[ $timer -eq 60 ]] && break sleep 1 done if [[ $timer -eq 60 ]] then dspmsg -s 8 secldap.cat 12 "Failed to terminate LDAP server. " return 1 fi } xch_sys_pwdSystem Password Policysmit.catx() { LIST= for i in "$@"; do case "$i" in pwd_algorithm=*) if [ "$i" = "pwd_algorithm=crypt" ] then chsec -f /etc/security/login.cfg -s usw -a pwd_algorithm= else chsec -f /etc/security/login.cfg -s usw -a "$i" fi ;; *) LIST="$LIST -a $i" ;; esac done if [ $# -ge 2 ] then chsec -f /etc/security/user -s default $LIST fi } xx() { BUF1=`lssec -c -f /etc/security/login.cfg -s usw -a pwd_algorithm` NAM1=`echo "$BUF1" | grep ^# | cut -f 2 -d :` VAL1=`echo "$BUF1" | grep -v ^# | cut -f 2 -d :` BUF2=`lssec -c -f /etc/security/user -s default -a minalpha -a minloweralpha -a minupperalpha -a mindiff -a maxrepeats -a minother -a mindigit -a minspecialchar -a minlen` NAM2=`echo "$BUF2" | grep ^#` VAL2=`echo "$BUF2" | grep -v ^#` echo "$NAM2:$NAM1" echo "$VAL2:$VAL1" exit 0 } xmkauth_optAdd an Authorizationx() { LIST= for i in "$@" do LIST="$LIST \"$i\"" done eval mkauth $LIST } xchauth_optChange/Show Characteristics of a User-Defined Authorizationx() { if [[ $# -ge 2 ]] then for i in "$@" do spam="$spam \"$i\"" done eval chauth $spam fi } xlsauth -C _rawnameList ALL Authorizationslsauth -a id ALLrmauth_optRemove a User-Defined Authorizationrmauthrole_addAdd a Rolesmit.catmkrolerole_changeChange / Show Characteristics of a Rolesmit.catx() { if [[ $# -ge 2 ]] then for i in "$@" do spam="$spam \"$i\"" done eval chrole $spam fi } xlsrole -c _rawnameList All Rolessmit.catlsrole -f ALLrole_removeRemove a Role from the Systemsmit.catrmrole setsecattr_cmdadd_optAdd a command to Privileged Command Databasex() { if [[ $# -lt 2 ]] then echo Specify at least one attribute return 1 else LIST= for i in "$@" do name=`echo $i| cut -d= -f1` value=`echo $i| cut -d= -f2` if [[ $reqpv -eq 1 ]] then if [[ $name != aupv ]] then echo Error: Authorization \"$last\" requires privileges return 1 fi value=`echo $value |sed s/,/+/g` authprivs=$authprivs$value reqpv=0 continue fi if [[ $name == pvau ]] then reqpv=1 if [[ -n $authprivs ]] then authprivs=$authprivs,$value= else authprivs=$value= fi last=$value continue fi LIST="$LIST \"$i\"" done rc=`lssecattr -c -a $i 2>/dev/null` if [[ -n $rc ]] then echo Error: Command \"$i\" already exists in database return 1 fi [[ -n $authprivs ]] && LIST="\"authprivs=$authprivs\" $LIST" eval setsecattr -c $LIST fi } xsetsecattr_cmdmod_optChange/Show Characteristics of a Privileged Comamndx() { if [[ $# -lt 2 ]] then echo Error: Select attributes return 1 fi LIST= for i in "$@" do name=`echo $i| cut -d= -f1` value=`echo $i| cut -d= -f2` if [[ $reqpv -eq 1 ]] then if [[ $name != aupv ]] then echo Error: Authorization \"$last\" requires privileges return 1 fi value=`echo $value |sed s/,/+/g` authprivs=$authprivs$value reqpv=0 continue fi if [[ $name == pvau ]] then reqpv=1 if [[ -n $authprivs ]] then authprivs=$authprivs,$value= else authprivs=$value= fi last=$value continue fi LIST="$LIST \"$i\"" done [[ -n $authprivs ]] && LIST="\"authprivs=$authprivs\" $LIST" eval setsecattr -c $LIST } xx() { set -A a set -A p str=`lssecattr -c -C $@` names=`echo $str |cut -d" " -f1` values=`echo $str |cut -d" " -f2` aupv=`echo $values |cut -d: -f7` # echo aupv=$aupv names=`echo $names | cut -d: -f1-6,8-` values=`echo $values | cut -d: -f1-6,8-` n=1 IFS="," for i in $aupv; do names="$names:pvau$n:aupv$n" a[$n]=`echo $i | cut -d= -f1` p[$n]=`echo $i | cut -d= -f2 |sed s/+/,/g` values="$values:${a[$n]}:${p[$n]}" ((n=n+1)) done IFS= echo $names echo $values } x_rawnameList All Privileged Commandslssecattr -c -F ALLrmsecattr_optRemove a Command from Privileged Command Databasermsecattr -csetsecattr_devadd_optAdd a device to Privileged Device Databasex() { if [[ $# -lt 2 ]] then echo Specify at least one attribute return 1 else LIST= for i in "$@" do LIST="$LIST \"$i\"" done eval setsecattr -d $LIST fi } xsetsecattr_devmod_optChange/Show Characteristics of a Privileged Devicex() { if [[ $# -ge 2 ]] then for i in "$@" do spam="$spam \"$i\"" done eval setsecattr -d $spam fi } xlssecattr -d -C _rawnameList All Privileged Deviceslssecattr -d -F ALLrmsecattr_dev_optRemove a Device from Privileged Device Databasermsecattr -dsetsecattr_fileadd_optAdd a file to Privileged File Databasex() { if [[ $# -lt 2 ]] then echo Specify at least one attribute return 1 else LIST= for i in "$@" do LIST="$LIST \"$i\"" done eval setsecattr -f $LIST fi } xsetsecattr_filemod_optChange/Show Characteristics of a Privileged Filex() { if [[ $# -ge 2 ]] then for i in "$@" do spam="$spam \"$i\"" done eval setsecattr -f $spam fi } xlssecattr -f -C _rawnameList All Privileged Fileslssecattr -f -F ALLrmsecattr_file_optRemove a File from Privileged File Databasermsecattr -fsetsecattr_procmod_optChange/Show Privileges of a Processx() { if [[ $# -lt 2 ]] then echo Error: Select attributes return 1 fi LIST= for i in "$@" do LIST="$LIST \"$i\"" done eval setsecattr -p $LIST } xlssecattr -p -h -C _rawnamelssecattr_proc_optList Process Privilegesx() { if [[ -n `echo $@ | grep PID` ]] then echo Error: Select a valid process return 1 fi if [[ -n `echo $@ | grep ALL,` ]] then lssecattr -p -F -h ALL else lssecattr -p -F -h $@ fi } xalog_optsShow an Alog Filesmit.catalog -o -fx() { VALUES=`alog -L -c -t $1 | cut -d":" -f1-2 | grep -v "#"` echo '#type:file '$VALUES } x_rawnamealogchg_optsChange / Show Characteristics of an Alog Filesmit.catchange_attr() { OLDFILE=`alog -t $1 -L | grep -v "#" | cut -d":" -f1` # Change attributes in the ODM database. alog -C -t $1 -f $2 -s $3 -w $4 # console log is modified at same time as attributes if [ $1 = console ] then return fi # If they were changed in the ODM, then recreate # the file with the new attributes if the file had # previously existed. if [ $? -eq 0 -a -f $OLDFILE ] then alog -f $OLDFILE -o > /tmp/smalog.$$ # Only remove the file if the filename did not # change. This is so we can create the new file # without duplicate information. if [ $OLDFILE = $2 ] then rm -f $OLDFILE fi cat /tmp/smalog.$$ | alog -t $1 > /dev/null rm -f /tmp/smalog.$$ fi } change_attrx() { VALUES=`alog -L -c -t $1 | cut -d":" -f1-4 | grep -v "#"` echo '#type:file:size:verbosity '$VALUES } x_rawnameShow Current Dump Devicessmit.catsysdumpdev -ldump_change1Change Primary Dump Devicesmit.catsysdumpdevdump_change2Change Secondary Dump Devicesmit.catsysdumpdevShow Current Dump Devicessmit.catsysdumpdev -LShow Estimated Dump Sizesmit.catsysdumpdev -edump_typeOptsChange the Type of Dumpsmit.catsysdumpdev -t pval=`LANG=C sysdumpdev -l | tail -2 | head -1 | cut -c21- | awk '{print $1}' ` if [ $pval = 'traditional' ] then pval=`dspmsg smit.cat -s 10 39 'traditional,fw-assisted' | awk -F, '{print $1}' ` else pval=`dspmsg smit.cat -s 10 39 'traditional,fw-assisted' | awk -F, '{print $2}' ` fi print "#type\n"$pval dump_fullmemOptsChange the Full Memory Dump Modesmit.catsysdumpdev -fexport ODMDIR=/etc/objrepos xy=`odmget -q attribute="fullmem_dump" SWservAt | awk '/value/ { gsub("\"","",$3); print tolower($3); }'` if [ $xy = 'disallow' ] then xy=`dspmsg smit.cat -s 10 42 'disallow,allow,require' | awk -F, '{print $1}' ` elif [ $xy = 'allow' ] then xy=`dspmsg smit.cat -s 10 42 'disallow,allow,require' | awk -F, '{print $2}' ` else xy=`dspmsg smit.cat -s 10 42 'disallow,allow,require' | awk -F, '{print $3}' ` fi print "#full\n"$xy dump_chgdOptsChange the Directory to which Dump is Copied on Bootsmit.catsysdumpdevdump_allow.cmd_optAlways Allow System Dumpsmit.catsysdumpdev export ODMDIR=/etc/objrepos export NLSPATH=/usr/lib/nls/msg/%L/%N:/usr/lib/nls/msg/%L/%N.cat xy=`odmget -q attribute="enable_dump" SWservAt | awk '/value/ { gsub("\"","",$3); print tolower($3); }'` if [ $xy = 'true' ] then pval=`dspmsg -s 3 smit.cat 70 'true,false' | awk '/,/' |cut -f 1 -d ,` else pval=`dspmsg -s 3 smit.cat 70 'true,false' | awk '/,/' |cut -f 2 -d ,` fi print "#enable\n"$pval errdemonChange / Show Characteristics of the Error Logsmit.cat/usr/lib/errdemon#Get current max size of errlog file, excluding header export NLSPATH=/usr/lib/nls/msg/%L/%N:/usr/lib/nls/msg/%L/%N.cat COUNT=`expr 0` LOGFILE= BUFFER= LOGSIZE= LANG=C /usr/lib/errdemon -l | while read A1 do COUNT=`expr $COUNT + 1` if [ $COUNT -eq 3 ] then LOGFILE=`echo $A1 | awk '{print $3}'` fi if [ $COUNT -eq 4 ] then LOGSIZE=`echo $A1 | awk '{print $3}'` fi if [ $COUNT -eq 5 ] then BUFFER=`echo $A1 | awk '{print $4}'` fi if [ $COUNT -eq 6 ] then DUPCHKC=`echo $A1 | awk '{print tolower($3)}'` fi if [ $COUNT -eq 7 ] then DUPINT=`echo $A1 | awk '{print $3}'` fi if [ $COUNT -eq 8 ] then DUPMAX=`echo $A1 | awk '{print $4}'` fi if [ $COUNT -eq 11 ] then ERRRES=`echo $A1 | awk '{print $6}'` fi done if [ $DUPCHKC = 'true' ] then DUPCHK=`dspmsg -s 3 smit.cat 70 'true,false' | awk '/,/' |cut -f 1 -d ,` else DUPCHK=`dspmsg -s 3 smit.cat 70 'true,false' | awk '/,/' |cut -f 2 -d ,` fi print '#logfilepath:num_of_bytes:buffer:dup_max:dup_interval:dup_err_det:err_res\n'$LOGFILE:$LOGSIZE:$BUFFER:$DUPMAX:$DUPINT:$DUPCHK:$ERRRES pureScale_optChange / Show Characteristics of pureScale logging of the Error Logsmit.catcmd_to_exec() { export ODMDIR=/etc/objrepos odmget -q attribute=errlg_pscale_enabled SWservAt | sed -e "s#value = .*#value = "$1"#" >/tmp/tmpp$$ 2>/dev/null if [ $? = 0 ] then odmchange -o SWservAt -q attribute=errlg_pscale_enabled /tmp/tmpp$$ 2>&1 >/dev/null fi odmget -q attribute=errlg_pscale_logstream SWservAt | sed -e "s#value = .*#value = "$2"#" >/tmp/tmpp$$ 2>/dev/null if [ $? = 0 ] then odmchange -o SWservAt -q attribute=errlg_pscale_logstream /tmp/tmpp$$ 2>&1 >/dev/null fi if [ -f /tmp/tmpp$$ ] then rm /tmp/tmpp$$ 2>&1 >/dev/null fi } cmd_to_execcmd_to_discover() { export ODMDIR=/etc/objrepos penable=`odmget -q attribute=errlg_pscale_enabled SWservAt | awk -F = /value/'{print $2}' | tr -d '"' | tr -d ' '` pstream=`odmget -q attribute=errlg_pscale_logstream SWservAt | awk -F = /value/'{print $2}' | tr -d '"' | tr -d ' '` echo '#pureScale_enable:pureScale_logstream' echo "$penable:$pstream" } cmd_to_discovermle_cc_set_dlgSelect Set of Cultural Convention, Language, and Keyboardsmit.catset_primary_lang() { ## Check for RBAC enabled status. If disabled, check if root ## else check for authorization aix.system.install /usr/sbin/lsattr -El sys0 -a enhanced_RBAC |grep true > /dev/null if [[ $? -ne 0 ]] then if [[ `whoami` != root ]] then dspmsg -s 53 smit.cat 75 'Error: You must be logged in as root to run this command. ' >&2 exit 1 fi else /usr/bin/ckauth aix.system.install if [[ $? -ne 0 ]] then dspmsg -s 53 smit.cat 76 'Error: You must be logged in as an authorized user to run this command. ' >&2 exit 1 fi fi ## Set the cc, lang and keyboard. Install LPPs if necessary. ## arguments are in any order ## cultural convention, language, device, keyboard, and Xtend fs while getopts c:l:d:k:X Option "$@" do case $Option in c) locale=$OPTARG;; l) language=$OPTARG;; d) device=$OPTARG;; k) keyboard=$OPTARG;; X) extend_fs=-X;; esac done ## get variable values keyboard=`echo "$keyboard" | cut -f2 -d'[' | cut -f1 -d']'` locale=`echo "$locale" | cut -f2 -d'[' | cut -f1 -d']'` language=`echo "$language" | cut -f2 -d'[' | cut -f1 -d']'` if [[ -n $locale ]] then ## get the list of packages. This is a union of all ## packages necessary for the language, locale and keyboard. packages=$(/usr/lib/nls/lsmle -P -l $language; /usr/lib/nls/lsmle -P -c $locale; /usr/lib/nls/lsmle -P -k $keyboard) packages=$(echo $packages | awk 'BEGIN { FS = "\n" } { n = split ($1, array, " ") for (i=1; i<=n; ++i) { print array[i] } }' | sort -u) if [[ -n $device ]] then install_device=$device fi ## call installp if necessary install_list= if [[ -n $packages ]] then for i in $packages do #If the package is not installed, lslpp will have #no output. The error message doesn't count. check=`lslpp -lqc $i 2>/dev/null` if [[ -z $check ]] then short_package=`echo $i | sed 's/\.\*$//'` install_list="$install_list $short_package" fi done if [[ -n $install_list ]] then if [[ -z $device ]] then dspmsg -s 53 smit.cat 70 'Error: The selected settings for cultural convention, language, and keyboard require the installation of additional filesets that are not currently installed. Select an installation device that contains the following filesets: ' >&2 for i in $install_list do echo " ${i}" >&2 done exit 1 fi installp -qQacNg $extend_fs -d $install_device $install_list fi fi lft_defined=`lsdev -C -l lft0` ## check to see if new font is same codeset as old one - ## if not, call chfont if [[ -n $lft_defined && `/usr/lib/nls/lsmle -C -c $locale` != `lsfont -l | read a b c d ; echo $d` ]] then $(/usr/lib/nls/lsmle -X -f $(/usr/lib/nls/lsmle -C -c $locale)) fi lcmess=`ODMDIR=/usr/lib/objrepos odmget -q locale=$language MESSAGES | grep variables | cut -f2 -d'"' | cut -f2 -d'='` # Check for LFT - may need to add selected language to NLSPATH in addition to C@LFT MESSAGES if [[ $lcmess = C@lft ]] then lftflag=LFT fi ## change language and keyboard if [[ -z $lcmess || $lcmess = $locale ]] then chlang -M $locale else if [[ -z $lftflag ]] then MsgTransLst=`/usr/bin/echo $lcmess:$language` chlang -m $MsgTransLst $locale else chlang -m $lcmess $locale fi fi if [[ -n $lft_defined ]] then $(/usr/lib/nls/lsmle -X -k $keyboard) fi else dspmsg -s 53 smit.cat 53 'Error: Empty locale string. ' >&2 exit 1 fi } set_primary_lang echo '#device' grep "^INSTALL_DEVICE=" /var/adm/sw/__assistinfo 2>/dev/null | cut -f2 -d'='mle_cc_cust_dlgChange/Show Cultural Convention, Language, or Keyboardsmit.catchange_primary_lang() { ## Check for RBAC enabled status. If disabled, check if root ## else check for authorization aix.system.install /usr/sbin/lsattr -El sys0 -a enhanced_RBAC |grep true > /dev/null if [[ $? -ne 0 ]] then if [[ `whoami` != root ]] then dspmsg -s 53 smit.cat 75 'Error: You must be logged in as root to run this command. ' >&2 exit 1 fi else /usr/bin/ckauth aix.system.install if [[ $? -ne 0 ]] then dspmsg -s 53 smit.cat 76 'Error: You must be logged in as an authorized user to run this command. ' >&2 exit 1 fi fi ## Set the cc, lang and keyboard. Install lpps if necessary. ## arguments are in any order ## cultural convention, language, device, keyboard, and Xtend fs while getopts c:l:d:k:X Option "$@" do case $Option in c) locale=$OPTARG;; l) language=$OPTARG;; d) device=$OPTARG;; k) keyboard=$OPTARG;; X) extend_fs=-X;; esac done ## get variable values keyboard=`echo "$keyboard" | cut -f2 -d'[' | cut -f1 -d']'` locale=`echo "$locale" | cut -f2 -d'[' | cut -f1 -d']'` language=`echo "$language" | cut -f2 -d'[' | cut -f1 -d']'` lft_defined=`lsdev -C -l lft0` if [[ -n $device ]] then install_device=$device fi ## get a list of unique packages packages=$( if [[ -n $language ]] then /usr/lib/nls/lsmle -P -l $language fi ; if [[ -n $locale ]] then /usr/lib/nls/lsmle -P -c $locale fi ; if [[ -n $keyboard && -n $lft_defined ]] then /usr/lib/nls/lsmle -P -k $keyboard fi) packages=$(echo $packages | awk 'BEGIN { FS = "\n" } { n = split ($1, array, " ") for (i=1; i<=n; ++i) { print array[i] } }' | sort -u) ## check codeset consistency ## If codeset of locale and keyboard match or keyboard is undefined ## then we are OK. if [[ `/usr/lib/nls/lsmle -C -c $locale` = `/usr/lib/nls/lsmle -C -k $keyboard` || -z `/usr/lib/nls/lsmle -C -k $keyboard` || $keyboard = 'C' || -z $lft_defined ]] then if [[ `/usr/lib/nls/lsmle -C -l $language` = `/usr/lib/nls/lsmle -C -c $locale` || $language = 'En_US' || $language = 'en_US' || $language = 'C' || $keyboard = 'C' || $language = '' ]] then ## codeset is consistent ## call installp if necessary install_list= if [[ -n $packages ]] then for i in $packages do #If the package is not installed, lslpp will have #no output. The error message doesn't count. check=`lslpp -lqc $i 2>/dev/null` if [[ -z $check ]] then short_package=`echo $i | sed 's/\.\*$//'` install_list="$install_list $short_package" fi done if [[ -n $install_list ]] then if [[ -z $device ]] then dspmsg -s 53 smit.cat 70 'Error: The selected settings for cultural convention, language, and keyboard require the installation of additional filesets that are not currently installed. Select an installation device that contains the following filesets: ' >&2 for i in $install_list do echo " ${i}" >&2 done exit 1 fi installp -qQacNg $extend_fs -d $install_device $install_list fi fi if [[ -n $locale ]] then ## check to see if new font is same codeset as old one - ## if not, call chfont if [[ -n $lft_defined && `/usr/lib/nls/lsmle -C -c $locale` != `lsfont -l | read a b c d ; echo $d` ]] then $(/usr/lib/nls/lsmle -X -f $(/usr/lib/nls/lsmle -C -c $locale)) fi ## ## Allow $language (Message Language) to be null - which will assume default settings ## If there is no Message Language set, get the value for messages from CC for the selected locale ## if [[ $language = '' ]] then lcmess=`ODMDIR=/usr/lib/objrepos odmget -q locale=$locale CC | grep messages | cut -f2 -d'"' | cut -f2 -d'='` else lcmess=`ODMDIR=/usr/lib/objrepos odmget -q locale=$language MESSAGES | grep variables | cut -f2 -d'"' | cut -f2 -d'='` fi # Check for LFT - may need to add selected language to NLSPATH in addition to C@LFT MESSAGES if [[ $lcmess = C@lft ]] then lftflag=LFT fi ## change language and keyboard if [[ -z $lcmess || $lcmess = $locale ]] then chlang -M $locale else if [[ -z $lftflag ]] then MsgTransLst=`/usr/bin/echo $lcmess:$language` chlang -m $MsgTransLst $locale else chlang -m $lcmess $locale fi fi if [[ -n $lft_defined ]] then $(/usr/lib/nls/lsmle -X -k $keyboard) fi fi else dspmsg -s 53 smit.cat 54 'Error: Language codeset does not match keyboard and cultural convention. ' >&2 exit 1 fi else dspmsg -s 53 smit.cat 55 'Error: Keyboard and cultural convention codesets do not match. ' >&2 exit 1 fi exit 0 } change_primary_lang ## Figure out the current cc from the LANG environment variable, ## the current lang from /etc/environment, and the current keyboard ## from lskbd. echo '#custom_lang:custom_keyb:custom_cc:device' CURLANG=`grep '^LC_ALL=' /etc/environment | cut -f2 -d'=' | cut -f1 -d' '` if [[ -z $CURLANG ]] then CURLANG=`grep '^LC_MESSAGES=' /etc/environment | cut -f2 -d'=' | cut -f1 -d' '` if [[ -z $CURLANG || $CURLANG = C@lft ]] then CURLANG=`grep '^LANG=' /etc/environment | cut -f2 -d'=' | cut -f1 -d' '` fi fi ## ## If the LANG setting is not a supported translation, then ## look in the ODM CC for the primary translation. ## Pass this to custom_lang ## if [[ `/usr/lib/nls/lsmle -l $CURLANG | cut -c1-1` = '?' ]] then custom_lang=`ODMDIR=/usr/lib/objrepos odmget -q locale=$CURLANG CC | grep messages | cut -f2 -d'"' | cut -f2 -d'='` else custom_lang=`/usr/lib/nls/lsmle -c $CURLANG` fi lft_defined=`lsdev -C -l lft0` if [[ -n $lft_defined ]] then # Check for Desktop Support - if no support, use POSIX mapping DESKTOP=`/usr/lib/nls/lsmle -d $CURLANG | cut -f4 -d : | cut -c1` if [[ $DESKTOP = n ]] then current_keyboard=C custom_keyb=C else ## ## check if keyboard mapping uses long locale name as variable ## KBD_VAL=`LC_ALL=C /usr/bin/X11/querykbd` echo $KBD_VAL | grep -q '\.' if [[ $? -ne 0 ]] then current_keyboard=$KBD_VAL else VAL2=`echo $KBD_VAL | cut -f2 -d'.'` if [[ $VAL2 = *8859* ]] then current_keyboard=$KBD_VAL else if [[ -n `echo $KBD_VAL | grep @` ]] then kbmod=`echo $KBD_VAL | cut -f2 -d '@'` current_keyboard=`echo $KBD_VAL | cut -f1 -d'.'`@$kbmod else current_keyboard=$KBD_VAL fi fi fi fi else current_keyboard=`dspmsg -s 53 smit.cat 60 'undefined'` fi if [[ -n $lft_defined ]] then custom_keyb=`/usr/lib/nls/lsmle -D -k $current_keyboard | sed -e 's/:/./g' -e s/\'//g` else custom_keyb=$current_keyboard fi CURCC=`grep '^LC_ALL=' /etc/environment | cut -f2 -d'=' | cut -f1 -d' '` if [[ -z $CURCC ]] then CURCC=`grep '^LANG=' /etc/environment | cut -f2 -d'=' | cut -f1 -d' '` fi custom_cc=`/usr/lib/nls/lsmle -c $CURCC` DEFAULT_DEVICE=`grep '^INSTALL_DEVICE=' /var/adm/sw/__assistinfo 2>/dev/null | cut -f2 -d'='` echo "${custom_lang}:${custom_keyb}:${custom_cc}:${DEFAULT_DEVICE}"mle_cmd_add_lang,wpar_inst_disabled,wpar_mgmt,wpar_mgmt_devAdd Additional Language Environmentssmit.catadd_lang_environment () { ## Check for RBAC enabled status. If disabled, check if root ## else check for authorization aix.system.install /usr/sbin/lsattr -El sys0 -a enhanced_RBAC |grep true > /dev/null if [[ $? -ne 0 ]] then if [[ `whoami` != root ]] then dspmsg -s 53 smit.cat 75 'Error: You must be logged in as root to run this command. ' >&2 exit 1 fi else /usr/bin/ckauth aix.system.install if [[ $? -ne 0 ]] then dspmsg -s 53 smit.cat 76 'Error: You must be logged in as an authorized user to run this command. ' >&2 exit 1 fi fi while getopts c:l:d:XMIk:DK: Option "$@" do case $Option in c) locale=$OPTARG;; l) language=$OPTARG;; d) device=$OPTARG;; X) extend_fs=-X;; M) INUWPAR=${INUWPAR:+"$INUWPAR "}"-G";; I) INUWPAR_ENABLED="1";; k) INUWPAR_FILE=$OPTARG;; D) INUWPAR=${INUWPAR:+"$INUWPAR "}"-D";; K) INUWPAR=${INUWPAR:+"$INUWPAR "}"-d $OPTARG";; esac done if [[ -n $INUWPAR_FILE ]]; then if [[ `head -1 $INUWPAR_FILE` == '_all_wpars' ]]; then INUWPAR=${INUWPAR:+"$INUWPAR "}"-A" else awk '{gsub(/ /,"\n");print}' < $INUWPAR_FILE > /tmp/inuwpar.$$.list mv /tmp/inuwpar.$$.list $INUWPAR_FILE INUWPAR=${INUWPAR:+"$INUWPAR "}"-f $INUWPAR_FILE" fi fi rm -f /tmp/.patternlist.$$ ## Grab just the values inside the brackets locale=`echo "$locale" | sed 's/][^\[]*\[/ /g' | cut -f2 -d'[' | cut -f1 -d']'` rm -f /tmp/localelist.$$ touch /tmp/localelist.$$ for loc in $locale do echo $loc >> /tmp/localelist.$$ done locale=`cat /tmp/localelist.$$ | sort -u` for i in $locale do /usr/lib/nls/lsmle -c $i -P >> /tmp/.patternlist.$$ echo 'X11.loc.'${i}'.*' >> /tmp/.patternlist.$$ done ## Grab just the values inside the brackets language=`echo "$language" | sed 's/][^\[]*\[/ /g' | cut -f2 -d'[' | cut -f1 -d']'` rm -f /tmp/langlist.$$ touch /tmp/langlist.$$ for lang in $language do echo $lang >> /tmp/langlist.$$ done language=`cat /tmp/langlist.$$ | cut -f1 -d'.' | sort -u` for i in $language do echo '.msg.'${i} >> /tmp/.patternlist.$$ done if [[ -s /tmp/.patternlist.$$ ]] then install_device=$device lslpp -Lqc | grep -f /tmp/.patternlist.$$ | cut -f2,3 -d':' > /tmp/.installed_options.$$ if [[ ! -s /tmp/.installed_options.$$ ]] then echo '^$' >> /tmp/.installed_options.$$ fi installp -qd $install_device -L | grep -f /tmp/.patternlist.$$ | grep -vf /tmp/.installed_options.$$ | cut -f2,3 -d':' | tr ':' ' ' >> /tmp/install_list.$$ if [[ -s /tmp/install_list.$$ ]] then if [[ $INUWPAR_ENABLED == '1' ]]; then inuwpar ${INUWPAR:+$INUWPAR} installp -qQacNg $extend_fs -d $install_device -f /tmp/install_list.$$ else installp -qQacNg $extend_fs -d $install_device -f /tmp/install_list.$$ fi RC=$? else dspmsg -s 53 smit.cat 71 'Error: The selected CULTURAL convention and LANGUAGE translation require the installation of filesets which could not be found in the current input device or directory. ' >&2 rm -f /tmp/.patternlist.$$ /tmp/.installed_options.$$ /tmp/.install_list.$$ exit 1 fi fi rm -f /tmp/.patternlist.$$ /tmp/.installed_options.$$ /tmp/.install_list.$$ /tmp/install_list.$$ /tmp/langlist.$$ /tmp/localelist.$$ exit $RC } add_lang_environment echo '#device' grep "^INSTALL_DEVICE=" /var/adm/sw/__assistinfo 2>/dev/null | cut -f2 -d'='`mle_cmd_rm_lang,wpar_inst_disabled,wpar_mgmtRemove Language Environmentssmit.catremove_lang() { ## Check for RBAC enabled status. If disabled, check if root ## else check for authorization aix.system.install /usr/sbin/lsattr -El sys0 -a enhanced_RBAC |grep true > /dev/null if [[ $? -ne 0 ]] then if [[ `whoami` != root ]] then dspmsg -s 53 smit.cat 75 'Error: You must be logged in as root to run this command. ' >&2 exit 1 fi else /usr/bin/ckauth aix.system.install if [[ $? -ne 0 ]] then dspmsg -s 53 smit.cat 76 'Error: You must be logged in as an authorized user to run this command. ' >&2 exit 1 fi fi while getopts c:l:MIk: Option "$@" do case $Option in c) locale=$OPTARG;; l) language=$OPTARG;; M) INUWPAR=${INUWPAR:+"$INUWPAR "}"-G";; I) INUWPAR_ENABLED="1";; k) INUWPAR_FILE=$OPTARG;; esac done if [[ -n $INUWPAR_FILE ]]; then if [[ `head -1 $INUWPAR_FILE` == '_all_wpars' ]]; then INUWPAR=${INUWPAR:+"$INUWPAR "}"-A" else awk '{gsub(/ /,"\n");print}' < $INUWPAR_FILE > /tmp/inuwpar.$$.list mv /tmp/inuwpar.$$.list $INUWPAR_FILE INUWPAR=${INUWPAR:+"$INUWPAR "}"-f $INUWPAR_FILE" fi fi ## Grab just the values inside the brackets locale=`echo "$locale" | sed 's/][^\[]*\[/ /g' | cut -f2 -d'[' | cut -f1 -d']'` rm -f /tmp/localelist.$$ touch /tmp/localelist.$$ for loc in $locale do echo $loc >> /tmp/localelist.$$ done locale=`cat /tmp/localelist.$$ | sort -u` for i in $locale do /usr/lib/nls/lsmle -c $i -P >> /tmp/.patternlist.$$ done ## Grab just the values inside the brackets language=`echo "$language" | sed 's/][^\[]*\[/ /g' | cut -f2 -d'[' | cut -f1 -d']'` rm -f /tmp/langlist.$$ touch /tmp/langlist.$$ for lang in $language do echo $lang >> /tmp/langlist.$$ done language=`cat /tmp/langlist.$$ | cut -f1 -d'.' | sort -u` for i in $language do echo '*.msg.'${i}'*' >> /tmp/.patternlist.$$ done if [[ $INUWPAR_ENABLED == '1' ]]; then inuwpar ${INUWPAR:+$INUWPAR} installp -ugf /tmp/.patternlist.$$ else installp -ugf /tmp/.patternlist.$$ fi RC=$? rm -f /tmp/.patternlist.$$ /tmp/install_list.$$ /tmp/langlist.$$ /tmp/localelist.$$ exit $RC } remove_langmle_hierChange/Show Language Hierarchysmit.cat set_hierarchy() { ## Check for RBAC enabled status. If disabled, check if root ## else check for authorization aix.system.install /usr/sbin/lsattr -El sys0 -a enhanced_RBAC |grep true > /dev/null if [[ $? -ne 0 ]] then if [[ `whoami` != root ]] then dspmsg -s 53 smit.cat 75 'Error: You must be logged in as root to run this command. ' >&2 exit 1 fi else /usr/bin/ckauth aix.system.install if [[ $? -ne 0 ]] then dspmsg -s 53 smit.cat 76 'Error: You must be logged in as an authorized user to run this command. ' >&2 exit 1 fi fi while getopts a:b:c: Option "$@" do case $Option in a) first_lang=$OPTARG;; b) second_lang=$OPTARG;; c) third_lang=$OPTARG;; esac done echo "$first_lang" | grep -q '\[' if [[ $? -eq 0 ]] then first_lang=`echo $first_lang | cut -f2 -d'[' | cut -f1 -d']'` fi echo "$second_lang" | grep -q '\[' if [[ $? -eq 0 ]] then second_lang=`echo $second_lang | cut -f2 -d'[' | cut -f1 -d']'` fi echo "$third_lang" | grep -q '\[' if [[ $? -eq 0 ]] then third_lang=`echo $third_lang | cut -f2 -d'[' | cut -f1 -d']'` fi hierarchy=$first_lang if [[ -n $second_lang ]] then hierarchy=$hierarchy:$second_lang fi if [[ -n $third_lang ]] then hierarchy=$hierarchy:$third_lang fi chlang -m $hierarchy } set_hierarchy echo '#language1:language2:language3' langlist=`grep NLSPATH /etc/environment | sed 's/^NLSPATH=//' | sed 's/:/ /g` for current_entry in $langlist do echo $current_entry | grep -q '/usr/lib/nls/msg/' if [[ $? -eq 0 ]] then msgvalue=`echo $current_entry | sed 's-/usr/lib/nls/msg/--' | sed 's-/%N.*$--'` if [[ -n $msgvalue && $msgvalue != '%L' ]] then typeset -i valuefound=0 for i in $msglist do if [[ $i = $msgvalue ]] then (( valuefound = 1 )) fi done if [[ $valuefound = 0 ]] then msglist="$msglist $msgvalue" fi fi fi done echo $msglist | read val1 val2 val3 junk /usr/lib/nls/lsmle -l $val1 >/dev/null 2>&1 if [[ $? -eq 0 && -n $val1 ]] then val1=`/usr/lib/nls/lsmle -l $val1` fi /usr/lib/nls/lsmle -l $val2 >/dev/null 2>&1 if [[ $? -eq 0 && -n $val2 ]] then val2=`/usr/lib/nls/lsmle -l $val2` fi /usr/lib/nls/lsmle -l $val3 >/dev/null 2>&1 if [[ $? -eq 0 && -n $val3 ]] then val3=`/usr/lib/nls/lsmle -l $val3` fi echo ${val1}:${val2}:${val3}mle_list_appsList Applications Installed for a Languagesmit.catlist_app() { language=`echo "$1" | cut -f2 -d'[' | cut -f1 -d']' | cut -f1 -d'.'` lslpp -Lqc "*.msg.$language*" | sort -k2 -t':' | while read line do package_name=`echo $line | cut -f2 -d':'` package_level=`echo $line | cut -f3 -d':'` package_desc=`echo $line | cut -f8 -d':'` printf '%s %s %-60s ' $package_name $package_level "$package_desc" done } list_appmle_add_app_langAdd Language for Application Already Installedsmit.cat add_lang() { ## Check for RBAC enabled status. If disabled, check if root ## else check for authorization aix.system.install /usr/sbin/lsattr -El sys0 -a enhanced_RBAC |grep true > /dev/null if [[ $? -ne 0 ]] then if [[ `whoami` != root ]] then dspmsg -s 53 smit.cat 75 'Error: You must be logged in as root to run this command. ' >&2 exit 1 fi else /usr/bin/ckauth aix.system.install if [[ $? -ne 0 ]] then dspmsg -s 53 smit.cat 76 'Error: You must be logged in as an authorized user to run this command. ' >&2 exit 1 fi fi while getopts d:l:S:X Option "$@" do case $Option in d) device=$OPTARG;; l) language=$OPTARG;; S) software=$OPTARG;; X) extend_fs=-X;; esac done install_device=$device ALL_VALUE=`dspmsg -s 53 smit.cat 65 'ALL'` if [[ $software = $ALL_VALUE ]] then lslpp -Lqc "*.msg.$language*" 2>/dev/null | cut -f2,3 -d':' > /tmp/msg_installed.$$ if [[ ! -s /tmp/msg_installed.$$ ]] then echo '^$' >> /tmp/msg_installed.$$ ]] fi installp -qd $install_device -L | grep .msg.$language | grep -vf /tmp/msg_installed.$$ | cut -f2,3 -d':' | tr ':' ' ' > /tmp/msg_list.$$ if [[ -s /tmp/msg_list.$$ ]] then installp -qQacNg $extend_fs -d $install_device -f /tmp/msg_list.$$ RC=$? fi rm -f /tmp/msg_list.$$ /tmp/msg_installed.$$ else installp -qQacNg $extend_fs -d $install_device $software RC=$? fi exit $RC } add_langecho '#all_value' dspmsg -s 53 smit.cat 65 'ALL' echomle_rmlang_dlgRemove Language for Applicationssmit.catremove_lang() { ## Check for RBAC enabled status. If disabled, check if root ## else check for authorization aix.system.install /usr/sbin/lsattr -El sys0 -a enhanced_RBAC |grep true > /dev/null if [[ $? -ne 0 ]] then if [[ `whoami` != root ]] then dspmsg -s 53 smit.cat 75 'Error: You must be logged in as root to run this command. ' >&2 exit 1 fi else /usr/bin/ckauth aix.system.install if [[ $? -ne 0 ]] then dspmsg -s 53 smit.cat 76 'Error: You must be logged in as an authorized user to run this command. ' >&2 exit 1 fi fi while getopts l:a: Option "$@" do case $Option in l) language=$OPTARG;; a) lpps=$OPTARG;; esac done ALLVALUE=`dspmsg -s 53 smit.cat 65 'ALL'` if [[ $lpps = $ALLVALUE ]] then installp -ug *.msg.$language* else installp -ug $lpps fi } remove_langecho '#all_value' dspmsg -s 53 smit.cat 65 'ALL' echomle_user_optsSet User Languagessmit.cat set_hierarchy() { while getopts u:p:a:b:c: Option "$@" do case $Option in u) username=$OPTARG;; p) primary=$OPTARG;; a) first_lang=$OPTARG;; b) second_lang=$OPTARG;; c) third_lang=$OPTARG;; esac done echo "$primary" | grep -q '\[' if [[ $? -eq 0 ]] then primary=`echo $primary | cut -f2 -d'[' | cut -f1 -d']'` fi echo "$first_lang" | grep -q '\[' if [[ $? -eq 0 ]] then first_lang=`echo $first_lang | cut -f2 -d'[' | cut -f1 -d']'` fi echo "$second_lang" | grep -q '\[' if [[ $? -eq 0 ]] then second_lang=`echo $second_lang | cut -f2 -d'[' | cut -f1 -d']'` fi echo "$third_lang" | grep -q '\[' if [[ $? -eq 0 ]] then third_lang=`echo $third_lang | cut -f2 -d'[' | cut -f1 -d']'` fi hierarchy='' SepChar='' if [[ -n ${first_lang} ]] then hierarchy=${first_lang} SepChar=':' fi if [[ -n ${second_lang} ]] then hierarchy=${hierarchy}${SepChar}${second_lang} SepChar=':' fi if [[ -n ${third_lang} ]] then hierarchy=${hierarchy}${SepChar}${third_lang} fi if [[ -z $hierarchy || $hierarchy = $primary ]] then chlang -u $username -M $primary else chlang -u $username -m $hierarchy $primary fi } set_hierarchyfunction FindLanguages { lsuser $1 >/dev/null if [[ $? -ne 0 ]] then exit 1 fi HOMEDIR=`lsuser -a home $1 | cut -f2 -d'=' | awk '{ print $1 }'` SEARCHFILE=/etc/environment grep -q "^LANG=" $HOMEDIR/.profile 2>/dev/null if [[ $? -eq 0 ]] then SEARCHFILE=$HOMEDIR/.profile fi primary_lang=`grep "^LANG=" $SEARCHFILE | cut -f2 -d'='` SEARCHFILE=/etc/environment grep -q "^NLSPATH=" $HOMEDIR/.profile 2>/dev/null if [[ $? -eq 0 ]] then SEARCHFILE=$HOMEDIR/.profile fi langlist=`grep "^NLSPATH=" $SEARCHFILE | sed 's/^NLSPATH=//'` IFS=':' for current_entry in $langlist do echo $current_entry | grep -q '/usr/lib/nls/msg/' if [[ $? -eq 0 ]] then msgvalue=`echo $current_entry | sed 's-/usr/lib/nls/msg/--' | sed 's-/%N.*$--'` if [[ -n $msgvalue && $msgvalue != '%L' ]] then typeset -i valuefound=0 IFS=' ' for i in $msglist do if [[ $i = $msgvalue ]] then (( valuefound = 1 )) fi done if [[ $valuefound = 0 ]] then msglist="${msglist} ${msgvalue}" fi fi fi done IFS=' ' echo $msglist | read val1 val2 val3 junk /usr/lib/nls/lsmle -c $primary_lang >/dev/null 2>&1 if [[ $? -eq 0 && -n $primary_lang ]] then primary_lang=`/usr/lib/nls/lsmle -c $primary_lang` fi /usr/lib/nls/lsmle -l $val1 >/dev/null 2>&1 if [[ $? -eq 0 && -n $val1 ]] then val1=`/usr/lib/nls/lsmle -l $val1` fi /usr/lib/nls/lsmle -l $val2 >/dev/null 2>&1 if [[ $? -eq 0 && -n $val2 ]] then val2=`/usr/lib/nls/lsmle -l $val2` fi /usr/lib/nls/lsmle -l $val3 >/dev/null 2>&1 if [[ $? -eq 0 && -n $val3 ]] then val3=`/usr/lib/nls/lsmle -l $val3` fi echo '#username:primary_lang:language1:language2:language3' echo $1:${primary_lang}:${val1}:${val2}:${val3} } FindLanguages $1_rawnameList All Resource Setsrsetcntl.catlsrset -Xavrsetcntl.catlsrsetOptList All Resource Sets in a given namespacersetcntl.catlsrset -Xvnrsetcntl.catList All System RADsrsetcntl.catlsrset -Xvn sysrsetcntl.catList Application-defined Resource Setsrsetcntl.catapplist () { lsrset -Xav | awk 'NR==1 || $1=="a" {print}'; }; applistrsetcntl.catrmrsetCmdOptRemove Application-defined Resource Setsrsetcntl.catrsetcntl -rrsetcntl.catlsrsetprocOptShow a Process Partitionrsetcntl.catlsrset -prsetcntl.catList All Resource Sets of the Databasersetcntl.cattest -f /etc/rsets || exit 0; exec < /etc/rsets || exit 1; sed -n 's?^\([^ ].*/.*\):[ ]*$?\1?p'rsetcntl.cataddrsetOptAdd a Resource Set to the Databasersetcntl.cataddsysrset () { name_resource=$1/$2; owner=$3; group=$4; perm=$5$6$7; resources=$8 if grep "^$name_resource":$ /etc/rsets >/dev/null 2>&1 then dspmsg -s 10 rsetcntl.cat 100 '%s already exists in the database' "$name_resource" echo; echo awk -F: -vn="$name_resource" 'NF==2 {if(p) exit; if(n==$1) p=1;} {if(p) print;}' /etc/rsets exit 1 fi echo "$1"|grep '^[a-zA-Z0-9][-_.a-zA-Z0-9]*$' >/dev/null || { dspmsg -s 10 rsetcntl.cat 101 'Invalid Name Space: %s' "$1" echo; echo exit 1 } [ "$1" = sys ] && { dspmsg -s 10 rsetcntl.cat 102 '"sys" is a reserved Name Space' echo; echo exit 1 } echo "$2"|grep '^[a-zA-Z0-9][-_.a-zA-Z0-9]*$' >/dev/null || { dspmsg -s 10 rsetcntl.cat 103 'Invalid Resource Set Name: %s' "$2" echo; echo exit 1 } if cat >> /etc/rsets </dev/null|awk -v u=`id -nu` -v g=`id -ng` -v p=rwr-r- ' /^default:$/ {d=1;next} /^[^ ]/ {if(d==1) exit} d==1 {l=split($0,t); if(l<3 || t[2]!="=") next; if(t[1]=="owner") u=t[3] if(t[1]=="group") g=t[3] if(t[1]=="perm") p=t[3] if(t[1]=="resources") r=t[3] } END {printf "::%s:%s:%s:%s:%s:%s:\n",u,g,substr(p,1,2),substr(p,3,2),substr(p,5,2),r;}' exit 0rsetcntl.catrmrsetcntlCmdOptRemove a Resource Set from the Databasersetcntl.catremovesysrset () { name_resource="$1" >> /etc/rsets || exit 1 if ! grep "^$name_resource:" /etc/rsets >/dev/null 2>&1 then exit 1 fi last=`sed -n '/^[^ ].*:[ ]*$/p' /etc/rsets | tail -1` if [ $last = "$name_resource": ] then ed -s /etc/rsets >/dev/null </dev/null <> /etc/rsets || exit 1 if grep "^$name_resource:" /etc/rsets >/dev/null 2>&1 then last=`sed -n '/^[^ ].*:[ ]*$/p' /etc/rsets | tail -1` if [ $last = "$name_resource": ] then ed -s /etc/rsets >/dev/null </dev/null <> /etc/rsets </dev/null 2>&1 then echo "$1:::::::" exit 1 fi cat /etc/rsets 2>/dev/null|awk -vrset="$1" ' /^default:$/ {if(d==0) d=2; next} /^[^ ]/ {if(d==3) exit; d=1; x=split($0,t,":"); if(x>=1 && t[1]==rset) d=3; next; } d>1 {l=split($0,t); if(l<3 || t[2]!="=") next; if(t[1]=="owner") u=t[3] if(t[1]=="group") g=t[3] if(t[1]=="perm") p=t[3] if(t[1]=="resources") r=t[3] } END {printf "%s:%s:%s:%s:%s:%s:%s:\n",rset,u,g,substr(p,1,2),substr(p,3,2),substr(p,5,2),r;}' exit 0 } listsysrset _rawnamersetcntl.catreloadrsetOptReload Resource Set Databasersetcntl.catreloadsysrset () { while getopts 'bn' OPTION $*; do case $OPTION in n) rsetcntl -d ;; b) if lsitab rset >/dev/null then chitab "rset:2:once:/usr/sbin/rsetcntl -d > /dev/console 2>&1" else mkitab -i rc "rset:2:once:/usr/sbin/rsetcntl -d > /dev/console 2>&1" fi ;; esac done }; reloadsysrsetrsetcntl.catcorepath_chgdOptsChange the Directory to which Core file is copied smit.catsyscorepath -p Reset the Directory to which Core file is copied smit.catsyscorepath -cShow the Directory to which Core file is copied smit.catsyscorepath -gset_ffdcAdvanced First Failure Data Capture Featurescmdtrace.cat/usr/lib/ras/ffdcctrlprint '#ffdc_currentState'; /usr/lib/ras/ffdcctrl -qcmdtrace.cat/usr/lib/ras/rasctrl -q k_recoverychange_recoveryChange Next Boot Kernel Recovery Statecmdtrace.cat/usr/lib/ras/rasctrlprint '#k_recovery_currentState:k_recovery_nextbootState'; /usr/lib/ras/rasctrl -f : -q k_recovery:current -q k_recovery:nextboot;te_tsd_add_optAdd a new Trusted File to TSDtrustchk.catx() { /usr/sbin/trustchk -s $2 -v $3 -a $1 } xte_tsd_delete_optDelete a Trusted File from TSDtrustchk.catx() { /usr/sbin/trustchk -d $1 } xte_policy_optsChange/Show Trusted Pathstrustchk.catx() { /usr/sbin/trustchk -p TE=$1 CHKEXEC=$2 CHKSHLIB=$3 CHKSCRIPT=$4 CHKKERNEXT=$5 STOP_UNTRUSTD=$6 STOP_ON_CHKFAIL=$7 TSD_FILES_LOCK=$8 TSD_LOCK=$9 shift shift /usr/sbin/trustchk -p TEP=$8 TLP=$9 } xx() { echo "#"TE:CHKEXEC:CHKSHLIB:CHKSCRIPT:CHKKERNEXT:STOP_UNTRUSTD:STOP_ON_CHKFAIL:TSD_FILES_LOCK:TSD_LOCK:TEP:TLP status= for var in `/usr/sbin/trustchk -p 3>&1 1>&2 2>&3 | /usr/bin/sed s/' '//g` do if ! [ $status ] then status=`echo $var | /usr/bin/cut -f 2 -d '='` else status=$status:`echo $var | /usr/bin/cut -f 2 -d '='` fi done echo $status } x_rawnamete_tppol_optionsChange/Show Trusted Pathstrustchk.catx() { TPATHS=`echo $1 | /usr/bin/sed s/' '//g | /usr/bin/sed s/','/':'/g` echo $1 | /usr/bin/sed s/' '//g | /usr/bin/grep TLP= 2>/dev/null 1>dev/null if [ $? -eq 0 ] then /usr/sbin/trustchk -p $TPATHS else /usr/sbin/trustchk -p $TPATHS fi } xx() { echo "#"tpaths if [ $1 = TEP ] then val2=`/usr/sbin/trustchk -p TEP 3>&1 1>&2 2>&3 | /usr/bin/grep : | /usr/bin/cut -f 2 -d '=' | /usr/bin/sed s/' '//g | /usr/bin/sed s/':'/','/g` echo TEP=$val2 elif [ $1 = TLP ] then val2=`/usr/sbin/trustchk -p TLP 3>&1 1>&2 2>&3 | /usr/bin/grep : | /usr/bin/cut -f 2 -d '=' | /usr/bin/sed s/' '//g | /usr/bin/sed s/':'/','/g` echo TLP=$val2 fi } x_rawnameView Storage Protection Keys Default Settingsskeyctl.cat/usr/sbin/skctl -v defaultView Storage Protection Keys Settings At Next Boot Sessionskeyctl.cat/usr/sbin/skctl -v bootView Storage Protection Keys Current Settingsskeyctl.cat/usr/sbin/skctl -v nowskctl_change_optsChange Next Boot Storage Protection Keys Settingsskeyctl.cat/usr/sbin/skctl -V/usr/sbin/skctl -SList Current Editionchedition.cat/usr/sbin/chedition -lchange_edition_optsChange Editionchedition.cat/usr/sbin/chedition ps_chpq_attach_qnameOpt,ps_chpq_attach_remoteCmdHdrOptChange / Show Remote Spooling Characteristicspiosmit.cat/usr/sbin/chvirprtfunction x { /usr/lib/lpd/pio/etc/pioevattr -q $1 -d $2 mL 2>/dev/null }; xqueue_name queue_deviceps_chpq_attach_qnameOpt,ps_chpq_attach_accountOptChange / Show Accounting File Namesmit.cat/usr/bin/chque/usr/bin/lsque -c -qqueue_nameps_chpq_attach_qnameOpt,ps_chpq_attach_disciplineOptChange / Show Queuing Disciplinesmit.cat/usr/bin/chque/usr/bin/lsque -c -qqueue_nameps_chprinter_xstaCmdHdrOptChange / Show Printer Connection Characteristicssmit.cat/usr/lib/lpd/pio/etc/piomgpdev -t xstation -C/usr/lib/lpd/pio/etc/piomgpdev -t xstation -D -a speed -a parity -a bpc -a stops -a interface -a port -a xstation -pxsta_printerps_lsvirprtCmdHdrOptChange / Show Printer Attribute Database (Virtual Printers)piosmit.cat/usr/sbin/lsvirprt -ips_run_config_optPIOSMIT=1; export PIOSMIT; /usr/sbin/mkvirprtps_mkpq_remoteOptGroup1,ps_mkpq_remoteOptGroup2,ps_mkpq_remoteOptGroup3,ps_mkpq_remoteOptGroup6,ps_mkpq_remoteOptGroup7,ps_mkpq_remoteOptGroup8Add a Remote Print Queue with NFS Accesspiosmit.cat/usr/lib/lpd/pio/etc/piomisc_ext mkpq_remote_ext -m aixprint '#server_type' print $(/usr/bin/dspmsg -s 1 piosmit.cat 96 'AIX Version 4') ps_mkpq_remoteOptGroup2,ps_mkpq_remoteOptGroup3,ps_mkpq_remoteOptGroup4,ps_mkpq_remoteOptGroup6,ps_mkpq_remoteOptGroup7Add a Standard Remote Print Queuepiosmit.cat/usr/lib/lpd/pio/etc/piomisc_ext mkpq_remote_ext ps_qprt_common1Opt,ps_qprt_common4Opt,ps_qprt_remote_commonOptStart a Print Jobsmit.cat/usr/bin/enqps_qprt_common1Opt,ps_qprt_common3Opt,ps_qprt_common4Opt,ps_qprt_remote_commonOptStart a Print Jobsmit.cat/usr/bin/enqps_qprt_common1Opt,ps_qprt_bsdCmdHdrOptStart a Print Jobsmit.cat/usr/bin/lprps_rmpq_genericCmdHdrOpt,ps_rmpq_CmdHdr_otherOpt/usr/lib/lpd/pio/etc/piomisc_ext rmpq_other function x { print '#remove_queue:attach_type' print $1#!:$2:$3 }; xqueue_name queue_device attach_typeps_rmpq_CmdHdr_localOpt,ps_rmpq_CmdHdr_local_lastOptRemove a Print Queuesmit.cat/usr/lib/lpd/pio/etc/piomisc_ext rmpq_local_last function x { print '#remove_queue:device' print $1#!:$2:$3 }; xqueue_name queue_device deviceps_rmpq_CmdHdr_localOpt/usr/lib/lpd/pio/etc/piomisc_ext rmpq_local function x { print '#remove_queue' print $1#!:$2:$3 }; xqueue_name queue_deviceList All VirtIO SCSI Adaptersvrtscsi.catlsdev -p pci0vrtscsi_chgChange/Show Characteristics of a Virtual SCSI Adaptervrtscsi.catchdev lsattr -l logicname -E -Otty_add,tty_vconsddAdd a TTYsmit.catmkdev -c tty attribs () { l1=$( lsattr -c tty -s $1 -t $2 -D -O ) l11=$( echo "$l1" | head -1 ) l12=$( echo "$l1" | tail -1 ) l2=$( lsattr -l $3 -D -O ) l21=$( echo "$l2" | head -1 | sed -e 's/.//' ) l22=$( echo "$l2" | tail -1 ) echo "$l11:$l21" echo "$l12:$l22" } attribs subclass type parenttty_chg,tty_vconsddChange/Show Characteristics of a TTYsmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_vnicChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Ompiopath_pcmchg_PCM/friend/vscsi_optAIX MPIO VSCSI PCM Change Path Characteristicsaixpcm.catchpath discover(){ set -- $1 priority=`lspath -A -l $2 -p $4 -w $5 -a priority -F value` echo '#lname:path_id:parent:connection:state:priority:' echo $2':'$3':'$4':'$5':'$1':'$priority }; discoverpathmpiodev_pcmchg_PCM/friend/vscsi_optAIX VSCSI PCM Change Device Characteristicsaixpcm.catchdev discover(){ type=`lsdev -l $1 -F PdDvLn` pcm=vscsi policy=`lsattr -E -l $1 -Fvalue -a reserve_policy` algorithm=`lsattr -E -l $1 -Fvalue -a algorithm` hcmode=`lsattr -El $1 -Fvalue -a hcheck_mode` hcint=`lsattr -El $1 -Fvalue -a hcheck_interval` hccmd=`lsattr -El $1 -Fvalue -a hcheck_cmd` echo '#lname:policy:algorithm:pcm:type:hcmode:hcint:hccmd' echo $1':'$policy':'$algorithm':'$pcm':'$type':'$hcmode':'$hcint':'$hccmd }; discoverdevname _cookednameList All Virtual SCSI Adaptersvscsi_init.catlsparent -C -k vscsivclient_chgChange/Show Characteristics of a Virtual SCSI Adaptervscsi_init.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_vioentChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Ocdrom_chg,cdrom_usbif_commonChange/Show Characteristics of a CD ROM Drivesmit.catchdev lsattr -l logicname -E -Omkwacom_cmd_opt/usr/lpp/X11/bin/serinstall -a 1 -d wactablet/usr/lpp/X11/bin/serinstall -a 0 -d wactabletmk6093_cmd_opt/usr/lpp/X11/bin/serinstall -a 1 -d caltablet/usr/lpp/X11/bin/serinstall -a 0 -d caltabletList All Defined Target Mode Initiator Devicessas.catlsdev -C -c tmscsiList All Supported Target Mode Initiator Devicessas.catlsdev -P -c tmscsi -F "type subclass description"tmscsi_add,tmscsi_commonAdd a Target Mode Initiator Devicesas.catmkdev -c tmscsilsattr -c tmscsi-s subclass -t type -D -Otmscsi_chg,tmscsi_commonChange/Show Characteristics of a Target Mode Initiator Devicesas.catchdev lsattr -l logicname -E -Otmscsi_chg,tmscsi_commonChange/Show Characteristics of a Target Mode Initiator Devicesas.catchdev lsattr -l logicname -E -Otmscsi_chg,tmscsi_commonChange/Show Characteristics of a Target Mode Initiator Devicesas.catchdev lsattr -l logicname -E -Otmscsi_chg,tmscsi_commonChange/Show Characteristics of a Target Mode Initiator Devicesas.catchdev lsattr -l logicname -E -Otmscsi_chg,tmscsi_commonChange/Show Characteristics of a Target Mode Initiator Devicesas.catchdev lsattr -l logicname -E -Otmscsi_chg,tmscsi_commonChange/Show Characteristics of a Target Mode Initiator Devicesas.catchdev lsattr -l logicname -E -Otmscsi_chg,tmscsi_commonChange/Show Characteristics of a Target Mode Initiator Devicesas.catchdev lsattr -l logicname -E -Otmscsi_chg,tmscsi_commonChange/Show Characteristics of a Target Mode Initiator Devicesas.catchdev lsattr -l logicname -E -Otmscsi_chg,tmscsi_commonChange/Show Characteristics of a Target Mode Initiator Devicesas.catchdev lsattr -l logicname -E -Otmscsi_chg,tmscsi_commonChange/Show Characteristics of a Target Mode Initiator Devicesas.catchdev lsattr -l logicname -E -Otmscsi_chg,tmscsi_commonChange/Show Characteristics of a Target Mode Initiator Devicesas.catchdev lsattr -l logicname -E -Otmscsi_chg,tmscsi_commonChange/Show Characteristics of a Target Mode Initiator Devicesas.catchdev lsattr -l logicname -E -Otmscsi_chg,tmscsi_commonChange/Show Characteristics of a Target Mode Initiator Devicesas.catchdev lsattr -l logicname -E -Otmscsi_chg,tmscsi_commonChange/Show Characteristics of a Target Mode Initiator Devicesas.catchdev lsattr -l logicname -E -Otmscsi_chg,tmscsi_commonChange/Show Characteristics of a Target Mode Initiator Devicesas.catchdev lsattr -l logicname -E -Ormvtmscsi_optRemove a Target Mode Initiator Devicesas.catrmdev cfgtmscsi_optConfigure a Defined Target Mode Initiator Devicesas.catmkdev List All Defined Tape Drivessmit.catlsdev -C -c tapeList All Supported Tape Drivessmit.catlsdev -P -c tape -F "type subclass description"tape_add,tape_common,tape_8mmAdd a Tape Drivesmit.catmkdev -c tape lsattr -c tape-s subclass -t type -D -Otape_add,tape_common,tape_9trkAdd a Tape Drivesmit.catmkdev -c tape lsattr -c tape-s subclass -t type -D -Otape_add,tape_common,tape_quarterAdd a Tape Drivesmit.catmkdev -c tape lsattr -c tape-s subclass -t type -D -Otape_add,tape_common,tape_525mbAdd a Tape Drivesmit.catmkdev -c tape lsattr -c tape-s subclass -t type -D -Otape_add,tape_common,tape_1200mb-cAdd a Tape Drivesmit.catmkdev -c tape lsattr -c tape-s subclass -t type -D -Otape_add,tape_common,tape_ostAdd a Tape Drivesmit.catmkdev -c tape lsattr -c tape-s subclass -t type -D -Otape_addAdd a Tape Drivesmit.catmkdev -c tape lsattr -c tape-s subclass -t type -D -Otape_chg,tape_common,tape_8mmChange/Show Characteristics of a Tape Drivesmit.catchdev lsattr -l logicname -E -Otape_chg,tape_common,tape_9trkChange/Show Characteristics of a Tape Drivesmit.catchdev lsattr -l logicname -E -Otape_chg,tape_common,tape_quarterChange/Show Characteristics of a Tape Drivesmit.catchdev lsattr -l logicname -E -Otape_chg,tape_common,tape_525mbChange/Show Characteristics of a Tape Drivesmit.catchdev lsattr -l logicname -E -Otape_chg,tape_common,tape_1200mb-cChange/Show Characteristics of a Tape Drivesmit.catchdev lsattr -l logicname -E -Otape_chg,tape_common,tape_ostChange/Show Characteristics of a Tape Drivesmit.catchdev lsattr -l logicname -E -Otape_chg,tape_common,tape_scsi_ostChange/Show Characteristics of a Tape Drivesmit.catchdev lsattr -l logicname -E -Otape_chg,tape_common,tape_scsi_scsdChange/Show Characteristics of a Tape Drivesmit.catchdev lsattr -l logicname -E -Ormvtpe_optRemove a Tape Drivesmit.catrmdev cfgtpe_optConfigure a Defined Tape Drivesmit.catmkdev tape_add,tape_common,tape_8mm5gbAdd a Tape Drivesmit.catmkdev -c tape lsattr -c tape-s subclass -t type -D -Otape_chg,tape_common,tape_8mm5gbChange/Show Characteristics of a Tape Drivesmit.catchdev lsattr -l logicname -E -Otape_add,tape_common,tape_8mm7gbAdd a Tape Drivesmit.catmkdev -c tape lsattr -c tape-s subclass -t type -D -Otape_chg,tape_common,tape_8mm7gbChange/Show Characteristics of a Tape Drivesmit.catchdev lsattr -l logicname -E -Otape_add,tape_common,tape_4mm2gbAdd a Tape Drivesmit.catmkdev -c tape lsattr -c tape-s subclass -t type -D -Otape_chg,tape_common,tape_4mm2gbChange/Show Characteristics of a Tape Drivesmit.catchdev lsattr -l logicname -E -Otape_add,tape_common,tape_4mm4gbAdd a Tape Drivesmit.catmkdev -c tape lsattr -c tape-s subclass -t type -D -Otape_chg,tape_common,tape_4mm4gbChange/Show Characteristics of a Tape Drivesmit.catchdev lsattr -l logicname -E -Otape_add,tape_common,tape_3490eAdd a Tape Drivesmit.catmkdev -c tape lsattr -c tape-s subclass -t type -D -Otape_chg,tape_common,tape_3490eChange/Show Characteristics of a Tape Drivesmit.catchdev lsattr -l logicname -E -Otape_chg,tape_common,tape_scsdChange/Show Characteristics of a Tape Drivesmit.catchdev lsattr -l logicname -E -Otape_chg,tape_common,tape_sas_scsdChange/Show Characteristics of a Tape Drivesmit.catchdev lsattr -l logicname -E -Otape_chg,tape_common,tape_sas_ostChange/Show Characteristics of a Tape Drivesmit.catchdev lsattr -l logicname -E -Otape_chg,tape_common,tape_vscsi_scsdChange/Show Characteristics of a Tape Drivesmit.catchdev lsattr -l logicname -E -Otape_chg,tape_common,tape_vscsi_ostChange/Show Characteristics of a Tape Drivesmit.catchdev lsattr -l logicname -E -Otape_chg,tape_common,tape_usbif_0806500cChange/Show Characteristics of a Tape Drivesmit.catchdev lsattr -l logicname -E -Otape_add,tape_common,tape_4mm2gb2Add a Tape Drivesmit.catmkdev -c tape lsattr -c tape-s subclass -t type -D -Otape_chg,tape_common,tape_4mm2gb2Change/Show Characteristics of a Tape Drivesmit.catchdev lsattr -l logicname -E -OList All Defined CD ROM Drivessmit.catlsdev -C -c cdromList All Supported CD ROM Drivessmit.catlsdev -P -c cdrom -F "type subclass description"cdrom_add,cdrom_commonAdd a CD ROM Drivesmit.catmkdev -c cdromlsattr -c cdrom-s subclass -t type -D -Ocdrom_add,cdrom_common,cdrom_oscd_commonAdd a CD ROM Drivesmit.catmkdev -c cdromlsattr -c cdrom-s subclass -t type -D -Ocdrom_chg,cdrom_commonChange/Show Characteristics of a CD ROM Drivesmit.catchdev lsattr -l logicname -E -Ocdrom_chg,cdrom_common,cdrom_oscd_commonChange/Show Characteristics of a CD ROM Drivesmit.catchdev lsattr -l logicname -E -Ocdrom_fcp_chg,cdrom_commonChange/Show Characteristics of a CD ROM Drivesmit.catchdev lsattr -l logicname -E -Ocdrom_fcp_chg,cdrom_common,cdrom_oscd_commonChange/Show Characteristics of a CD ROM Drivesmit.catchdev lsattr -l logicname -E -Ocdrom_iscsi_chg,cdrom_commonChange/Show Characteristics of a CD ROM Drivesmit.catchdev lsattr -l logicname -E -Ocdrom_iscsi_chg,cdrom_common,cdrom_oscd_commonChange/Show Characteristics of a CD ROM Drivesmit.catchdev lsattr -l logicname -E -Ormvcdr_optRemove a CD ROM Drivesmit.catrmdev cfgcdr_optConfigure a Defined CD ROM Drivesmit.catmkdev List All Defined R/W Optical Drivessmit.catlsdev -C -c rwopticalList All Supported R/W Optical Drivessmit.catlsdev -P -c rwoptical -F "type subclass description"rwopt_add,rwopt_commonAdd a R/W Optical Drivesmit.catmkdev -c rwopticallsattr -c rwoptical-s subclass -t type -D -Orwopt_add,rwopt_common,rwopt_osomd_commonAdd a R/W Optical Drivesmit.catmkdev -c rwopticallsattr -c rwoptical-s subclass -t type -D -Orwopt_chg,rwopt_commonChange/Show Characteristics of a R/W Optical Drivesmit.catchdev lsattr -l logicname -E -Orwopt_chg,rwopt_common,rwopt_osomd_commonChange/Show Characteristics of a R/W Optical Drivesmit.catchdev lsattr -l logicname -E -Orwopt_fcp_chg,rwopt_commonChange/Show Characteristics of a R/W Optical Drivesmit.catchdev lsattr -l logicname -E -Orwopt_fcp_chg,rwopt_common,rwopt_osomd_commonChange/Show Characteristics of a R/W Optical Drivesmit.catchdev lsattr -l logicname -E -Ormvomd_optRemove a R/W Optical Drivesmit.catrmdev cfgomd_optConfigure a Defined R/W Optical Drivesmit.catmkdev List All SAS Adapterssas.catlsparent -C -k mpt_protocol;lsparent -C -k sis_protocol;lsparent -C -k mptscsiList All SAS SCSI Protocol Devicessas.catlsparent -C -k sasnvme_list.doList NVMe Storage Configurationnvmemgr.catfunction list { for i in $1 do nvmemgr -S -l $i done } list_nvme_cfg_adapConfigure a Defined NVMe Controllernvmemgr.catcfgmgr nvmectrl_name,nvmectrl_dsl,nvmectrl_pcieChange / Show Characteristics of a NVMe Controllernvmemgr.catchdev lsattr -l logicname -E -Onvmectrl_name,nvmectrl_dsl,nvmectrl_remote,nvmectrl_nchnChange / Show Characteristics of a NVMe Controllernvmemgr.catchdev lsattr -a addr_family -a nchan -a port_id -a trans_type -l logicname -E -Onvmectrl_name,nvmectrl_dsl,nvmectrl_remote,nvmectrl_connected,nvmectrl_nchnChange / Show Characteristics of a NVMe Controllernvmemgr.catchdev lsattr -a addr_family -a connected_ctlr -a nchan -a port_id -a trans_type -l logicname -E -Onvmectrl_name,nvmectrl_dsl,nvmectrl_remoteChange / Show Characteristics of a NVMe Controllernvmemgr.catchdev lsattr -a addr_family -a port_id -a trans_type -l logicname -E -O_create_nsCreate a Namespacenvmemgr.catnvmemgr -C _attach_nsAttach a Namespacenvmemgr.catnvmemgr -X_delete_nsDelete a Namespacenvmemgr.catnvmemgr -R_detach_nsDetach a Namespacenvmemgr.catnvmemgr -Umpiopath_pcmchg_PCM/friend/nvmdisk_optAIX MPIO NVM Path Characteristicsnvmemgr.catchpath discover(){ set -- $1 echo '#lname:path_id:parent:connection:state' echo $2':'$3':'$4':'$5':'$1 }; discoverpathmpiodev_pcmchg_PCM/friend/nvmdisk_optAIX MPIO NVM Device Characteristicsnvmemgr.cat discover() { pvid=`lsattr -E -l $1 -F value -a pvid` recovery_wait=`lsattr -E -l $1 -F value -a recovery_wait` size_in_mb=`lsattr -E -l $1 -F value -a size_in_mb` unique_id=`lsattr -El $1 -F value -a unique_id` echo '#lname:pvid:recovery_wait:size_in_mb:unique_id' echo $1':'$pvid':'$recovery_wait':'$size_in_mb':'$unique_id } discover devnameenet_chg,enet_chg_shientChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_shientChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_shientChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_musentChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_musentChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_musentChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_nmentChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_nmentChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_nmentChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_nmentChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_lnc2entChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_lnc2entChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_lnc2entChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_lnc2entChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_elxentChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_elxent,a2191007d203000_media_speedChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_elxentChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_elxentChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_elxentChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_elxentChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_kxentChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_msnentChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_msnentChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Ojas2async_chgChange/Show Characteristics of a PCIe 2-port Async EIA-232 Adapterasync_pcie.catx() { rmdev -R $1 $2 chdev $* [ $? -ne 0 ] && exit 1 cfgmgr $1 $2 } xlsattr -l logicname -E -OList PCIe 2-port Async EIA-232 Adapterasync_pcie.catlsdev -C -c adapter -t 4f11f6002204000 -H/usr/lib/methods/async_pcie.catenet_chg,enet_chg_rrhba_cx4Change/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_rrhba_cx4Change/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_rrhba_srChange/Show Characteristics of a Host Bus Adaptersmit.catchdev lsattr -l logicname -E -Ojas2async_chgChange/Show Characteristics of a PCIe Async EIA-232 Controllerasync_pcie.catx() { rmdev -R $1 $2 chdev $* [ $? -ne 0 ] && exit 1 cfgmgr $1 $2 } xlsattr -l logicname -E -OList PCIe Async EIA-232 Controllerasync_pcie.catlsdev -C -c adapter -t 151438c1 -H/usr/lib/methods/async_pcie.catCryptChangeGeneric,CryptChangeY4CryptChange/Show Characteristics of a Cryptographic Adaptersmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_goent,14106803_pci_failover,14106803_media_speedChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -OCryptChangeGeneric,CryptChangeSNCryptChange/Show Characteristics of a Cryptographic Adaptersmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_goent,14104003_pci_failover,14104003_media_speedChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_goent,14103f03_pci_failover,14103f03_media_speedChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -OCryptChangeGeneric,CryptChangeCRYPT4769Change/Show Characteristics of a Cryptographic Adaptersmit.catchdev lsattr -l logicname -E -OList All VirtIO SCSI Adaptersvrtscsi.catlsdev -p pci0vrtscsi_chgChange/Show Characteristics of a Virtual SCSI Adaptervrtscsi.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_vrtentChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_bent,e414a816_chksum_offloadChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oexar2async_chgChange/Show Characteristics of a Native 2-Port EIA-232 PCI Adapterdevices.catx() { rmdev -R $1 $2 chdev $* [ $? -ne 0 ] && exit 1 cfgmgr $1 $2 } xlsattr -l logicname -E -OList Native 2-Port EIA-232 PCI Adaptersdevices.catlsdev -C -c adapter -t a8135201 -Hjas2async_chgChange/Show Characteristics of a 2-Port Asynchronous EIA-232 PCI Adapterdevices.catx() { rmdev -R $1 $2 chdev $* [ $? -ne 0 ] && exit 1 cfgmgr $1 $2 } xlsattr -l logicname -E -OList 2-Port Asynchronous EIA-232 PCI Adaptersdevices.catlsdev -C -c adapter -t 4f11c800 -Htty_add,tty_common,tty_jasddAdd a TTYsmit.catmkdev -c tty attribs () { l1=$( lsattr -c tty -s $1 -t $2 -D -O ) l11=$( echo "$l1" | head -1 ) l12=$( echo "$l1" | tail -1 ) l2=$( lsattr -l $3 -D -O | sed -e 's/\\/\\\\\\\\/g' ) l21=$( echo "$l2" | head -1 | sed -e 's/.//' ) l22=$( echo "$l2" | tail -1 ) echo "$l11:$l21" echo "$l12:$l22" } attribs subclass type parenttty_chg,tty_common,tty_jasddChange/Show Characteristics of a TTYsmit.catchdev lsattr -l logicname -E -Ocxp8async_chgChange/Show Characteristics of a IBM 8-Port EIA-232/RS-422A (PCI) Adapterdevices.catx() { rmdev -R $1 $2 chdev $* [ $? -ne 0 ] && exit 1 cfgmgr $1 $2 } xlsattr -l logicname -E -OList 8-Port PCI Async Adaptersdevices.catlsdev -C -c adapter -t 4f111100 -Htty_add,tty_common,tty_cxmaddAdd a TTYsmit.catmkdev -c tty attribs () { l1=$( lsattr -c tty -s $1 -t $2 -D -O ) l11=$( echo "$l1" | head -1 ) l12=$( echo "$l1" | tail -1 ) l2=$( lsattr -l $3 -D -O | sed -e 's/\\/\\\\\\\\/g' ) l21=$( echo "$l2" | head -1 | sed -e 's/.//' ) l22=$( echo "$l2" | tail -1 ) echo "$l11:$l21" echo "$l12:$l22" } attribs subclass type parenttty_chg,tty_common,tty_cxmaddChange/Show Characteristics of a TTYsmit.catchdev lsattr -l logicname -E -Omk_hdlcdpmp_mkAdd a Device Driverhdlc_device.catmkdev -c driver -s 331121b9 -t hdlc ch_hdlcdpmp_l,ch_hdlcdpmp_chChange/Show Characteristics of an HDLC Device Driverhdlc_device.catchdev lsattr -l logicname -E -Orm_hdlcdpmp_rmRemove a Device Driversmit.catrmdevcfg_hdlcdpmp_cfgConfigure a Defined Device Driversmit.catmkdev List All 2-Port Multiprotocol Adaptershdlc_device.catlsdev -C -c adapter -s pci -t 331121b9enet_chg,enet_chg_entkngChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr-l logicname -E -Oenet_chg,enet_chg_entkngChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oexar1async_chgChange/Show Characteristics of a Native 1-Port EIA-232 PCI Adapterdevices.catx() { rmdev -R $1 $2 chdev $* [ $? -ne 0 ] && exit 1 cfgmgr $1 $2 } xlsattr -l logicname -E -OList Native 1-Port EIA-232 PCI Adaptersdevices.catlsdev -C -c adapter -t 1410d403 -Hjas2async_chgChange/Show Characteristics of a 4 Port Async EIA-232 PCIe Adapterdev_async.catx() { rmdev -R $1 $2 chdev $* [ $? -ne 0 ] && exit 1 cfgmgr $1 $2 } xlsattr -l logicname -E -OList 4 Port Async EIA-232 PCIe Adaptersdev_async.catlsdev -C -c adapter -t 1410a803 -H/usr/lib/methods/dev_async.catmk_tsdd_mkAdd a Device Driverts_devices.catmkdev -c driver -s artic -t tsd ch_tsdd_l,ch_tsdd_chChange/Show Characteristics of an MPQP COMIO Emulation Device Driverts_devices.catchdev lsattr -l logicname -E -Orm_tsdd_rmRemove a Device Driversmit.catrmdevcfg_tsdd_cfgConfigure a Defined Device Driversmit.catmkdev mk_tsp_mkAdd a Portts_devices.catmkdev -c port -s tsd -t tsp ch_tsp_l,ch_tsp_chChange/Show Characteristics of an MPQP COMIO Emulation Portts_devices.catchdev lsattr -l logicname -E -Orm_tsp_rmRemove a Portts_devices.catrmdevcfg_tsp_cfgConfigure a Defined Portts_devices.catmkdev enet_chg,enet_chg_goent,enet_chg_dent_tx,14108902_pci_failover,14108902_media_speedChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Orm_list.doList PCI-X SCSI Disk Array Configurationsisraidmgr.catfunction list { for i in $1 do sisraidmgr -L -j1 -l $i done } listrm_prep.doCreate an Array Candidate pdisk and Format to 522 Byte Sectorssisraidmgr.catecho Format in progress;sisraidmgr -P -irm_create.doCreate a PCI-X SCSI Disk Arraysisraidmgr.catsisraidmgr -Crm_del_ary.doDelete a PCI-X SCSI Disk Arraysisraidmgr.catfunction delete_arys { for i in $2 do cmp_str=`/bin/echo "$i" | cut -c -5` if [ $cmp_str = "hdisk" ] then sisraidmgr -Dl $1 -d $i else sisraidmgr -Dl $1 -e $i fi done } delete_arys rm_add_dev.doAdd Disks to an Existing PCI-X SCSI Disk Arraysisraidmgr.catsisraidmgr -Arm_cfg_def_ary.doConfigure a Defined PCI-X SCSI Disk Arraysisraidmgr.catmkdevrm_disp_ary_name,rm_chg_ary.doChange/Show Characteristics of a PCI-X SCSI Disk Arraysisraidmgr.catfunction chg_show_ary { if [ $# -ge 2 ] then chdev $@ fi sisraidmgr -L $1 } chg_show_arylsattr -l ary_name -E -Orm_reconst.doReconstruct a PCI-X SCSI Disk Arraysisraidmgr.catsisraidmgr -Rrm_chg_pdisk.doChange/Show PCI-X SCSI pdisksisraidmgr.catfunction chg_show_pdisk { if [ $# -ge 2 ] then chdev $@ fi sisraidmgr -L $1 } chg_show_pdisklsattr -E -O -lpdiskrm_create_hs.doCreate a Hot Sparesisraidmgr.catsisraidmgr -Hrm_del_hs.doDelete a Hot Sparesisraidmgr.catsisraidmgr -Irm_fmt_jbod.doDelete an Array Candidate pdisk and Format to 512 Byte Sectorssisraidmgr.catecho Format in Progress;sisraidmgr -U -irm_disp_vpd.doDisplay pdisk Vital Product Datasisraidmgr.catlscfg -vrm_diag.doCertify Physical Disk Mediasisraidmgr.catfunction diag_exec { if [ $DIAGNOSTICS ] then $DIAGNOSTICS/bin/Dctrl -T certify else diag -T certify fi echo } diag_execrm_diag.doDownload Microcode to a Physical Disksisraidmgr.catfunction diag_exec { if [ $DIAGNOSTICS ] then $DIAGNOSTICS/bin/Dctrl -T download else diag -T download fi echo } diag_execrm_fmt_pdisk.doFormat Physical Disk Media (pdisk)sisraidmgr.catecho Format in Progress;sisraidmgr -F -irm_diag.doFormat Physical Disk Media (hdisk)sisraidmgr.catfunction diag_exec { if [ $DIAGNOSTICS ] then $DIAGNOSTICS/bin/Dctrl -T format else diag -T format fi echo } diag_execrm_diag.doDisplay Physical Disk Microcode Levelsisraidmgr.catfunction diag_exec { if [ $DIAGNOSTICS ] then $DIAGNOSTICS/bin/Dctrl -T disp_mcode else diag -T disp_mcode fi echo } diag_execrm_diag.doSCSI and SCSI RAID Hot Plug Managersisraidmgr.catfunction diag_exec { if [ $DIAGNOSTICS ] then $DIAGNOSTICS/bin/Dctrl -T uscsicfg else diag -T uscsicfg fi echo } diag_execrm_reclaim_cache_yes.doReclaim Controller Cache Storagesisraidmgr.catsisraidmgr -W -o3rm_no_oprm_reclaim_cache_no.doReclaim Controller Cache Storagesisraidmgr.catsisraidmgr -W -o2rm_battery_display.doDisplay Controller Rechargeable Battery Informationsisraidmgr.catsisraidmgr -M -o0rm_batt_frc.doForce Controller Rechargeable Battery Errorsisraidmgr -M -o1rm_batt_restart.doStart Adapter Cachesisraidmgr.catsisraidmgr -M -o2rm_cfg_adapter.doConfigure a Defined PCI-X SCSI RAID Controllersisraidmgr.catcfgmgrrm_ucfg_adapter.doUnconfigure an Available PCI-X SCSI RAID Controllersisraidmgr.catrmdevsisraidmgr.catrm_diag.doDownload Microcode to a PCI-X SCSI RAID Controllersisraidmgr.catfunction diag_exec { if [ $DIAGNOSTICS ] then $DIAGNOSTICS/bin/Dctrl -T download else diag -T download fi echo } diag_execscsi_common_sis_chg,rm_scsi_common_sisraid_chgChange/Show Characteristics of a PCI-X SCSI RAID Controller Bussisraidmgr.catchdev lsattr -l logicname -E -Orm_sis_logical_chgChange/Show Characteristics of a PCI-X SCSI RAID Controller Bussisraidmgr.catchdev rm_sisraid_chg_controllerChange/Show Characteristics of a PCI-X SCSI RAID Controllersisraidmgr.catsisraidmgr -X enet_chg,enet_chg_goent,14106902_media_speedChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_goent,14106802_media_speedChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oscraid_adapter_name,scraid_chgdev_parmChange/Show a PCI SCSI RAID Adaptersm_ibm2493.catscraidmgr -m function get_scadptr_info { /bin/echo '#name:stripe_size:bb:rebuild_rate:data_scrubbing' /bin/echo $1:$2:$3:$4:$5 } get_scadptr_info name stripe_size bb rebuild_rate data_scrubbingsm_ibm2493.catadptr_configdev.doConfigure a Defined PCI SCSI RAID Adapter sm_ibm2493.catfunction mk_scraid { SCRAID=$1 mkdev -l $SCRAID } mk_scraid /bin/echo '#name'; lsdev -C -F "name" -l namesm_ibm2493.catscraid_adapter_name,drive_status_parm_scDisplay Vital Product Datasm_ibm2493.catscraidmgr -P function get_dstatus { echo '#name:chanid' echo $1:$2 } get_dstatus cname chanidsm_ibm2493.catscraid_adapter_nameClear PCI SCSI RAID Adapter Configurationsm_ibm2493.cat function clear_config { scraidmgr -I -c"yes" -l $2 } clear_config/bin/echo '#name'; lsdev -C -F "name" -l namesm_ibm2493.catscraid_adapter_nameRetry Current Configurationsm_ibm2493.catscraidmgr -I -c"no"/bin/echo '#name'; lsdev -C -F "name" -l namesm_ibm2493.cat function run_gdam { /bin/gdam } run_gdamscraid_adapter_name,drive_status_parm_scRemove a FAILED Drivesm_ibm2493.catscraidmgr -F -d 0function get_dstatus { echo '#name:chanid' echo $1:$2 } get_dstatus cname chanidsm_ibm2493.catscraid_array_name,drive_status_parm_scRevive a FAILED Drivesm_ibm2493.catscraidmgr -F -d 89function get_dstatus { echo '#name:chanid' echo $1:$2 } get_dstatus cname chanidsm_ibm2493.catscraid_array_name,drive_status_parm_scFail a Drivesm_ibm2493.catscraidmgr -F -d 08function get_dstatus { echo '#name:chanid' echo $1:$2 } get_dstatus cname chanidsm_ibm2493.catscraid_adapter_name,drive_status_parm_scRemove a Spare Drivesm_ibm2493.catscraidmgr -F -d 00function get_dstatus { echo '#name:chanid' echo $1:$2 } get_dstatus cname chanidsm_ibm2493.catscraid_adapter_name,drive_status_parm_scRemove a Spare Drivesm_ibm2493.catscraidmgr -F -d 0function get_dstatus { echo '#name:chanid:location:dstatus' echo $1:$2:$3:$4 } get_dstatus cname chanid location dstatussm_ibm2493.catscraid_array_name,drive_status_parm_scIdentify a Drivesm_ibm2493.catscraidmgr -k -c 'normal'function get_dstatus { #echo '#name:chanid:location:dstatus' #echo $1:$2:$3:$4 echo '#name:chanid' echo $1:$2 } get_dstatus cname chanidsm_ibm2493.catscraid_array_name,drive_status_parm_scIdentify a Drivesm_ibm2493.catscraidmgr -k -c 'identify'function get_dstatus { #echo '#name:chanid:location:dstatus' #echo $1:$2:$3:$4 echo '#name:chanid' echo $1:$2 } get_dstatus cname chanidsm_ibm2493.catscraid_adapter_name,drive_status_parm_scAdd a Hot Spare Drivesm_ibm2493.catscraidmgr -F -d 85function get_dstatus { echo '#name:chanid' echo $1:$2 } get_dstatus cname chanidsm_ibm2493.catscraid_adapter_name,drive_status_parm_scAdd a Spare Drivesm_ibm2493.catscraidmgr -F -d 81function get_dstatus { #echo '#name:chanid:location:dstatus' #echo $1:$2:$3:$4 echo '#name:chanid' echo $1:$2 } get_dstatus cname chanidsm_ibm2493.catadptr_logicalList PCI SCSI Disk Arrayssm_ibm2493.cat function list_arrays { location_adptr=`lsdev -Cl $1 | awk '{ print $3 }'` scsi_id_adptr=`echo $location_adptr | cut -c1-5` # Get all of the Available hdisks hdisks=`lsdev -C -tarray -sscraid -SA -F name` if [ -n "$hdisks" ] then for i in $hdisks do location_hdisk=`lsdev -Cl $i | awk '{ print $3 }'` scsi_id_hdisk=`echo $location_hdisk | cut -c1-5` if [ $scsi_id_hdisk = $scsi_id_adptr ] then scraidmgr -C -l $i if [ $? -ne 0 ] then return fi fi done fi # Get all of the Defined hdisks hdisks=`lsdev -C -tarray -sscraid -SD -F name` if [ -n "$hdisks" ] then for i in $hdisks do location_hdisk=`lsdev -Cl $i | awk '{ print $3 }'` scsi_id_hdisk=`echo $location_hdisk | cut -c1-5` if [ $scsi_id_hdisk = $scsi_id_adptr ] then scraidmgr -J -l $i if [ $? -ne 0 ] then return fi fi done fi # Display limited information regarding adapter write cache scraidmgr -G -l $1 } list_arrays/bin/echo '#name'; lsdev -C -F "name" -l lnamesm_ibm2493.catcreate_scraid_parmCreate a PCI SCSI Disk Arraysm_ibm2493.catscraidmgr -A -cyes function list_info { #Get stripe size stripe_size=`odmget -q"name=$1 AND attribute=stripe_size" CuAt | grep value |sed 's/value = //' | sed 's/"//g'| awk '{print $1}' | sed 's/ //g'` if [ -z "$stripe_size" ] then stripe_size=`odmget -q"uniquetype=adapter/pci/14102e00 AND attribute=stripe_size" PdAt | grep deflt |sed 's/deflt = //' | sed 's/"//g'| sed 's/ //g'| awk '{print $1}'` fi # Replace colons with spaces in drive list drives=`echo $3 | sed 's/-/ /g'` drive_count=`echo $drives | wc -w` if [ $drive_count -eq 0 ] then /bin/echo '#adptr:raid:lun_capacity:stripe_size' /bin/echo $1:$2:0:$stripe_size else new_capacity=`echo "'$drives'" | xargs -i scraidmgr -H -l $1 -r $2 -e {} 2>&1` if [ $? -ne 0 ] then /bin/echo $new_capacity | sed 's/xargs.*$//' else /bin/echo '#adptr:raid:drives:lun_capacity:stripe_size' /bin/echo $1:$2:$drives:$new_capacity:$stripe_size fi fi } list_info lname llevel ldrivessm_ibm2493.catmodify_scraid_parm,scraid_array_nameChange/Show PCI SCSI Disk Arraysm_ibm2493.catscraidmgr -Mscraidmgr -O -llnamesm_ibm2493.catscraid_array_nameDelete a PCI SCSI Disk Arraysm_ibm2493.catscraidmgr -D/bin/echo '#name';/bin/echo $1namesm_ibm2493.catscraid_array_name,drive_status_parm_sc,drive_status_parm_sc_reconReconstruct a PCI SCSI RAID Drivesm_ibm2493.catscraidmgr -F -d 8Bfunction get_dstatus { echo '#name:chanid' echo $1:$2 } get_dstatus cname chanidsm_ibm2493.catadptr_logicalList all PCI SCSI RAID Drivessm_ibm2493.cat function list_drives { location_adptr=`lsdev -Cl $1 | awk '{ print $3 }'` scsi_id_adptr=`echo $location_adptr | cut -c1-5` # Get all of the Available hdisks hdisks=`lsdev -C -tarray -sscraid -SA -F name` if [ -n "$hdisks" ] then for i in $hdisks do location_hdisk=`lsdev -Cl $i | awk '{ print $3 }'` scsi_id_hdisk=`echo $location_hdisk | cut -c1-5` if [ $scsi_id_hdisk = $scsi_id_adptr ] then scraidmgr -C -l $i fi done fi # Get all of the Defined hdisks hdisks=`lsdev -C -tarray -sscraid -SD -F name` if [ -n "$hdisks" ] then for i in $hdisks do location_hdisk=`lsdev -Cl $i | awk '{ print $3 }'` scsi_id_hdisk=`echo $location_hdisk | cut -c1-5` if [ $scsi_id_hdisk = $scsi_id_adptr ] then scraidmgr -J -l $i if [ $? -ne 0 ] then return fi fi done fi #Get all FAILED drives not part of hdisk (Dead Hot Spare) scraidmgr -W -l $1 #Get all SPARE Drives scraidmgr -S -l $1 #Get all HOT SPARE and NONEXISTENT Drives scraidmgr -V -l $1 # Display limited information regarding adapter write cache scraidmgr -G -l $1 } list_drives/bin/echo '#name'; lsdev -C -F "name" -l lnamesm_ibm2493.cathdisk_configdev.doConfigure a Defined PCI SCSI Disk Array sm_ibm2493.catfunction mk_scraid { SCRAID=$1 mkdev -l $SCRAID } mk_scraid /bin/echo '#name' ; lsdev -C -F "name" -l namesm_ibm2493.catls_array,parity_chkrepairPCI SCSI Disk Array Consistency Checksm_ibm2493.catscraidmgr -Z sm_ibm2493.catadptr_logicalDisplay Status of Adapter Write Cachesm_ibm2493.catscraidmgr -U -lscraid_adapter_name,config_changes_optDisplay/Accept Configuration Changessm_ibm2493.catscraidmgr -N /bin/echo '#name'; lsdev -C -F "name" -l lnamesm_ibm2493.catscraid_adapter_nameAccept Configuration on Drivessm_ibm2493.catscraidmgr -L /bin/echo '#name'; lsdev -C -F "name" -l lnamesm_ibm2493.catenet_chg,enet_chg_goent,enet_chg_dent_tx,14101103_pci_failover,14101103_media_speedChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Omptsasadap_chgChange / Show Characteristics of a SAS Adaptersas.catchdev lsattr -l logicname -E -Omptsasproto_chgChange / Show Characteristics of a SAS SCSI Protocol Devicesas.catchdev lsattr -l logicname -E -Ocdrom_ide_chg,cdrom_ide_commonChange/Show Characteristics of a CD ROM Drivesmit.catchdev lsattr -l logicname -E -Ocdrom_ide_chg,cdrom_ide_common,wcdvdram_sata_max_xfer,wcdvdram_sata_wceChange/Show Characteristics of a CD ROM Drivesmit.catchdev lsattr -l logicname -E -Ocdrom_ide_chg,cdrom_ide_common,cdrom_oicdrom_common,cdrom_ide_audio_commonChange/Show Characteristics of a CD ROM Drivesmit.catchdev lsattr -l logicname -E -Ocdrom_ide_chg,cdrom_ide_common,cdrom_ide_data_verify_common,cdrom_ide_audio_common,cdrom_ide_max_xfer,cdrom_ide_wceChange/Show Characteristics of a CD ROM Drivesmit.catchdev lsattr -l logicname -E -Ocdrom_ide_chg,cdrom_ide_common,cdrom_ide_data_verify_common,cdrom_ide_audio_commonChange/Show Characteristics of a CD ROM Drivesmit.catchdev lsattr -l logicname -E -Ocdrom_ide_chg,cdrom_ide_common,cdrom_ide_max_xferChange/Show Characteristics of a CD ROM Drivesmit.catchdev lsattr -l logicname -E -Ocdrom_ide_chg,cdrom_ide_common,cdrom_ide_max_xfer,cdrom_ide_wceChange/Show Characteristics of a CD ROM Drivesmit.catchdev lsattr -l logicname -E -Ocdrom_ide_chg,cdrom_ide_common,cdrom_ide_max_xfer,cdrom_ide_wceChange/Show Characteristics of a CD ROM Drivesmit.catchdev lsattr -l logicname -E -Ocdrom_ide_chg,cdrom_ide_common,cdrom_ide_max_xferChange/Show Characteristics of a CD ROM Drivesmit.catchdev lsattr -l logicname -E -Ocdrom_ide_chg,cdrom_ide_common,cdrom_ide_max_xferChange/Show Characteristics of a CD ROM Drivesmit.catchdev lsattr -l logicname -E -Ocdrom_ide_addAdd a CD ROM Drivesmit.catmkdev -c cdromlsattr -c cdrom-s subclass -t type -D -Olskbdchdisp_1Move the LFT to Another Displaysmit.catchdisplsdisplsfontchfont_1Select the Active Font for Next System Restartsmit.catchfontmkfont_2Add a Font to the Systemsmit.catmkfont_chkbdChange the Keyboard Map for Next System Restartsmit.catchkbd List All Graphics Adapters Availablesmit.catlsdispchdispsz_optSelect the Display Sizesmit.catchdev -P -l Discover_the_workstation () { lsattr -E -l "$1" -a scrn_width_mm -a scrn_height_mm |\ awk ' {size_list = size_list $2 ":"} END {printf("#screen_width:screen_height:\n%s",size_list)}' } Discover_the_workstation display180089chdisptype_optSelect the Display Typesmit.catchdev -P -lfunction get_monitor_type { value=`lsattr -E -a monitor_type -l "$1" | head -1 | awk '{print $2}'` echo "#monitor_type:dsp_id:\n$value:$1" } get_monitor_typedisplaychdisptype_ddc_optSelect the Display Typesmit.catchdev -P -lfunction get_monitor_type { value=`lsattr -E -a monitor_type -l "$1" | head -1 | awk '{print $2}'` echo "#monitor_type:dsp_id:\n$value:$1" } get_monitor_typedisplaychres_refrt_optSelect the Display Resolution and Refresh Ratesmit.catfunction get_res_refrate { def_disptype=`lsattr -E -a monitor_type -l "$1" | head -1 | awk '{print $2}' | cut -c1-15` value=`lsattr -E -a $def_disptype -l "$1" | head -1 | awk '{print $2}'` echo "#refresh_rate:dsp_type:dsp_id:\n$value:$def_disptype:$1" } get_res_refratedisplaychres_refrt_ddc_optSelect the Display Resolution and Refresh Ratesmit.catfunction get_res_refrate { def_disptype=`lsattr -E -a monitor_type -l "$1" | head -1 | awk '{print $2}' | cut -c1-15` value=`lsattr -E -a $def_disptype -l "$1" | head -1 | awk '{print $2}'` echo "#refresh_rate:dsp_type:dsp_id:\n$value:$def_disptype:$1" } get_res_refratedisplaychrefrate_optSelect the Display Refresh Ratesmit.catchdev -P -lfunction get_ref_rate { value=`lsattr -E -a refresh_rate -l "$1" | head -1 | awk '{print $2}'` echo "#refresh_rate:dsp_id:\n$value:$1" } get_ref_ratedisplayphase_timeoutDisplay Power Managementsmit.catchdev -l lft0 -Plsattr -E -O -l lft0enet_chg,enet_chg_rrentChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -OList All USB Adaptersusb.catlsparent -C -k usbhcList All USB Devicesusb.catlsdev -pusb0Enable LIBUSBusblibke.catchdev -a usblibconfig='available' -l usb0Disable LIBUSBusblibke.catchdev -a usblibconfig='defined' -l usb0usbadap_name,usb_chg,usbhc_chg,xhci_chgChange/Show Characteristics USB Adapterusb.catchdev lsattr -l logicname -E -Ousbadap_name,usb_chg,usbhc_chg,xhci_chgChange/Show Characteristics USB Adapterusb.catchdev lsattr -l logicname -E -Ousbadap_name,usb_chg,usbhc_chg,xhci_chgChange/Show Characteristics USB Adapterusb.catchdev lsattr -l logicname -E -Ousbadap_name,usb_chg,usbhc_chg,ehci_chgChange/Show Characteristics USB Adapterusb.catchdev lsattr -l logicname -E -Ousbadap_name,usb_chg,usbhc_chg,ehci_chgChange/Show Characteristics USB Adapterusb.catchdev lsattr -l logicname -E -Ousbadap_name,usb_chg,usbhc_chg,ehci_chgChange/Show Characteristics USB Adapterusb.catchdev lsattr -l logicname -E -Ousbadap_name,usb_chg,usbhc_chg,ehci_chgChange/Show Characteristics USB Adapterusb.catchdev lsattr -l logicname -E -Ousbadap_name,usb_chg,usbhc_chg,ehci_chgChange/Show Characteristics USB Adapterusb.catchdev lsattr -l logicname -E -Ousb_chg,usbdev_chg,usbdev_speed,usbdev_nameChange/Show Characteristics USB Deviceusb.catchdev lsattr -l logicname -E -Ousb_chg,usbdev_nameChange/Show Characteristics USB Deviceusb.catchdev lsattr -l logicname -E -Ousb_chg,usbdev_name,usbkbd_chgChange/Show Characteristics USB Deviceusb.catchdev lsattr -l logicname -E -Ousb_chg,usbdev_nameChange/Show Characteristics USB Deviceusb.catchdev lsattr -l logicname -E -Ousb_chg,usbdev_speed,usbdev_name,usbtape_chgChange/Show Characteristics USB Deviceusb.catchdev lsattr -l logicname -E -Ousb_chg,usbdev_speed,usbdev_name,usbcd_chgChange/Show Characteristics USB Deviceusb.catchdev lsattr -l logicname -E -Ousb_chg,usbdev_speed,usbdev_name,usbcd_chgChange/Show Characteristics USB Deviceusb.catchdev lsattr -l logicname -E -Ousb_chg,usbdev_speed,usbdev_name,usbcd_chgChange/Show Characteristics USB Deviceusb.catchdev lsattr -l logicname -E -Ousb_chg,usbdev_speed,usbdev_name,usbcd_chgChange/Show Characteristics USB Deviceusb.catchdev lsattr -l logicname -E -Ousb_chg,usbdev_speed,usbdev_name,usbcd_chgChange/Show Characteristics USB Deviceusb.catchdev lsattr -l logicname -E -Ousb_chg,usbdev_speed,usbdev_name,usbcd_chgChange/Show Characteristics USB Deviceusb.catchdev lsattr -l logicname -E -Ousb_chg,usbdev_speed,usbdev_name,usbcd_chgChange/Show Characteristics USB Deviceusb.catchdev lsattr -l logicname -E -Ousb_chg,usbdev_speed,usbdev_name,usbcd_chgChange/Show Characteristics USB Deviceusb.catchdev lsattr -l logicname -E -Ousb_chg,usbdev_speed,usbdev_name,usbcd_chgChange/Show Characteristics USB Deviceusb.catchdev lsattr -l logicname -E -Ousb_chg,usbdev_speed,usbdev_name,usbcd_chgChange/Show Characteristics USB Deviceusb.catchdev lsattr -l logicname -E -Ousb_chg,usbdev_speed,usbdev_name,usbcd_chgChange/Show Characteristics USB Deviceusb.catchdev lsattr -l logicname -E -Ousb_chg,usbdev_speed,usbdev_name,usbcd_chgChange/Show Characteristics USB Deviceusb.catchdev lsattr -l logicname -E -Ousb_chg,usbdev_speed,usbdev_name,usbcd_chgChange/Show Characteristics USB Deviceusb.catchdev lsattr -l logicname -E -Ousb_chg,usbdev_speed,usbdev_name,usbcd_chgChange/Show Characteristics USB Deviceusb.catchdev lsattr -l logicname -E -Ousb_chg,usbdev_nameChange/Show Characteristics USB Deviceusb.catchdev lsattr -l logicname -E -Ousb_chg,usbdev_nameChange/Show Characteristics USB Deviceusb.catchdev lsattr -l logicname -E -OList Serial over Ethernet Adaptersdev_soe.catlsdev -C -c adapter -t soe -H/usr/lib/methods/dev_soe.catsoe_addAdd a Serial over Ethernet Adapterdev_soe.catmkdev -c adapter -s pseudo -t soe/usr/lib/methods/dev_soe.catsoe_chgChange/Show Characteristics of a Serial over Ethernet Adapterdev_soe.catchdev lsattr -l logicname -E -O/usr/lib/methods/dev_soe.catsoe_rmRemove a Serial over Ethernet Adapterdev_soe.catrmdev /usr/lib/methods/dev_soe.catsoe_cfgConfigure a Defined Serial over Ethernet Adapterdev_soe.catmkdev /usr/lib/methods/dev_soe.cattty_add_soedd,tty_add,tty_commonAdd a TTYsmit.catmkdev -c tty attribs () { l1=$( lsattr -c tty -s $1 -t $2 -D -O ) l11=$( echo "$l1" | head -1 ) l12=$( echo "$l1" | tail -1 ) l2=$( lsattr -l $3 -D -O | sed -e 's/\\/\\\\\\\\/g' ) l21=$( echo "$l2" | head -1 | sed -e 's/.//' ) l22=$( echo "$l2" | tail -1 ) echo "$l11:$l21" echo "$l12:$l22" } attribs subclass type parent/usr/lib/methods/dev_soe.cattty_chg_soedd,tty_chg,tty_commonChange/Show Characteristics of a TTYsmit.catchdev lsattr -l logicname -E -O/usr/lib/methods/dev_soe.cattty_mv,tty_mv_soeMove a TTY to Another Portsmit.catchdev sas_list.doList SAS Disk Array Configurationsissasraidmgr.catfunction list { for i in $1 do sissasraidmgr -L -j1 -l $i done } listsas_prep.doCreate an Array Candidate pdisk and Format to RAID block sizesissasraidmgr.catecho Format in progress;sissasraidmgr -P -isas_create.doCreate a SAS Disk Arraysissasraidmgr.catsissasraidmgr -Csas_del_ary.doDelete a SAS Disk Arraysissasraidmgr.catfunction delete_arys { for i in $2 do cmp_str=`/bin/echo "$i" | cut -c -5` if [ $cmp_str = "hdisk" ] then sissasraidmgr -Dl $1 -d $i else sissasraidmgr -Dl $1 -e $i fi done } delete_arys sas_add_dev.doAdd Disks to an Existing SAS Disk Arraysissasraidmgr.catsissasraidmgr -Asas_cfg_def_ary.doConfigure a Defined SAS Disk Arraysissasraidmgr.catmkdevsas_disp_ary_name,sas_chg_ary.doChange/Show Characteristics of a SAS Disk Arraysissasraidmgr.catfunction chg_show_ary { if [ $# -ge 2 ] then chdev $@ fi sissasraidmgr -L $1 } chg_show_arylsattr -l ary_name -E -Osas_reconst.doReconstruct a SAS Disk Arraysissasraidmgr.catsissasraidmgr -Rsas_chg_pdisk.doChange/Show SAS pdisksissasraidmgr.catfunction chg_show_pdisk { if [ $# -ge 2 ] then chdev $@ fi sissasraidmgr -L $1 } chg_show_pdisklsattr -E -O -lpdisksas_create_hs.doCreate a Hot Sparesissasraidmgr.catsissasraidmgr -Hsas_del_hs.doDelete a Hot Sparesissasraidmgr.catsissasraidmgr -Isas_fmt_jbod.doDelete an Array Candidate pdisk and Format to JBOD block sizesissasraidmgr.catecho Format in Progress;sissasraidmgr -U -isas_disp_vpd.doDisplay pdisk Vital Product Datasissasraidmgr.catlscfg -vsas_diag.doCertify Physical Disk Mediasissasraidmgr.catfunction diag_exec { if [ $DIAGNOSTICS ] then $DIAGNOSTICS/bin/Dctrl -T certify else diag -T certify fi echo } diag_execsas_diag.doDownload Microcode to a Physical Disksissasraidmgr.catfunction diag_exec { if [ $DIAGNOSTICS ] then $DIAGNOSTICS/bin/Dctrl -T download else diag -T download fi echo } diag_execsas_fmt_pdisk.doFormat Physical Disk Media (pdisk)sissasraidmgr.catecho Format in Progress;sissasraidmgr -F -isas_diag.doFormat Physical Disk Media (hdisk)sissasraidmgr.catfunction diag_exec { if [ $DIAGNOSTICS ] then $DIAGNOSTICS/bin/Dctrl -T format else diag -T format fi echo } diag_execsas_diag.doDisplay Physical Disk Microcode Levelsissasraidmgr.catfunction diag_exec { if [ $DIAGNOSTICS ] then $DIAGNOSTICS/bin/Dctrl -T disp_mcode else diag -T disp_mcode fi echo } diag_execsas_diag.doSCSI and SCSI RAID Hot Plug Managersissasraidmgr.catfunction diag_exec { if [ $DIAGNOSTICS ] then $DIAGNOSTICS/bin/Dctrl -T uscsicfg else diag -T uscsicfg fi echo } diag_execsas_reclaim_cache_yes.doReclaim Controller Cache Storagesissasraidmgr.catsissasraidmgr -W -o3sas_no_opsas_reclaim_cache_no.doReclaim Controller Cache Storagesissasraidmgr.catsissasraidmgr -W -o2sas_battery_display.doDisplay Controller Rechargeable Battery Informationsissasraidmgr.catsissasraidmgr -M -o0sas_batt_frc.doForce Controller Rechargeable Battery Errorsissasraidmgr.catsissasraidmgr -M -o1sas_batt_restart.doStart Adapter Cachesissasraidmgr.catsissasraidmgr -M -o2sas_cfg_adapter.doConfigure a Defined SAS Controllersissasraidmgr.catcfgmgrsas_ucfg_adapter.doUnconfigure an Available SAS RAID Controllersissasraidmgr.catrmdevsissasraidmgr.catsas_show_controller.doShow SAS Controller Physical Resourcessissasraidmgr.catfunction list { for i in $1 do sissasraidmgr -Z -o 0 -j 3 -l $i done } listsas_show_controller.doShow SAS Controller Physical Resourcessissasraidmgr.catfunction list { for i in $1 do sissasraidmgr -Z -o 1 -j 3 -l $i done } listsas_show_fabric_controller.doShow SAS Controller Physical Resourcessissasraidmgr.catsissasraidmgr -T -o0sas_show_fabric_controller.doShow SAS Controller Physical Resourcessissasraidmgr.catsissasraidmgr -T -o1sas_show_controller_ports_optShow Controller SAS Addresssissasraidmgr.catsissasraidmgr -T -o16sas_diag.doDownload Microcode to a SAS Controllersissasraidmgr.catfunction diag_exec { if [ $DIAGNOSTICS ] then $DIAGNOSTICS/bin/Dctrl -T download else diag -T download fi echo } diag_execsas_sasraid_chg_controllerChange/Show SAS Controllersissasraidmgr.catsissasraidmgr -X sissasproto_chgChange / Show Characteristics of a SAS SCSI Pro tocol Devicesas.catchdev lsattr -l logicname -E -Osas_mgrt_array.doPerform SAS Disk Array Migrationsissasraidmgr.catsissasraidmgr -Gsas_ha_access_optChange/Show HA Access Characteristics of a SAS Disk Arraysissasraidmgr.catsissasraidmgr -EList All SCSI Adapterssmit.catlsparent -C -k scsi_scb && lsparent -C -k lsa && lsparent -C -k wsa && lsparent -C -k scsiscsi_common_chg,mca_scsi_common_chg,hscsi_chgChange/Show Characteristics of a SCSI Adaptersmit.catchdev lsattr -l logicname -E -Ocorvette_common_chg,ascsi_chgChange/Show Characteristics of a SCSI Adaptersmit.catchdev lsattr -l logicname -E -Ocorvette_common_chg,ascsi_chgChange/Show Characteristics of a SCSI Adaptersmit.catchdev lsattr -l logicname -E -Ocorvette_common_chg,vscsi_chgChange/Show Characteristics of a SCSI Adaptersmit.catchdev lsattr -l logicname -E -Oscsi_common_chg,mca_scsi_common_chg,hscsi_chgChange/Show Characteristics of a SCSI Adaptersmit.catchdev lsattr -l logicname -E -Oscsi_common_chg,mca_scsi_common_chgChange/Show Characteristics of a SCSI Adaptersmit.catchdev lsattr -l logicname -E -Oscsi_common_chg,mca_scsi_common_chgChange/Show Characteristics of a SCSI Adaptersmit.catchdev lsattr -l logicname -E -Oscsi_common_chg,pci_scsi_chg,ncr825_chg,ultra3_chgChange/Show Characteristics of a SCSI Adaptersmit.catchdev lsattr -l logicname -E -Oscsi_common_chg,pci_scsi_chg,ncr825_chg,ultra_chg,ultra2_chgChange/Show Characteristics of a SCSI Adaptersmit.catchdev lsattr -l logicname -E -Oscsi_common_chg,pci_scsi_chg,ncr825_chg,ultra_chg,ultra2_chgChange/Show Characteristics of a SCSI Adaptersmit.catchdev lsattr -l logicname -E -Oscsi_common_chg,pci_scsi_chg,ncr825_chg,ultra_chgChange/Show Characteristics of a SCSI Adaptersmit.catchdev lsattr -l logicname -E -Oscsi_common_chg,pci_scsi_chg,ncr825_chgChange/Show Characteristics of a SCSI Adaptersmit.catchdev lsattr -l logicname -E -Oscsi_common_chg,pci_scsi_chgChange/Show Characteristics of a SCSI Adaptersmit.catchdev lsattr -l logicname -E -Olsa_common_chg,lsa_chgChange/Show Characteristics of a SCSI Adaptersmit.catchdev lsattr -l logicname -E -Olsa_common_chg,bscsi_chgChange/Show Characteristics of a SCSI Adaptersmit.catchdev lsattr -l logicname -E -Oscsi_common_sis_chgChange/Show Characteristics of a SCSI Adaptersmit.catchdev lsattr -l logicname -E -Ompt2sasadap_chgChange / Show Characteristics of a SAS Adaptersas.catchdev lsattr -l logicname -E -Omptscsi_chgChange / Show Characteristics of a SAS SCSI Protocol Devicesas.catchdev lsattr -l logicname -E -Ompiopath_pcmchg_PCM/friend/scsiscsd_optAIX MPIO SCSI Disk PCM Change Path Characteristicsaixpcm.catchpath discover(){ set -- $1 priority=`lspath -A -l $2 -p $4 -w $5 -a priority -F value` echo '#lname:path_id:parent:connection:state:priority:' echo $2':'$3':'$4':'$5':'$1':'$priority }; discoverpathmpiodev_pcmchg_PCM/friend/scsiscsd_optAIX MPIO SCSI Disk PCM Change Device Characteristicsaixpcm.catchdev discover(){ type=`lsdev -l $1 -F PdDvLn` pcm=scsiscsd policy=`lsattr -E -l $1 -Fvalue -a reserve_policy` algorithm=`lsattr -E -l $1 -Fvalue -a algorithm` hcmode=`lsattr -El $1 -Fvalue -a hcheck_mode` hcint=`lsattr -El $1 -Fvalue -a hcheck_interval` detw=`lsattr -El $1 -Fvalue -a dist_tw_width` depct=`lsattr -El $1 -Fvalue -a dist_err_pcnt` echo '#lname:policy:algorithm:pcm:type:hcmode:hcint:detw:depct' echo $1':'$policy':'$algorithm':'$pcm':'$type':'$hcmode':'$hcint':'$detw':'$depct }; discoverdevname _cookednamempiopath_pcmchg_PCM/friend/aixmpiods8k_optAIX MPIO FCP Disk PCM Change Path Characteristicsaixpcm.catchpath discover(){ set -- $1 priority=`lspath -A -l $2 -p $4 -w $5 -a priority -F value` echo '#lname:path_id:parent:connection:state:priority:' echo $2':'$3':'$4':'$5':'$1':'$priority }; discoverpathmpiodev_pcmchg_PCM/friend/aixmpiods8k_optAIX MPIO FCP Disk PCM Change Device Characteristicsaixpcm.catchdev discover(){ type=`lsdev -l $1 -F PdDvLn` pcm=aixmpiods8k policy=`lsattr -E -l $1 -Fvalue -a reserve_policy` algorithm=`lsattr -E -l $1 -Fvalue -a algorithm` hcmode=`lsattr -El $1 -Fvalue -a hcheck_mode` hcint=`lsattr -El $1 -Fvalue -a hcheck_interval` hccmd=`lsattr -El $1 -Fvalue -a hcheck_cmd` detw=`lsattr -El $1 -Fvalue -a dist_tw_width` depct=`lsattr -El $1 -Fvalue -a dist_err_pcnt` timeoutpol=`lsattr -El $1 -Fvalue -a timeout_policy` sanrepcfg=`lsattr -El $1 -Fvalue -a san_rep_cfg` sanrepdev=`lsattr -El $1 -Fvalue -a san_rep_device` fc3rec=`lsattr -El $1 -Fvalue -a FC3_REC` echo '#lname:policy:algorithm:pcm:type:hcmode:hcint:hccmd:detw:depct:timeoutpol:sanrepcfg:sanrepdev:fc3rec' echo $1':'$policy':'$algorithm':'$pcm':'$type':'$hcmode':'$hcint':'$hccmd':'$detw':'$depct':'$timeoutpol':'$sanrepcfg':'$sanrepdev':'$fc3rec }; discoverdevname _cookednamempiopath_pcmchg_PCM/friend/capiint_optAIX MPIO CAPI Flash Disk PCM Change Path Characteristicsaixpcm.catchpath discover(){ set -- $1 priority=`lspath -A -l $2 -p $4 -w $5 -a priority -F value` echo '#lname:path_id:parent:connection:state:priority:' echo $2':'$3':'$4':'$5':'$1':'$priority }; discoverpathmpiodev_pcmchg_PCM/friend/capiint_optAIX MPIO CAPI Flash Disk PCM Change Device Characteristicsaixpcm.catchdev discover(){ type=`lsdev -l $1 -F PdDvLn` pcm=capiint policy=`lsattr -E -l $1 -Fvalue -a reserve_policy` algorithm=`lsattr -E -l $1 -Fvalue -a algorithm` hcmode=`lsattr -El $1 -Fvalue -a hcheck_mode` hcint=`lsattr -El $1 -Fvalue -a hcheck_interval` hccmd=`lsattr -El $1 -Fvalue -a hcheck_cmd` detw=`lsattr -El $1 -Fvalue -a dist_tw_width` depct=`lsattr -El $1 -Fvalue -a dist_err_pcnt` timeoutpol=`lsattr -El $1 -Fvalue -a timeout_policy` echo '#lname:policy:algorithm:pcm:type:hcmode:hcint:hccmd:detw:depct:timeoutpol' echo $1':'$policy':'$algorithm':'$pcm':'$type':'$hcmode':'$hcint':'$hccmd':'$detw':'$depct':'$timeoutpol }; discoverdevname _cookednamempiopath_pcmchg_PCM/friend/capiother_optAIX MPIO CAPI Flash Disk PCM Change Path Characteristicsaixpcm.catchpath discover(){ set -- $1 priority=`lspath -A -l $2 -p $4 -w $5 -a priority -F value` echo '#lname:path_id:parent:connection:state:priority:' echo $2':'$3':'$4':'$5':'$1':'$priority }; discoverpathmpiodev_pcmchg_PCM/friend/capiother_optAIX MPIO CAPI Flash Disk PCM Change Device Characteristicsaixpcm.catchdev discover(){ type=`lsdev -l $1 -F PdDvLn` pcm=capiother policy=`lsattr -E -l $1 -Fvalue -a reserve_policy` algorithm=`lsattr -E -l $1 -Fvalue -a algorithm` hcmode=`lsattr -El $1 -Fvalue -a hcheck_mode` hcint=`lsattr -El $1 -Fvalue -a hcheck_interval` hccmd=`lsattr -El $1 -Fvalue -a hcheck_cmd` detw=`lsattr -El $1 -Fvalue -a dist_tw_width` depct=`lsattr -El $1 -Fvalue -a dist_err_pcnt` timeoutpol=`lsattr -El $1 -Fvalue -a timeout_policy` echo '#lname:policy:algorithm:pcm:type:hcmode:hcint:hccmd:detw:depct:timeoutpol' echo $1':'$policy':'$algorithm':'$pcm':'$type':'$hcmode':'$hcint':'$hccmd':'$detw':'$depct':'$timeoutpol }; discoverdevname _cookednamempiopath_pcmchg_PCM/friend/fcpother_optAIX MPIO FCP Disk PCM Change Path Characteristicsaixpcm.catchpath discover(){ set -- $1 priority=`lspath -A -l $2 -p $4 -w $5 -a priority -F value` echo '#lname:path_id:parent:connection:state:priority:' echo $2':'$3':'$4':'$5':'$1':'$priority }; discoverpathmpiodev_pcmchg_PCM/friend/fcpother_optAIX MPIO FCP Disk PCM Change Device Characteristicsaixpcm.catchdev discover(){ type=`lsdev -l $1 -F PdDvLn` pcm=fcpother policy=`lsattr -E -l $1 -Fvalue -a reserve_policy` algorithm=`lsattr -E -l $1 -Fvalue -a algorithm` hcmode=`lsattr -El $1 -Fvalue -a hcheck_mode` hcint=`lsattr -El $1 -Fvalue -a hcheck_interval` hccmd=`lsattr -El $1 -Fvalue -a hcheck_cmd` detw=`lsattr -El $1 -Fvalue -a dist_tw_width` depct=`lsattr -El $1 -Fvalue -a dist_err_pcnt` timeoutpol=`lsattr -El $1 -Fvalue -a timeout_policy` echo '#lname:policy:algorithm:pcm:type:hcmode:hcint:hccmd:detw:depct:timeoutpol' echo $1':'$policy':'$algorithm':'$pcm':'$type':'$hcmode':'$hcint':'$hccmd':'$detw':'$depct':'$timeoutpol }; discoverdevname _cookednamempiopath_pcmchg_PCM/friend/iscsiother_optAIX MPIO iSCSI Disk PCM Change Path Characteristicsaixpcm.catchpath discover(){ set -- $1 lspath -l $2 -p $4 -F'path_id connection' | while read path_id conn do if [ $path_id -eq $3 ] then nconn=`echo ${conn} | sed 's/:/#!:/g'` priority=`lspath -A -l $2 -p $4 -w $conn -a priority -F value` fi done echo '#lname:path_id:parent:connection:state:priority:' echo $2':'$3':'$4':'$nconn':'$1':'$priority }; discoverpathmpiodev_pcmchg_PCM/friend/iscsiother_optAIX MPIO iSCSI Disk PCM Change Device Characteristicsaixpcm.catchdev discover() { type=`lsdev -l $1 -F PdDvLn` pcm=iscsiother policy=`lsattr -E -l $1 -Fvalue -a reserve_policy` algorithm=`lsattr -E -l $1 -Fvalue -a algorithm` hcmode=`lsattr -El $1 -Fvalue -a hcheck_mode` hcint=`lsattr -El $1 -Fvalue -a hcheck_interval` hccmd=`lsattr -El $1 -Fvalue -a hcheck_cmd` detw=`lsattr -El $1 -Fvalue -a dist_tw_width` depct=`lsattr -El $1 -Fvalue -a dist_err_pcnt` echo '#lname:policy:algorithm:pcm:type:hcmode:hcint:hccmd:detw:depct' echo $1':'$policy':'$algorithm':'$pcm':'$type':'$hcmode':'$hcint':'$hccmd':'$detw':'$depct }; discoverdevname _cookednamempiopath_pcmchg_PCM/friend/minimalpcm_optCAPI Disk PCM Change Path Characteristicsaixpcm.catchpath discover(){ set -- $1 echo '#lname:path_id:parent:connection:state:' echo $2':'$3':'$4':'$5':'$1 }; discoverpathmpiodev_pcmchg_PCM/friend/minimalpcm_optCAPI Disk PCM Change Device Characteristicsaixpcm.catchdev discover(){ type=`lsdev -l $1 -F PdDvLn` pcm=minimalpcm policy=`lsattr -E -l $1 -Fvalue -a reserve_policy` algorithm=`lsattr -E -l $1 -Fvalue -a algorithm` echo '#lname:policy:algorithm:pcm:type' echo $1':'$policy':'$algorithm':'$pcm':'$type }; discoverdevname _cookednamempiopath_pcmchg_PCM/friend/otherapdisk_optAIX MPIO Active/Passive Disk PCM Change Path Characteristicsaixpcm.catchpath discover(){ set -- $1 priority=`lspath -A -l $2 -p $4 -w $5 -a priority -F value` echo '#lname:path_id:parent:connection:state:priority:' echo $2':'$3':'$4':'$5':'$1':'$priority }; discoverpathmpiodev_pcmchg_PCM/friend/otherapdisk_optAIX MPIO Active/Passive Disk PCM Change Device Characteristicsaixpcm.catchdev discover(){ type=`lsdev -l $1 -F PdDvLn` pcm=otherapdisk policy=`lsattr -E -l $1 -Fvalue -a reserve_policy` algorithm=`lsattr -E -l $1 -Fvalue -a algorithm` hcmode=`lsattr -El $1 -Fvalue -a hcheck_mode` hcint=`lsattr -El $1 -Fvalue -a hcheck_interval` hccmd=`lsattr -El $1 -Fvalue -a hcheck_cmd` detw=`lsattr -El $1 -Fvalue -a dist_tw_width` depct=`lsattr -El $1 -Fvalue -a dist_err_pcnt` ctrldt=`lsattr -El $1 -Fvalue -a cntl_delay_time` ctrlhcint=`lsattr -El $1 -Fvalue -a cntl_hcheck_int` timeoutpol=`lsattr -El $1 -Fvalue -a timeout_policy` echo '#lname:policy:algorithm:pcm:type:hcmode:hcint:hccmd:detw:depct:ctrldt:ctrlhcint:timeoutpol' echo $1':'$policy':'$algorithm':'$pcm':'$type':'$hcmode':'$hcint':'$hccmd':'$detw':'$depct':'$ctrldt':'$ctrlhcint':'$timeoutpol }; discoverdevname _cookednamempiopath_pcmchg_PCM/friend/sisarray_optAIX MPIO SCSI Disk PCM Change Path Characteristicsaixpcm.catchpath discover(){ set -- $1 echo '#lname:path_id:parent:connection:state:' echo $2':'$3':'$4':'$5':'$1 }; discoverpathmpiodev_pcmchg_PCM/friend/sisarray_optAIX MPIO SCSI Disk PCM Change Device Characteristicsaixpcm.catchdev discover(){ type=`lsdev -l $1 -F PdDvLn` pcm=sisarray policy=`lsattr -E -l $1 -Fvalue -a reserve_policy` algorithm=`lsattr -E -l $1 -Fvalue -a algorithm` detw=`lsattr -El $1 -Fvalue -a dist_tw_width` depct=`lsattr -El $1 -Fvalue -a dist_err_pcnt` echo '#lname:policy:algorithm:pcm:type:detw:depct' echo $1':'$policy':'$algorithm':'$pcm':'$type':'$detw':'$depct }; discoverdevname _cookednamechgkbd_optChange / Show Characteristics of the Keyboardsmit.catchhwkbdx=`lsdev -C -S 1 -c keyboard | sed "s/ .*//" | sed "2,\\$d"` if [ "$x" != "" ]; then lsattr -l $x -E -O else chhwkbd fimksball_cmd_opt/usr/lpp/X11/bin/sbinstall -a 1/usr/lpp/X11/bin/sbinstall -a 0List All iSCSI Protocol Devicesiscsi.catxx() { for a in `lsparent -C -k iscsi | sort | uniq` do lsdev -C -l ${a} done } xxrmiscsisw_cmd_optRemove iSCSI Protocol Deviceiscsi.catrmdev _addiscsiswAdd an iSCSI Target Protocol Deviceiscsi.catmkdev -c driver -s node -t iscsixx () { names='' values='' lsattr -D -c driver -s node -t iscsi -F 'attribute value' | while read attr value; do newvalue=`echo ${value} | sed 's/:/#!:/g'` names=${attr}:${names} values=${newvalue}:${values} done echo '#'${names} echo ${values} }; xx_chgiscsisw,_chgiscsisw_iscsi_nodeChange / Show Characteristics of iSCSI Protocol Deviceiscsi.catchdev xx () { names='' values='' lsattr -l $1 -F 'attribute value' | while read attr value do newvalue=`echo ${value} | sed 's/:/#!:/g'` names=${attr}:${names} values=${newvalue}:${values} done echo '#'${names} echo ${values} }; xxlogicname_chgiscsisw,_chgiscsisw_qliscsi_qliiocbChange / Show Characteristics of iSCSI Protocol Deviceiscsi.catchdev lsattr -l logicname -E -OList All iSCSI Adaptersiscsi.catxx() { for a in `lsparent -C -k qliiocb | sort | uniq` do lsdev -C -l ${a} done } xx_chgiscsiadapChange / Show Characteristics of an iSCSI Adapteriscsi.catchdev xx () { names='' values='' lsattr -l $1 -F 'attribute value' | while read attr value do newvalue=`echo ${value} | sed 's/:/#!:/g'` names=${attr}:${names} values=${newvalue}:${values} done echo '#'${names} echo ${values} }; xxlogicnameList All iSCSI Target Devices in ODMiscsi.catlsiscsi_static_target_iscsi,_target_iscsiDelete an iSCSI Target Device from ODMiscsi.catrmiscsi -g static _target_iscsiDelete an iSCSI Target Device from ODMiscsi.catrmiscsi -g auto _chg_static_target_iscsi,_chg_target_iscsi,_target_iscsi_passwd,_target_iscsi_usrnameChange an iSCSI Target Device in ODMiscsi.catchiscsi -g static _chg_auto_target_iscsi,_chg_target_iscsi,_target_iscsi_passwd,_target_iscsi_usrnameChange an iSCSI Target Device in ODMiscsi.catchiscsi -g auto _static_target_iscsi,_target_iscsi,_target_iscsi_passwd,_target_iscsi_usrnameAdd a Statically Discovered iSCSI Target Device in ODMiscsi.catmkiscsi -g static _target_iscsi_fileAdd iSCSI Target Device(s) into ODM from a Fileiscsi.catmkiscsi _target_iscsi,_target_iscsi_passwd,_target_iscsi_usrnameAdd Authentication Data for an Automatically Discovered iSCSI Target Deviceiscsi.catmkiscsi -g auto _chgisnsconfChange / Show iSNS Configurationiscsi.catchdev xx () { names='' values='' lsattr -l $1 -F 'attribute value' | while read attr value do newvalue=`echo ${value} | sed 's/:/#!:/g'` names=${attr}:${names} values=${newvalue}:${values} done echo '#'${names} echo ${values} }; xxlogicnameList all Defined IDE Adapterside.catlsdev -C -c adapter | grep "ide[0-9]"idea_chgChange/Show Characteristics of an IDE Adapteride.catchdev lsattr -l logicname -E -Oidea_chgChange/Show Characteristics of an IDE Adapteride.catchdev lsattr -l logicname -E -Oidea_chg, idea_5a107512_chgChange/Show Characteristics of an IDE Adapteride.catchdev lsattr -l logicname -E -O_mktcpipibMinimum Configuration & Startup To Delete existing configuration data, please use Further Configuration menussmit.cat/usr/sbin/mktcpip.ib/usr/sbin/mktcpip.ib -S $1_rawname_mkinetibAdd an IB Network Interfaceicm.cat/usr/sbin/mkiba_chinetibChange / Show an IB Interfacesmit.catfunction cmd_to_exec { eval chdev $* } cmd_to_execfunction cmd_to_discover { lsattr -E -l $1 |grep netaddr6 |awk '{ print $2 }' |grep : >/dev/null if [ $? = 0 ] then IP6=`lsattr -E -l $1 |grep netaddr6 |awk '{ print $2 }'` IP=`echo $IP6 | sed s/:/#!:/g` lsattr -E -l $1 -O | sed s/$IP6/$IP/ else lsattr -E -l $1 -O fi } cmd_to_discover_rawname_chinetibChange / Show an IB Interfacesmit.catfunction cmd_to_exec { eval chdev $* } cmd_to_execfunction cmd_to_discover { lsattr -E -l $1 |grep netaddr6 |awk '{ print $2 }' |grep : >/dev/null if [ $? = 0 ] then IP6=`lsattr -E -l $1 |grep netaddr6 |awk '{ print $2 }'` IP=`echo $IP6 | sed s/:/#!:/g` lsattr -E -l $1 -O | sed s/$IP6/$IP/ else lsattr -E -l $1 -O fi } cmd_to_discover_rawnameList All Network Interfacessmit.catlsdev -C -c if -t ib -F nameList All Defined IB Communication Managersicm.catlsdev -C -c management -s infiniband -t icmcmd_IcmChgInfoAdd an Infiniband Communication Managericm.catmkdev -c management -s infiniband -t icmlsattr -c management -s infiniband -t icm -D -Ocmd_IcmChgInfoChange / Show an Infiniband Connection Managericm.catchdev -l icmlsattr -l _rawname -E -Ocmd_rm_icmRemove an Infiniband Communications Managericm.catrmdevcfg_IcmoptConfigure a Defined Infiniband Communication Managericm.catmkdev mk_sdlcscie_mkAdd a Device Driverhdlc_device.catmkdev -c driver -s sdlc -t scie ch_sdlcscie_l,ch_sdlcscie_chChange/Show Characteristics of an SDLC Device Driverhdlc_device.catchdev lsattr -l logicname -E -Orm_sdlcscie_rmRemove a Device Driversmit.catrmdevcfg_sdlcscie_cfgConfigure a Defined Device Driversmit.catmkdev List All Defined Diskette Drivessmit.catlsdev -C -c diskettedskt_add,dskt_commonAdd a Diskette Drivesmit.catmkdev -c diskette -s siofd -t fd -p fda0lsattr -c diskette -s siofd -t fd -D -Odskt_chg,dskt_commonChange/Show Characteristics of a Diskette Drivesmit.catchdev lsattr -l logicname -E -Ormvdskt_optRemove a Diskette Drivesmit.catrmdev cfgdskt_optConfigure a Defined Diskette Drivesmit.catmkdev List All FC Adaptersfcs.catlsparent -C -k iocb;lsparent -C -k qiocb;lsparent -C -k qliocb;lsparent -C -k emfc; lsparent -C -k cviocbfca0,fca1,fca2,fca3,fca4Change/Show Characteristics of a FC Adapterfcs.catchdev lsattr -l logicname -E -Ofca0,fca1,fca2,fca3,fca4,fca6Change/Show Characteristics of a FC Adapterfcs.catchdev lsattr -l logicname -E -Ofca0,fca1,fca2,fca3,fca4,fca6Change/Show Characteristics of a FC Adapterfcs.catchdev lsattr -l logicname -E -Ofca0,fca1,fca2,fca3,fca4,fca6,fca7,fca10Change/Show Characteristics of a FC Adapterfcs.catchdev lsattr -l logicname -E -Ofca0,fca1,fca2,fca3,fca4,fca6,fca7,fca10Change/Show Characteristics of a FC Adapterfcs.catchdev lsattr -l logicname -E -Ofca0,fca1,fca2,fca4,fca7,fca8,fca9,fca10Change/Show Characteristics of a FC Adapterfcs.catchdev lsattr -l logicname -E -Ofca0,fca1,fca2,fca4,fca7,fca8,fca10Change/Show Characteristics of a FC Adapterfcs.catchdev lsattr -l logicname -E -Ofca0,fca1,fca2,fca4,fca7,fca8,fca9,fca10Change/Show Characteristics of a FC Adapterfcs.catchdev lsattr -l logicname -E -Ofca0,fca1,fca2,fca4,fca7,fca8,fca9,fca10,fca11Change/Show Characteristics of a FC Adapterfcs.catchdev lsattr -l logicname -E -Ofca0,fca1,fca2,fca4,fca7,fca8,fca9,fca10,fca11Change/Show Characteristics of a FC Adapterfcs.catchdev lsattr -l logicname -E -Ofca0,fca1,fca2,fca4,fca7,fca8,fca9,fca10,fca11Change/Show Characteristics of a FC Adapterfcs.catchdev lsattr -l logicname -E -Ofca0,fca1,fca2,fca4,fca7,fca8,fca9,fca10Change/Show Characteristics of a FC Adapterfcs.catchdev lsattr -l logicname -E -Ofca0,fca1,fca2,fca4,fca7,fca8,fca9,fca10Change/Show Characteristics of a FC Adapterfcs.catchdev lsattr -l logicname -E -Ofca0,fca1,fca2,fca4,fca7,fca8Change/Show Characteristics of a FC Adapterfcs.catchdev lsattr -l logicname -E -Ofca0,fca1,fca2,fca4,fca7,fca8,fca10Change/Show Characteristics of a FC Adapterfcs.catchdev lsattr -l logicname -E -Ofca0,fca1,fca2,fca4,fca8Change/Show Characteristics of a FC Adapterfcs.catchdev lsattr -l logicname -E -Ofca0,fca1,fca2,fca4,fca7,fca8Change/Show Characteristics of a FC Adapterfcs.catchdev lsattr -l logicname -E -Ofca0,fca1,fca2,fca4,fca8Change/Show Characteristics of a FC Adapterfcs.catchdev lsattr -l logicname -E -Ofca0,fca1,fca2,fca4,fca7,fca8Change/Show Characteristics of a FC Adapterfcs.catchdev lsattr -l logicname -E -Ofca0,fca1,fca2,fca4,fca7,fca8Change/Show Characteristics of a FC Adapterfcs.catchdev lsattr -l logicname -E -Ofca0,fca1,fca2,fca4,fca7,fca8Change/Show Characteristics of a FC Adapterfcs.catchdev lsattr -l logicname -E -Ofca0,fca1,fca2,fca4,fca7,fca8Change/Show Characteristics of a FC Adapterfcs.catchdev lsattr -l logicname -E -Ofca0,fca1,fca2,fca4,fca7,fca8,fca9,fca10Change/Show Characteristics of a FC Adapterfcs.catchdev lsattr -l logicname -E -Ofca0,fca1,fca2,fca4,fca7,fca8,fca9,fca10Change/Show Characteristics of a FC Adapterfcs.catchdev lsattr -l logicname -E -Ofca0,fca1,fca2,fca4,fca7,fca8Change/Show Characteristics of a FC Adapterfcs.catchdev lsattr -l logicname -E -Ofca0,fca1,fca2,fca4,fca7,fca8Change/Show Characteristics of a FC Adapterfcs.catchdev lsattr -l logicname -E -Ofca0,fca1,fca2,fca4,fca7,fca8,fca9,fca10Change/Show Characteristics of a FC Adapterfcs.catchdev lsattr -l logicname -E -Ofca0,fca1,fca2,fca4,fca7,fca8Change/Show Characteristics of a FC Adapterfcs.catchdev lsattr -l logicname -E -Ofca0,fca1,fca2,fca3,fca4,fca5Change/Show Characteristics of a FC Adapterfcs.catchdev lsattr -l logicname -E -Ofca0,fca1,fca2,fca3,fca4,fca5Change/Show Characteristics of a FC Adapterfcs.catchdev lsattr -l logicname -E -Ofca0,fca1,fca2,fca3,fca4,fca5Change/Show Characteristics of a FC Adapterfcs.catchdev lsattr -l logicname -E -Ofca0,fca1,fca2,fca3,fca4,fca5,fca6,fca10Change/Show Characteristics of a FC Adapterfcs.catchdev lsattr -l logicname -E -Ofca0,fca1,fca2,fca3,fca4,fca5,fca6,fca10Change/Show Characteristics of a FC Adapterfcs.catchdev lsattr -l logicname -E -Ofca0,fca1,fca2,fca3,fca4,fca5Change/Show Characteristics of a FC Adapterfcs.catchdev lsattr -l logicname -E -Ofca0,fca1,fca2,fca3,fca4,fca5Change/Show Characteristics of a FC Adapterfcs.catchdev lsattr -l logicname -E -Ofca0,fca1,fca2,fca3,fca4,fca5Change/Show Characteristics of a FC Adapterfcs.catchdev lsattr -l logicname -E -Ofca0,fca1,fca2,fca3,fca4,fca5Change/Show Characteristics of a FC Adapterfcs.catchdev lsattr -l logicname -E -Ofca0,fca1,fca2,fca3,fca4,fca5Change/Show Characteristics of a FC Adapterfcs.catchdev lsattr -l logicname -E -Ofca0,fca1,fca2,fca3,fca4,fca6,fca10Change/Show Characteristics of a FC Adapterfcs.catchdev lsattr -l logicname -E -Ofca0,fca1,fca2,fca4,fca5,fca8,fca9,fca10Change/Show Characteristics of a FC Adapterfcs.catchdev lsattr -l logicname -E -Ofca0,fca1,fca2,fca4,fca5,fca8,fca9,fca10Change/Show Characteristics of a FC Adapterfcs.catchdev lsattr -l logicname -E -Ofca0,fca1,fca2,fca4,fca5,fca8,fca9,fca10Change/Show Characteristics of a FC Adapterfcs.catchdev lsattr -l logicname -E -Ofca0,fca1,fca2,fca4,fca5,fca8,fca9,fca10Change/Show Characteristics of a FC Adapterfcs.catchdev lsattr -l logicname -E -Ofca0,fca1,fca2,fca3,fca4,fca5Change/Show Characteristics of a FC Adapterfcs.catchdev lsattr -l logicname -E -Ofca0,fca1,fca2,fca3,fca4,fca5Change/Show Characteristics of a FC Adapterfcs.catchdev lsattr -l logicname -E -Ofca0,fca1,fca2,fca3,fca4,fca5Change/Show Characteristics of a FC Adapterfcs.catchdev lsattr -l logicname -E -Ofca0,fca1,fca2,fca3,fca4,fca5Change/Show Characteristics of a FC Adapterfcs.catchdev lsattr -l logicname -E -Ofca0,fca1,fca2,fca3,fca4,fca5Change/Show Characteristics of a FC Adapterfcs.catchdev lsattr -l logicname -E -Ofca0,fca1,fca2,fca3,fca4,fca5,fca6,fca10Change/Show Characteristics of a FC Adapterfcs.catchdev lsattr -l logicname -E -Ofca0,fca1,fca2,fca3,fca4,fca5,fca6Change/Show Characteristics of a FC Adapterfcs.catchdev lsattr -l logicname -E -Ofca0,fca1,fca2,fca3,fca4,fca5,fca6,fca10Change/Show Characteristics of a FC Adapterfcs.catchdev lsattr -l logicname -E -Ofca0,fca1,fca2,fca4,fca7,fca8,fca9,fca10Change/Show Characteristics of a FC Adapterfcs.catchdev lsattr -l logicname -E -OList All FC SCSI Protocol Devicesfcp.catlsparent -C -k fcpenfscsi_optEnable a FC SCSI Protocol Devicefcp.catchdev -a autoconfig=available -l enfscsi_optEnable a FC SCSI Protocol Devicefcp.catchdev -a autoconfig=available -l enfscsi_optEnable a FC SCSI Protocol Devicefcp.catchdev -a autoconfig=available -l enfscsi_optEnable a FC SCSI Protocol Devicefcp.catchdev -a autoconfig=available -l fcp0,fcp1,fcp2,fcp3,fcp4Change/Show Characteristics of a FC SCSI Protocol Devicefcp.catchdev lsattr -l logicname -E -Ofcp0,fcp1,fcp2,fcp3Change/Show Characteristics of a FC SCSI Protocol Devicefcp.catchdev lsattr -l logicname -E -Ofcp0,fcp2,fcp3,fcp4Change/Show Characteristics of a FC SCSI Protocol Devicefcp.catchdev lsattr -l logicname -E -Ofcp0,fcp1,fcp2,fcp3Change/Show Characteristics of a FC SCSI Protocol Devicefcp.catchdev lsattr -l logicname -E -Ofcp0,fcp1,fcp2,fcp3Change/Show Characteristics of a FC SCSI Protocol Devicefcp.catchdev lsattr -l logicname -E -Ofcp0,fcp1,fcp2,fcp3,fcp4Change/Show Characteristics of a FC SCSI Protocol Devicefcp.catchdev lsattr -l logicname -E -Oenfscsi_optDisable a FC SCSI Protocol Devicefcp.catchdev -a autoconfig=defined -l enfscsi_optDisable a FC SCSI Protocol Devicefcp.catchdev -a autoconfig=defined -l enfscsi_optDisable a FC SCSI Protocol Devicefcp.catchdev -a autoconfig=defined -l enfscsi_optDisable a FC SCSI Protocol Devicefcp.catchdev -a autoconfig=defined -l enfscsi_optDisable a FC SCSI Protocol Devicefcp.catchdev -a autoconfig=defined -l List All FC-NVMe Protocol Devicesfcnvme.catlsdev -C -c driver -s nvmeofc -t emfcnvmefcnvme_optEnable a FC-NVMe Protocol Devicefcnvme.catchdev -a autoconfig=available -l fcnvme_optDisable a FC-NVMe Protocol Devicefcnvme.catchdev -a autoconfig=available -l fcnvme_opt0,fcnvme_opt1Change/Show Characteristics of a FC-NVMe Protocol Devicefcnvme.catchdev xx () { names='' values='' lsattr -l $1 -F 'attribute value' | while read attr value do newvalue=`echo ${value} | sed 's/:/#!:/g'` names=${attr}:${names} values=${newvalue}:${values} done echo '#'${names} echo ${values} }; xxlogicnameenablefcnd_optEnable a FC Network Deviceefcndd.catchnpdevice () { DEVICE=`lsdev -Cc driver -s iocb -t efcndd -F "name parent"|grep $1|awk '{print $1}'` if [ $DEVICE ] then chdev -l $DEVICE -a autoconfig=available fi } chnpdevice disablefcnd_optDisable a FC Network Deviceefcndd.catchnpdevice () { DEVICE=`lsdev -Cc driver -s iocb -t efcndd -F "name parent"|grep $1|awk '{print $1}'` if [ $DEVICE ] then chdev -l $DEVICE -a autoconfig=defined fi } chnpdevice fcndcsc_opt2,fcndcsc_opt3,fcndcsc_opt4,fcndcsc_opt5,fcndcsc_opt6Change/Show Characteristics of FC Network Driverefcndd.catchdev lsattr-l logicname -E -O_mktcpipxtMinimum Configuration & Startup To Delete existing configuration data, please use Further Configuration menussmit.catmktcpipmktcpip -S $1_rawname_chiffcNetwork Interface Driverssmit.catfunction cmd_to_exec { if [ -z "$3" ] then exit fi eval chdev $* } cmd_to_execlsattr -E -l fc0 -O_mkinetfcAdd a Fibre Channel Network Interfacefcs.catmkdev -c if -s FC -t fcfunction cmd_to_discover { lsattr -D -c if -s FC -t fc -O } cmd_to_discover_rawname_chinetfcChange / Show a Fibre Channel Network Interfacefcs.catfunction cmd_to_exec { eval chdev $* } cmd_to_execfunction cmd_to_discover { lsattr -E -l $1 -O } cmd_to_discover_rawnameList All Network Interfacessmit.catlsdev -C -c if -t fc -F nameList All Ethernet Adapterssmit.catlsparent -C -k entenet_chg,enet_compat_chg,enet_chg_xmt,enet_chg_ethernetChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_compat_chg,enet_chg_xmtChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_compat_chg,enet_chg_xmtChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_compat_chg,enet_chg_xmtChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_kentChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -OList All EtherChannels / Link Aggregationssmit.catfunction cmd_to_exec { for number in `LANG=C lsdev -Cc adapter -s pseudo -t ibm_ech -F name| awk -F "ent" '{print $2}' | sort -n`; do channel="ent${number}" status=`lsdev -Cc adapter -s pseudo -t ibm_ech | grep $channel | awk '{ print $2 }'` dspmsg -s 4 smit.cat 713 'EtherChannel / Link Aggregation: %s ' $channel dspmsg -s 4 smit.cat 714 'Status: %s ' $status dspmsg -s 4 smit.cat 715 'Attributes: ' lsattr -El $channel -F " attribute value description" echo "" done }; cmd_to_exec_addethchAdd an EtherChannel / Link Aggregationsmit.catfunction cmd_to_exec { command="mkdev -c adapter -s pseudo -t ibm_ech" for arg in "$@"; do command="${command} -a $arg " done $command if [[ $? = 0 ]]; then /usr/lib/methods/defif >/dev/null exit 0 else exit 1 fi }; cmd_to_exec_chgethch1Change / Show Characteristics of an EtherChannel / Link Aggregationsmit.catfunction cmd_to_exec { PATH=$PATH:/usr/lib/methods # Pre-process the arguments for the -C flag # We do this because although it is the last flag specified, we must # obtain its value before any call to "chdev" is performed for arg in "$@"; do if [[ $arg = "-C" ]]; then APPLY=-P fi done cmd="chdev" unset chdev_attr unset PADAPTER while getopts e:p:t:T:C:D:a:d:A:E:L:J:M:I:H:P:N:R:r:n: option; do case $option in e) ETHCH=$OPTARG cmd="${cmd} -l $ETHCH" ;; p) if [ $OPTARG != "NONE" ]; then PADAPTER="-p $OPTARG" fi ;; t) chdev_attr=true cmd="${cmd} -a adapter_names=$OPTARG" ;; T) chdev_attr=true cmd="${cmd} -a backup_adapters=$OPTARG" ;; C) # Do nothing, since this flag is processed above ;; D) ethchan_config -d $PADAPTER $ETHCH $OPTARG ;; a) ethchan_config -a $PADAPTER $ETHCH $OPTARG ;; d) ethchan_config -d $PADAPTER $ETHCH $OPTARG ;; A) ethchan_config -a -b $PADAPTER $ETHCH $OPTARG ;; E) ethchan_config -c $PADAPTER $ETHCH use_alt_addr $OPTARG ;; L) ethchan_config -c $PADAPTER $ETHCH alt_addr $OPTARG ;; J) chdev_attr=true cmd="${cmd} -a use_jumbo_frame=$OPTARG" ;; M) ethchan_config -c $PADAPTER $ETHCH mode $OPTARG ;; I) ethchan_config -c $PADAPTER $ETHCH interval $OPTARG ;; H) ethchan_config -c $PADAPTER $ETHCH hash_mode $OPTARG ;; P) ethchan_config -c $PADAPTER $ETHCH netaddr $OPTARG ;; N) ethchan_config -c $PADAPTER $ETHCH num_retries $OPTARG ;; R) ethchan_config -c $PADAPTER $ETHCH retry_time $OPTARG ;; r) ethchan_config -c $PADAPTER $ETHCH auto_recovery $OPTARG ;; n) ethchan_config -c $PADAPTER $ETHCH noloss_failover $OPTARG ;; esac done if [[ -n $APPLY ]]; then cmd="${cmd} $APPLY" fi # If at least one attribute must be set with chdev, execute it if [[ -n $chdev_attr ]]; then $cmd fi }; cmd_to_execfunction cmd_to_discover { attributes="`lsattr -l $1 -E -O | grep ^#`:empty_adapter" values="`lsattr -l $1 -E -O | grep -v ^#`:" p_adapter="NONE" for sea_adapter in `lsdev -Cc adapter -s pseudo -t sea -F name` do ech_adapter=`lsattr -El $sea_adapter -a real_adapter -F value` if [ $ech_adapter = $1 ] ; then p_adapter=$sea_adapter break; fi done echo "${attributes}:parent_adapter\n${values}:${p_adapter}" }; cmd_to_discover_rawname_delethch1smit.catrmdev -d -l _frcflvrethch1smit.cat/usr/lib/methods/ethchan_config -f List All VLANsvlan_ent.catlsdev -C -c adapter -t eth -s vlan_addvlan1Add A VLANvlan_ent.catfunction cmd_to_exec { DEV=`mkdev -c adapter -s vlan -t eth $@` if [ $? = 0 ] then DE=`echo $DEV | cut -f1 -d" " | cut -c1,2,4-` DT=`echo $DEV | cut -f1 -d" " | cut -c1,3-` /usr/lib/methods/defif -c if -t en -s EN -w $DE >/dev/null /usr/lib/methods/defif -c if -t en -s EN -w $DT >/dev/null exit 0 else exit 1 fi }; cmd_to_exec_rmvlan1Remove A VLANrmdev -d_chvlan1Change / Show Characteristics of a VLANvlan_ent.catchdev lsattr -l logicname -E -OList All Defined Diskssmit.catlsdev -C -c diskList All Supported Diskssmit.catlsdev -P -c disk -F "type subclass description "disk_scsi_addAdd a Disksmit.catmkdev -c diskdisk_scsi_add,disk_osdisk_scsi_addAdd a Disksmit.catmkdev -c disklsattr -c disk-s subclass -t type -D -Odisk_mstor,disk_mstor_change,disk_scsi_chg,disk_vmt_chg,disk_udidChange/Show Characteristics of a Disksmit.catchdev lsattr -l logicname -E -Odisk_chg,disk_scsi_chg,disk_vmt_chg,disk_udidChange/Show Characteristics of a Disksmit.catchdev lsattr -l logicname -E -Odisk_chg,disk_scsi_chg,disk_vmt_chg,disk_udidChange/Show Characteristics of a Disksmit.catchdev lsattr -l logicname -E -Odisk_chg,disk_scsi_chg,disk_mt_chg,disk_udidChange/Show Characteristics of a Disksmit.catchdev lsattr -l logicname -E -Odisk_chg,disk_scsi_chg,disk_osdisk_scsi_chg,disk_mt_chgChange/Show Characteristics of a Disksmit.catchdev lsattr -l logicname -E -Odisk_chg,disk_fcp_chg,disk_mt_chg,disk_udidChange/Show Characteristics of a Disksmit.catchdev lsattr -l logicname -E -Odisk_chg,disk_fcp_chg,disk_mt_chg,disk_udid,disk_dif_prot,disk_prot_typeChange/Show Characteristics of a Disksmit.catchdev lsattr -l logicname -E -Odisk_chg,disk_fcp_chg,disk_mt_chg,disk_udidChange/Show Characteristics of a Disksmit.catchdev lsattr -l logicname -E -Odisk_chg,disk_fcp_chg,disk_mt_chg,disk_udid,disk_dif_prot,disk_prot_typeChange/Show Characteristics of a Disksmit.catchdev lsattr -l logicname -E -Odisk_chg,disk_capidev_chg,disk_mt_chg,disk_udidChange/Show Characteristics of a Disksmit.catchdev lsattr -l logicname -E -Odisk_chg,disk_capidev_chg,disk_mt_chg,disk_udidChange/Show Characteristics of a Disksmit.catchdev lsattr -l logicname -E -Odisk_chg,disk_fcp_chg,disk_osdisk_scsi_chg,disk_mt_chgChange/Show Characteristics of a Disksmit.catchdev lsattr -l logicname -E -Odisk_chg,disk_iscsi_chg,disk_mt_chg,disk_udidChange/Show Characteristics of a Disksmit.catchdev lsattr -l logicname -E -Odisk_chg,disk_iscsi_chg,disk_osdisk_scsi_chg,disk_mt_chgChange/Show Characteristics of a Disksmit.catchdev lsattr -l logicname -E -Odisk_chg,disk_sas_chg,disk_mt_chg,disk_udidChange/Show Characteristics of a Disksmit.catchdev lsattr -l logicname -E -Odisk_chg,disk_sas_chg,disk_osdisk_scsi_chg,disk_mt_chgChange/Show Characteristics of a Disksmit.catchdev lsattr -l logicname -E -Odisk_chg,disk_nvme_chg,disk_udidChange/Show Characteristics of a Disksmit.catchdev lsattr -l logicname -E -Ormvdsk_optRemove a Disksmit.catrmdev cfgdsk_optConfigure a Defined Disksmit.catmkdev Monitor 128-Port Async Adaptersdevices.cat/usr/lbin/tty/mon-cxmaList All Cryptographic Adapterssmit.catlsparent -C -k CryptList All CAPI Flash Adapterscflash.catlsparent -C -k capidevcflash_name,cflash_chgChange / Show Characteristics of a CAPI Flash Adaptercflash.catchdev lsattr -l logicname -E -Ocflash_name,cflash_chgChange / Show Characteristics of a CAPI Flash Adaptercflash.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_heaChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Omk_ddricphx_mkAdd a Device Driverddricio.catmkdev -c driver -s riciophx -t ddricphx -w 0 rm_ddricphx_rmRemove a Device Driverddricio.catrmdevcfg_ddricphx_cfgConfigure a Defined Device Driverddricio.catmkdev List All IBM ARTIC960HX PCI Adaptersricio.catlsdev -C -c adapter -s pci -t riciophx -H/usr/sbin/clic_fipsmodechangefipsmode_optChange Cryptographic Operational Modekclic.cat/usr/sbin/clic_fipsmode _cache_changeChange / Show Characteristics of SSD Cache virtual devicecache_ssd.catcache_mgt cache setupxx () { names='' values='' lsattr -l $1 -F 'attribute value' | while read attr value do if [ '${name}'=='auto_grab_ssd' ]; then value=`echo ${value} | sed 's/^cm\(.\{1,\}\)/\1/g'` fi names=${attr}:${names} values=${value}:${values} done echo '#'${names} echo ${values} }; xxcachenameList SSD cache devicescache_ssd.catcache_mgt device list -lList cache poolscache_ssd.catcache_mgt pool list -l_cache_mkpoolCreate a cache Poolcache_ssd.catcache_mgt pool create_cache_rmpoolRemove a cache poolcache_ssd.catcache_mgt pool remove_cache_chpoolExtend a cache poolcache_ssd.catcache_mgt pool extendList cache partitionscache_ssd.catcache_mgt partition list -l_cache_mkpartCreate a cache partitioncache_ssd.catcache_mgt partition create_cache_rmpartRemove a cache partitioncache_ssd.catcache_mgt partition remove_cache_extpartExtend a cache partitioncache_ssd.catcache_mgt partition extend_cache_asspartAssign a cache partition to a target devicecache_ssd.catcache_mgt partition assign_cache_unasspart_tgtUnassign a cache partition from a target devicecache_ssd.catcache_mgt partition unassign_cache_unasspart_partUnassign a cache partition specified by its namecache_ssd.catcache_mgt partition unassignList cache pairscache_ssd.catcache_mgt cache list_cache_startSet and start caching a target devicecache_ssd.catcache_mgt cache start_cache_startdevStart caching a target device already setcache_ssd.catcache_mgt cache start_cache_stopStop caching a target devicecache_ssd.catcache_mgt cache stop_cache_stoppoolStop caching from a poolcache_ssd.catcache_mgt cache stopStart monitoringcache_ssd.catcache_mgt monitor startGet monitoring datacache_ssd.catcache_mgt monitor get -h -sStop monitoringcache_ssd.catcache_mgt monitor stopList registered Cache Enginecache_ssd.catcache_mgt engine list_cache_regRegister a Cache Enginecache_ssd.catcache_mgt engine register_cache_unregUnregister a Cache Enginecache_ssd.catcache_mgt engine unregisterStart the Cache Engine without SSD cache devicecache_ssd.catcache_mgt cache start -f/usr/sbin/lswpar/usr/sbin/lswpar -tS/usr/sbin/lswpar -tAsyswpar_name,preserve_Opts,stop_Opts,force_OptsRemove a System Workload Partitionsmwpar.cat/usr/sbin/rmwparcorralhelp.catappwpar_name,force_OptsRemove an Application Workload Partitionsmwpar.cat/usr/sbin/rmwparcorralhelp.catname_Opts,hostname_Opts,base_dir_Opts,default_volume_Opts,userscript_Opts,network_Opts,routing_Opts,create_Opts,spec_outfile_Opts,start_Opts,specify_rsrc_Opts,security_Opts,device_Opts,extension_Opts,copycontrol_main_Opts,copycontrol_attr_Opts,default_mnts_Opts,global_name_res_Opts,checkpoint_Opts,auto_rslv_Opts,arch_Opts,private_OptsCreate a System Workload Partition (Advanced)smwpar.catfunction cmd_ex { /usr/sbin/mkwpar $(/usr/lib/corrals/sm_par -- "$@") } cmd_ex/usr/lib/corrals/sm_par -t system 2>/dev/nullcorralhelp.catname_Opts,hostname_Opts,base_dir_Opts,userscript_Opts,network_Opts,routing_Opts,create_Opts,spec_outfile_Opts,start_Opts,specify_rsrc_Opts,security_Opts,rvg_device_Opts,extension_Opts,copycontrol_main_Opts,copycontrol_attr_Opts,rvg_mnts_Opts,global_name_res_Opts,checkpoint_Opts,auto_rslv_Opts,arch_Opts,private_OptsCreate a RootVG System Workload Partition (Advanced)smwpar.catfunction cmd_ex { /usr/sbin/mkwpar $(/usr/lib/corrals/sm_par -- "$@") } cmd_ex/usr/lib/corrals/sm_par -t system 2>/dev/nullcorralhelp.catname_Opts,hostname_Opts,base_dir_Opts,default_volume_Opts,userscript_Opts,network_Opts,routing_Opts,create_Opts,spec_outfile_Opts,start_Opts,specify_rsrc_Opts,security_Opts,extension_Opts,etcfs_mntgroup_Opts,global_name_res_Opts,checkpoint_Opts,auto_rslv_Opts,arch_Opts,private_OptsCreate a System Workload Partition (Advanced)smwpar.catfunction cmd_ex { /usr/sbin/mkwpar $(/usr/lib/corrals/sm_par -- "$@") } cmd_excorralhelp.catname_Opts,hostname_Opts,base_dir_Opts,default_volume_Opts,userscript_Opts,network_Opts,routing_Opts,create_Opts,spec_outfile_Opts,start_Opts,preserve_mount_Opts,specify_rsrc_Opts,security_Opts,extension_Opts,copycontrol_main_Opts,copycontrol_attr_Opts,nfs_mnts_sys_Opts,global_name_res_Opts,checkpoint_Opts,auto_rslv_Opts,arch_Opts,private_OptsCreate a System Workload Partition (Advanced)smwpar.catfunction cmd_ex { /usr/sbin/mkwpar $(/usr/lib/corrals/sm_par -- "$@") } cmd_excorralhelp.catspec_file_location,name_Opts,hostname_Opts,base_dir_Opts,default_volume_Opts,userscript_Opts,network_Opts,routing_Opts,create_Opts,spec_outfile_Opts,start_Opts,frmspec_rsrc_Opts,preserve_mount_Opts,security_Opts,specify_mnts_sys_Opts,global_name_res_Opts,checkpoint_Opts,auto_rslv_Opts,arch_Opts,private_OptsCreate a Workload Partition from a Specification Filesmwpar.catfunction cmd_ex { /usr/sbin/mkwpar $(/usr/lib/corrals/sm_par -- "$@") } cmd_exfunction cmd_di { /usr/lib/corrals/sm_par -f $1 -t system 2>/dev/null && return 0 case "${?}" in 1) /usr/bin/dspmsg -s 1 /usr/lib/nls/msg/$LANG/smwpar.cat 111 'Unable to find file %1$s\n' $1 ;; 3) echo 'Internal error: Invalid workload partition type specified.' ;; 4) /usr/bin/dspmsg -s 1 /usr/lib/nls/msg/$LANG/smwpar.cat 113 'Specification file %1$s is not for a System Workload Partition.\n' $1 ;; *) /usr/bin/dspmsg -s 1 /usr/lib/nls/msg/$LANG/smwpar.cat 114 'An error occurred while trying to read file "%1$s"\n' $1 ;; esac return $? } cmd_di_rawnamecorralhelp.catspec_file_location,name_Opts,hostname_Opts,base_dir_Opts,userscript_Opts,network_Opts,routing_Opts,create_Opts,spec_outfile_Opts,start_Opts,frmspec_rsrc_Opts,security_Opts,rvg_device_Opts,global_name_res_Opts,checkpoint_Opts,auto_rslv_Opts,arch_Opts,private_OptsCreate a RootVG Workload Partition from a Specification Filesmwpar.catfunction cmd_ex { /usr/sbin/mkwpar $(/usr/lib/corrals/sm_par -- "$@") } cmd_exfunction cmd_di { /usr/lib/corrals/sm_par -f $1 -t system 2>/dev/null && return 0 case "${?}" in 1) /usr/bin/dspmsg -s 1 /usr/lib/nls/msg/$LANG/smwpar.cat 111 'Unable to find file %1$s\n' $1 ;; 3) echo 'Internal error: Invalid workload partition type specified.' ;; 4) /usr/bin/dspmsg -s 1 /usr/lib/nls/msg/$LANG/smwpar.cat 113 'Specification file %1$s is not for a System Workload Partition.\n' $1 ;; *) /usr/bin/dspmsg -s 1 /usr/lib/nls/msg/$LANG/smwpar.cat 114 'An error occurred while trying to read file "%1$s"\n' $1 ;; esac return $? } cmd_di_rawnamecorralhelp.catwparnames_frm_ctd,clonewpar_spec_outfile_OptsCreate a Specification File from a Workload Partitionsmwpar.catfunction cmd_ex { /usr/sbin/mkwpar -w $(/usr/lib/corrals/sm_par -- "$@") } cmd_execho "#_ctd_wpar_type\nsystem"corralhelp.catwparnames_frm_ctd,clonewpar_spec_outfile_OptsCreate a Specification File from a Workload Partitionsmwpar.catfunction cmd_ex { /usr/sbin/wparexec -w $(/usr/lib/corrals/sm_par -- "$@") } cmd_execho "#_ctd_wpar_type\napplication"corralhelp.catstartwparOpts_sys/usr/sbin/startwparstartmwparOpts_sys/usr/sbin/startwpar -msyswpar_name_active_broken_maintenance,force_OptsStop a Workload Partitionsmwpar.cat/usr/sbin/stopwparcorralhelp.catsyswpar_name_active_maintenance,force_OptsReboot a Workload Partitionsmwpar.cat/usr/sbin/stopwpar -rcorralhelp.catsyncwparOpts_sysSynchronize Workload Partition Software with System Softwaresmwpar.cat/usr/sbin/syncwparcorralhelp.catchwpar_name_Opts,hostname_Opts,chwpar_routing_Opts,base_dir_Opts,userscript_Opts,specify_rsrc_Opts,chwpar_security_Opts,chwpar_device_Opts,chwpar_extension_Opts,chwpar_checkpoint_Opts,chgwpar_force_Opts,vwpar_ostype_Opts,,chwpar_start_Opts,arch_Opts,chwpar_private_OptsChange / Show General Characteristicssmwpar.catfunction cmd_ex { name=$1 shift /usr/lib/corrals/sm_par -n $name -- $* | while read args; do /usr/sbin/chwpar $args; done return $? } cmd_exfunction cmd_di { /usr/lib/corrals/sm_par -n $1 } cmd_di_rawnamecorralhelp.catchwpar_name_Opts,hostname_Opts,remove_rsrc_Opts,frmspec_rsrc_Opts,chgwpar_force_OptsChange / Show General Characteristicssmwpar.catfunction cmd_ex { name=$1 shift /usr/lib/corrals/sm_par -n $name -- $* | while read args; do /usr/sbin/chwpar $args; done return $? } cmd_exfunction cmd_di { /usr/lib/corrals/sm_par -n $1 } cmd_di_rawnamecorralhelp.catnetlswparOpts/usr/sbin/lswpar -NnetaddwparOptsAdd a Network Interfacesmwpar.cat/usr/sbin/chwpar -Ncorralhelp.catnetrmwparOptsRemove a Network Interfacesmwpar.catfunction cmd_ex { /usr/sbin/chwpar -K $(/usr/lib/corrals/sm_par -- $1) $2; } cmd_excorralhelp.catfslswparOpts/usr/sbin/lsfs -umntlswparOptsfunction cmd_ex { dir=`/usr/sbin/lswpar -c -q -a directory $1 2>/dev/null` /usr/sbin/mount | /usr/bin/awk -vdir="${dir}" 'NF > 3 { line++ if (index($0,$1) == 1) tmp=$3 else tmp=$2 if (line < 3) print else if (tmp ~ "^" dir) print}' } cmd_exsyswpar_name,add_fs_syswpar_OptsAdd a File System to the Mount Listsmwpar.catfunction cmd_ex { for name; do :; done /usr/sbin/chwpar $(/usr/lib/corrals/sm_par -- "$@") $name } cmd_excorralhelp.catsyswpar_name,rm_fs_syswpar_OptsRemove a File System from the Mount Listsmwpar.catfunction cmd_ex { for name; do :; done /usr/sbin/chwpar -K $(/usr/lib/corrals/sm_par -- "$@") $name } cmd_excorralhelp.catmntwparOptsMount a File Systemsmwpar.catfunction cmd_ex { Opts="" Optsd="" Optsf="" Optst="" while getopts "d:f:n:o:t:" OPT do case "${OPT}" in d) Optsd="${OPTARG}";; f) Optsf="${OPTARG}";; n|o) Opts="${Opts}-${OPT} ${OPTARG} ";; t) Optst="${OPTARG}";; esac done dir=`/usr/sbin/lswpar -tS -c -q -a directory ${Optst} 2>/dev/null` if [ ${Optsd} != "/" ] then /usr/sbin/mount ${Opts} ${Optsf} ${dir}${Optsd} else /usr/sbin/mount ${Opts} ${Optsf} ${dir} fi } cmd_excorralhelp.catumntwparOptsUnmount a File Systemsmwpar.catfunction cmd_ex { dir=`/usr/sbin/lswpar -tS -c -q -a directory ${2} 2>/dev/null` if [ ${1} != "/" ] then /usr/sbin/unmount "${dir}${1}" else /usr/sbin/unmount "${dir}" fi } cmd_excorralhelp.catname_Opts,hostname_Opts,apptorun_Opts,userscriptOpts,network_Opts,routing_Opts,create_Opts,spec_outfile_Opts,auto_rslv_Opts,arch_OptsCreate an Application Workload Partitionsmwpar.catfunction cmd_ex { /usr/sbin/wparexec $(/usr/lib/corrals/sm_par -t app -- "$@") } cmd_excorralhelp.catname_Opts,hostname_Opts,apptorun_Opts,userscript_Opts,network_Opts,routing_Opts,create_Opts,spec_outfile_Opts,specify_rsrc_Opts,specify_mnts_app_Opts,auto_rslv_Opts,arch_OptsCreate an Application Workload Partition (Advanced)smwpar.catfunction cmd_ex { /usr/sbin/wparexec $(/usr/lib/corrals/sm_par -t app -- "$@") } cmd_excorralhelp.catspec_file_location,name_Opts,hostname_Opts,apptorun_Opts,userscript_Opts,network_Opts,routing_Opts,create_Opts,spec_outfile_Opts,frmspec_rsrc_Opts,specify_mnts_app_Opts,auto_rslv_Opts,arch_OptsCreate a Workload Partition from a Specification Filesmwpar.catfunction cmd_ex { /usr/sbin/wparexec $(/usr/lib/corrals/sm_par -t app -- "$@") } cmd_exfunction cmd_di { /usr/lib/corrals/sm_par -f $1 -t application 2>/dev/null && return 0 case "${?}" in 1) /usr/bin/dspmsg -s 1 /usr/lib/nls/msg/$LANG/smwpar.cat 111 'Unable to find file %1$s\n' $1 ;; 3) echo 'Internal error: Invalid workload partition type specified.' ;; 4) /usr/bin/dspmsg -s 1 /usr/lib/nls/msg/$LANG/smwpar.cat 143 'Specification file %1$s is not for an Application Workload\nPartition.\n' $1 ;; *) /usr/bin/dspmsg -s 1 /usr/lib/nls/msg/$LANG/smwpar.cat 114 'An error occurred while trying to read file "%1$s"\n' $1 ;; esac return $? } cmd_di_rawnamecorralhelp.catname_Opts,hostname_Opts,base_dir_Opts,default_volume_Opts,network_Opts,routing_Opts,create_Opts,spec_outfile_Opts,start_Opts,global_name_res_Opts,auto_rslv_Opts,arch_OptsCreate a System Workload Partitionsmwpar.catfunction cmd_ex { /usr/sbin/mkwpar $(/usr/lib/corrals/sm_par -- "$@") } cmd_excorralhelp.catsavewparfileOptsBack Up a Workload Partition to Tape/Filesmwpar.cat/usr/bin/savewpar corralhelp.catsavewparcdYesOptsBack Up a Workload Partition to CDsmwpar.cat/usr/sbin/mkcdcorralhelp.catsavewparcdNoOptsBack Up a Workload Partition to CDsmwpar.cat/usr/sbin/mkcdcorralhelp.catsavewpardvdYesISO9660OptsBack Up a Workload Partition to ISO9660 DVDsmwpar.cat/usr/sbin/mkcd -Lcorralhelp.catsavewpardvdYesUDFOptsBack Up a Workload Partition to UDF DVDsmwpar.cat/usr/sbin/mkcd -Ucorralhelp.catsavewpardvdNoISO9660OptsBack Up a Workload Partition to ISO9660 DVDsmwpar.cat/usr/sbin/mkcd -Lcorralhelp.catsavewpardvdNoUDFOptsBack Up a Workload Partition to UDF DVDsmwpar.cat/usr/sbin/mkcd -Ucorralhelp.catrestwparOptsRestore a Workload Partitionsmwpar.cat/usr/sbin/restwparcorralhelp.catlssavewparinfoOptsPreview Information about a Workload Partition Backupsmwpar.catsm_lssavewpar() { INFOFLAG=-l ARGS="$@" while [[ -n $1 ]]; do typeset OPTION=$1 if [[ $OPTION = -M ]] || [[ $OPTION = -N ]] then INFOFLAG= fi shift done /usr/bin/lssavewpar $INFOFLAG $ARGS } sm_lssavewparcorralhelp.catlssavewparlppOptsList Filesets in a Workload Partition Backupsmwpar.catlssavewparcorralhelp.catlssavewparOptsList Files in a Workload Partition Backupsmwpar.catlssavewparcorralhelp.catrestwparfilesOptsRestore Files in a Workload Partition Backupsmwpar.catrestwparfilescorralhelp.catprobevuevaluesChange/Show current configured valuesetrcctrl.cat/usr/lib/ras/etrcctrl_smutil -t/usr/lib/ras/etrcctrl_smutil -l -tprobevuevaluesChange/Show next boot configured valuesetrcctrl.cat/usr/lib/ras/etrcctrl_smutil -p /usr/lib/ras/etrcctrl_smutil -l -pList all Event Groupssmit.cattrcevgrp -ltrcgroup_addAdd an Event Groupsmit.cattrcevgrp -a harf() { echo "#name:desc:ids"; grp=`echo $1 | cut -d" " -f1` cnt=`trcevgrp -l $grp 2> /dev/null | wc -l`; if [ $cnt = 2 ]; then info=`trcevgrp -l $grp 2> /dev/null | sed -e 's/://g' -e '1s/-/:/' -e '1s/$/:/' | paste -s -`; name=`echo $info | cut -d":" -f1`; desc=`echo $info | cut -d":" -f2 | sed -e 's/ //'`; ids=`echo $info | cut -d":" -f3 | sed -e 's/ //g'`; echo "${name}:${desc}:${ids}"; else echo "::"; fi; }; harf_rawnamegrp_chChange/Show an Event Groupsmit.cattrcevgrp -u harf() { grp=`echo $1 | cut -d" " -f1` cnt=`trcevgrp -l $grp 2> /dev/null | wc -l`; if [ $cnt = 2 ]; then echo "#name:desc:ids"; info=`trcevgrp -l $grp 2> /dev/null | sed -e 's/://g' -e '1s/-/:/' -e '1s/$/:/' | paste -s -`; name=`echo $info | cut -d":" -f1`; desc=`echo $info | cut -d":" -f2 | sed -e 's/ //'`; ids=`echo $info | cut -d":" -f3 | sed -e 's/ //g'`; echo "${name}:${desc}:${ids}"; else trcevgrp -l $grp; fi; }; harf_rawnamedelgrpRemove Event Groupssmit.cattrcevgrp -rtrcrpt,trcrpt_filenameGenerate a Trace Reportsmit.cattrcrpttrcrpt,trcrpt_printerGenerate a Trace Reportsmit.cattrcrptLANG=C; export LANG NL_MESSAGES=C; export NL_MESSAGES a=`switch.prt -d | grep AIX` rc=$? if [[ $rc -eq 0 ]]; then DFLT=`cat /etc/qconfig | awk 'BEGIN {FS=":";} $1 !~ /^\*/ {print $1; exit;}'` else lpstat -d | grep "no system default" >> /dev/null rc=$? if [[ $rc -eq 0 ]]; then DFLT="" else DFLT=`lpstat -d | awk '{print $4'}'` fi fi print '#trcrpt_printer' print $DFLTtrcstopoptsSTOP Tracesmit.cat/usr/bin/trcstoptrcstartSTART Tracesmit.cat/usr/bin/trace/usr/lib/ras/trace_smutil getdfltsmngtraceManage Tracesmit.cat/usr/bin/trcctl/usr/lib/ras/trace_smutil getdfltscngtraceChange/Show Default Valuessmit.cat/usr/bin/trcctl/usr/lib/ras/trace_smutil getdfltsReset Original Default Valuessmit.cat/usr/bin/trcctl -r -lmksysbOptsBack Up This System to Tape/File or UDFS capable mediasm_cmdbsys.catx() { FLAGS= X_WPARS= while getopts "VXb:eimpvaAGF:t:ZNx:TC $*" opt; do case $opt in V) FLAGS="${FLAGS} -V" ;; X) FLAGS="${FLAGS} -X" ;; Z) FLAGS="${FLAGS} -Z" ;; b) FLAGS="${FLAGS} -b $OPTARG";; i) FLAGS="${FLAGS} -i" ;; m) FLAGS="${FLAGS} -m" ;; e) FLAGS="${FLAGS} -e" ;; v) FLAGS="${FLAGS} -v" ;; p) FLAGS="${FLAGS} -p" ;; a) FLAGS="${FLAGS} -a" ;; A) FLAGS="${FLAGS} -A" ;; F) FLAGS="${FLAGS} -F $OPTARG";; t) FLAGS="${FLAGS} -t $OPTARG";; G) X_WPARS=1; FLAGS="${FLAGS} -G";; x) FLAGS="${FLAGS} -x $OPTARG";; T) FLAGS="${FLAGS} -T" ;; C) FLAGS="${FLAGS} -C" ;; esac done shift $(($OPTIND -1)) NAME=$1 D_WPARS=`/usr/sbin/lswpar -q -s D -a name 2>/dev/null` if [ -n "$D_WPARS" ] && [ -z "$X_WPARS" ] then /usr/bin/dspmsg -s 1 sm_cmdbsys.cat 52 "ATTENTION: This is a system WPAR that contains WPARS in the Defined state. The filesystems are going to be mounted and unmounted for backup purposes. If you do not want to backup these file systems, please use the command line option. " FLAGS="${FLAGS} -N" else FLAGS="${FLAGS}" fi /usr/bin/mksysb ${FLAGS} $NAME } xlsmksysbOptsList Files in a System Imagesm_cmdbsys.catlistvgbackuplsmksysbOptsPreview Information about a Backupsm_cmdbsys.catlistvgbackup -lverify_tape_optVerify the Readability of a Backup (Tape only)sm_cmdbsys.catlistvgbackup -VView the Backup Logsm_cmdbsys.catlistvgbackup -BlsmksysbOptsList Information about Filesets in a System Imagesm_cmdbsys.catlistvgbackup -LrestmksysbOptsRestore Files in a System Imagesm_cmdbsys.catrestorevgfiles -rmkcdYesOptsBack Up This System to CDsm_cmdbsys.cat/usr/sbin/mkcdmkcdNoOptsBack Up This System to CDsm_cmdbsys.catx(){ FLAGS= X_WPARS= while [[ $# -gt 0 ]] do case $1 in -d) FLAGS="${FLAGS} -d $2"; shift ;; -r) FLAGS="${FLAGS} -r $2"; shift ;; -p) FLAGS="${FLAGS} -p $2"; shift ;; -e) FLAGS="${FLAGS} -e" ;; -c) FLAGS="${FLAGS} -c" ;; -a) FLAGS="${FLAGS} -a" ;; -B) FLAGS="${FLAGS} -B" ;; -M) FLAGS="${FLAGS} -M $2"; shift ;; -C) FLAGS="${FLAGS} -C $2"; shift ;; -I) FLAGS="${FLAGS} -I $2"; shift ;; -V) FLAGS="${FLAGS} -V $2"; shift ;; -b) FLAGS="${FLAGS} -b $2"; shift ;; -l) FLAGS="${FLAGS} -l $2"; shift ;; -P) FLAGS="${FLAGS} -P" ;; -z) FLAGS="${FLAGS} -z $2"; shift ;; -u) FLAGS="${FLAGS} -u $2"; shift ;; -D) FLAGS="${FLAGS} -D" ;; -i) FLAGS="${FLAGS} -i $2"; shift ;; -A) FLAGS="${FLAGS} -A" ;; -Z) FLAGS="${FLAGS} -Z" ;; -S) FLAGS="${FLAGS} -S" ;; -R) FLAGS="${FLAGS} -R" ;; -G) X_WPARS=1; FLAGS="${FLAGS} -G";; -x) FLAGS="${FLAGS} -x $2"; shift ;; -T) FLAGS="${FLAGS} -T" ;; esac shift done D_WPARS=`/usr/sbin/lswpar -q -s D -a name 2>/dev/null` if [ -n "$D_WPARS" ] && [ -z "$X_WPARS" ] then /usr/bin/dspmsg -s 1 sm_cmdbsys.cat 52 "ATTENTION: This is a system WPAR that contains WPARS in the Defined state. The filesystems are going to be mounted and unmounted for backup purposes. If you do not want to backup these file systems, please use the command line option. " FLAGS="${FLAGS} -N" else FLAGS="${FLAGS}" fi /usr/sbin/mkcd ${FLAGS} } xmkdvdYesISO9660OptsBack Up This System to ISO9660 DVDsm_cmdbsys.cat/usr/sbin/mkcd -LmkcdYesUDFOptsBack Up This System to UDF DVDsm_cmdbsys.cat/usr/sbin/mkcd -UmkdvdNoISO9660OptsBack Up This System to ISO9660 DVDsm_cmdbsys.catx(){ FLAGS= X_WPARS= while [[ $# -gt 0 ]] do case $1 in -d) FLAGS="${FLAGS} -d $2"; shift ;; -r) FLAGS="${FLAGS} -r $2"; shift ;; -p) FLAGS="${FLAGS} -p $2"; shift ;; -e) FLAGS="${FLAGS} -e" ;; -c) FLAGS="${FLAGS} -c" ;; -M) FLAGS="${FLAGS} -M $2"; shift ;; -C) FLAGS="${FLAGS} -C $2"; shift ;; -I) FLAGS="${FLAGS} -I $2"; shift ;; -V) FLAGS="${FLAGS} -V $2"; shift ;; -b) FLAGS="${FLAGS} -b $2"; shift ;; -l) FLAGS="${FLAGS} -l $2"; shift ;; -P) FLAGS="${FLAGS} -P" ;; -z) FLAGS="${FLAGS} -z $2"; shift ;; -u) FLAGS="${FLAGS} -u $2"; shift ;; -D) FLAGS="${FLAGS} -D" ;; -i) FLAGS="${FLAGS} -i $2"; shift ;; -A) FLAGS="${FLAGS} -A" ;; -Z) FLAGS="${FLAGS} -Z" ;; -S) FLAGS="${FLAGS} -S" ;; -a) FLAGS="${FLAGS} -a" ;; -B) FLAGS="${FLAGS} -B" ;; -R) FLAGS="${FLAGS} -R" ;; -G) X_WPARS=1; FLAGS="${FLAGS} -G";; -x) FLAGS="${FLAGS} -x $2"; shift ;; -T) FLAGS="${FLAGS} -T" ;; esac shift done D_WPARS=`/usr/sbin/lswpar -q -s D -a name 2>/dev/null` if [ -n "$D_WPARS" ] && [ -z "$X_WPARS" ] then /usr/bin/dspmsg -s 1 sm_cmdbsys.cat 52 "ATTENTION: This is a system WPAR that contains WPARS in the Defined state. The filesystems are going to be mounted and unmounted for backup purposes. If you do not want to backup these file systems, please use the command line option. " FLAGS="${FLAGS} -L -N" else FLAGS="${FLAGS} -L" fi /usr/sbin/mkcd ${FLAGS} } xmkcdNoUDFOptsBack Up This System to UDF DVDsm_cmdbsys.catx(){ FLAGS= X_WPARS= while [[ $# -gt 0 ]] do case $1 in -d) FLAGS="${FLAGS} -d $2"; shift ;; -r) FLAGS="${FLAGS} -r $2"; shift ;; -p) FLAGS="${FLAGS} -p $2"; shift ;; -e) FLAGS="${FLAGS} -e" ;; -c) FLAGS="${FLAGS} -c" ;; -M) FLAGS="${FLAGS} -M $2"; shift ;; -C) FLAGS="${FLAGS} -C $2"; shift ;; -I) FLAGS="${FLAGS} -I $2"; shift ;; -V) FLAGS="${FLAGS} -V $2"; shift ;; -b) FLAGS="${FLAGS} -b $2"; shift ;; -l) FLAGS="${FLAGS} -l $2"; shift ;; -P) FLAGS="${FLAGS} -P" ;; -z) FLAGS="${FLAGS} -z $2"; shift ;; -u) FLAGS="${FLAGS} -u $2"; shift ;; -D) FLAGS="${FLAGS} -D" ;; -i) FLAGS="${FLAGS} -i $2"; shift ;; -A) FLAGS="${FLAGS} -A" ;; -Z) FLAGS="${FLAGS} -Z" ;; -S) FLAGS="${FLAGS} -S" ;; -a) FLAGS="${FLAGS} -a" ;; -B) FLAGS="${FLAGS} -B" ;; -R) FLAGS="${FLAGS} -R" ;; -G) X_WPARS=1; FLAGS="${FLAGS} -G";; -x) FLAGS="${FLAGS} -l $2"; shift ;; -T) FLAGS="${FLAGS} -T" ;; esac shift done D_WPARS=`/usr/sbin/lswpar -q -s D -a name 2>/dev/null` if [ -n "$D_WPARS" ] && [ -z "$X_WPARS" ] then /usr/bin/dspmsg -s 1 sm_cmdbsys.cat 52 "ATTENTION: This is a system WPAR that contains WPARS in the Defined state. The filesystems are going to be mounted and unmounted for backup purposes. If you do not want to backup these file systems, please use the command line option. " FLAGS="${FLAGS} -U -N" else FLAGS="${FLAGS} -U" fi /usr/sbin/mkcd ${FLAGS} } xlsbackvgOptsList Files in a Volume Group Backupsm_cmdbsys.cat/usr/bin/listvgbackup -srestsavevgOptsRestore Files in a Volume Group Backupsm_cmdbsys.cat/usr/bin/restorevgfiles -s -rsavevgOptsBack Up a Volume Group to Tape/File or UDFS capable mediasm_cmdbsys.cat/usr/bin/savevg restvgOptsRemake a Volume Groupsm_cmdbsys.cat/usr/bin/restvg -qsavevgcdYesOptsBack Up a Volume Group to CDsm_cmdbsys.cat/usr/sbin/mkcdsavevgcdNoOptsBack Up a Volume Group to CDsm_cmdbsys.cat/usr/sbin/mkcdsavevgdvdYesISO9660OptsBack Up a Volume Group to ISO9660 DVDsm_cmdbsys.cat/usr/sbin/mkcd -LsavevgdvdYesUDFOptsBack Up a Volume Group to UDF DVDsm_cmdbsys.cat/usr/sbin/mkcd -UsavevgdvdNoISO9660OptsBack Up a Volume Group to ISO9660 DVDsm_cmdbsys.cat/usr/sbin/mkcd -LsavevgdvdNoUDFOptsBack Up a Volume Group to UDF DVDsm_cmdbsys.cat/usr/sbin/mkcd -Uinstall_latest,common_opts,req,over,lang,prev_lic,accept_lic,live_update,common_install,wpar_inst_discovered,wpar_mgmt,wpar_mgmt_devInstall Softwaresmit.catpreprocess_inuwpar() { while [[ -n $1 ]]; do typeset OPTION=$1 case $OPTION in -D) INUWPAR=${INUWPAR:+"$INUWPAR "}"-D";; -M) INUWPAR=${INUWPAR:+"$INUWPAR "}"-G";; -I) INUWPAR_ENABLED="1";; -K) shift; INUWPAR=${INUWPAR:+"$INUWPAR "}"-d $1";; -k) shift; INUWPAR_FILE=$1;; *) ARGS=${ARGS:+"$ARGS "}"'$OPTION'";; esac shift done if [[ -n $INUWPAR_FILE ]]; then if [[ `head -1 $INUWPAR_FILE` == '_all_wpars' ]]; then INUWPAR=${INUWPAR:+"$INUWPAR "}"-A" else awk '{gsub(/ /,"\n");print}' < $INUWPAR_FILE > /tmp/inuwpar.$$.list mv /tmp/inuwpar.$$.list $INUWPAR_FILE INUWPAR=${INUWPAR:+"$INUWPAR "}"-f $INUWPAR_FILE" fi fi if [[ -n $INUWPAR_ENABLED ]]; then eval /usr/sbin/inuwpar $INUWPAR /usr/lib/instl/sm_inst installp_cmd -a -Q ${ARGS:+$ARGS} else eval /usr/lib/instl/sm_inst installp_cmd -a -Q ${ARGS:+$ARGS} fi } preprocess_inuwparYESNO=`dspmsg -s 1 smit.cat 51 'yes,no'` YES=`echo ${YESNO} | cut -f1 -d','` NO=`echo ${YESNO} | cut -f2 -d','` echo '#exists'; LANG=C LC_ALL=C lswpar -qa privateusr 2> /dev/null | grep -iqw yes && echo "${YES}" || echo "${NO}" update_all,prev_updt,common_opts,req,prev_lic,accept_lic,wpar_inst_discovered,wpar_mgmt,wpar_mgmt_devUpdate Installed Software to Latest Level (Update All)smit.catpreprocess_inuwpar() { RC=0 CRC=0 WRC=0 GRC=0 WDEV= GINST= while [[ -n $1 ]]; do typeset OPTION=$1 case $OPTION in -D) INUWPAR=${INUWPAR:+"$INUWPAR "}"-D";; -M) GINST=1;; -I) INUWPAR_ENABLED="1";; -K) shift; WDEV="-d $1 ";; -k) shift; INUWPAR_FILE=$1;; -d) shift; IDEV="-d $1 ";; -p) INUWPAR=${INUWPAR:+"$INUWPAR "}"-p" ARGS=${ARGS:+"$ARGS "}"'$OPTION'";; -X) INUWPAR=${INUWPAR:+"$INUWPAR "}"-X" ARGS=${ARGS:+"$ARGS "}"'$OPTION'";; -V2) INUWPAR=${INUWPAR:+"$INUWPAR "}"-v" ARGS=${ARGS:+"$ARGS "}"'$OPTION'";; *) ARGS=${ARGS:+"$ARGS "}"'$OPTION'";; esac shift done if [[ -n $WDEV ]]; then SDEV=${WDEV} else SDEV=${IDEV} fi if [[ -n $INUWPAR_FILE ]]; then if [[ `head -1 $INUWPAR_FILE` == '_all_wpars' ]]; then INUWPAR=${INUWPAR:+"$INUWPAR "}"-A" else awk '{gsub(/ /,"\n");print}' < $INUWPAR_FILE > /tmp/inuwpar.$$.list mv /tmp/inuwpar.$$.list $INUWPAR_FILE INUWPAR=${INUWPAR:+"$INUWPAR "}"-f $INUWPAR_FILE" fi fi if [[ -n $INUWPAR_ENABLED ]]; then if [[ -n $GINST ]]; then eval /usr/lib/instl/sm_inst installp_cmd -a ${IDEV} ${ARGS:+$ARGS} GRC=$? fi /usr/sbin/syncwpar -D $SDEV $INUWPAR WRC=$? else eval /usr/lib/instl/sm_inst installp_cmd -a ${IDEV} ${ARGS:+$ARGS} GRC=$? fi if [ $GRC -ne 0 -o $WRC -ne 0 ] then RC=1 fi exit $RC } preprocess_inuwparYESNO=`dspmsg -s 1 smit.cat 51 'yes,no'` YES=`echo ${YESNO} | cut -f1 -d','` NO=`echo ${YESNO} | cut -f2 -d','` echo '#exists'; LANG=C LC_ALL=C lswpar -qa privateusr 2> /dev/null | grep -iqw yes && echo "${YES}" || echo "${NO}" lu_update_all,prev_updt,lu_common_opts,accept_lic,live_update_allUpdate Installed Software to Latest Level (Live Update)smit.cat/usr/sbin/geninstall -kalt_save,update_all,prev_updt,common_opts,reqUpdate Installed Software to Latest Level (Update All)smit.cat/usr/lib/instl/sm_inst installp_cmd -aecho "#"install_bundle,prev_inst,common_opts,req,lang,prev_lic,accept_lic,live_update,wpar_inst_discovered,wpar_mgmt,wpar_mgmt_devInstall Software Bundlesmit.catpreprocess_inuwpar() { while [[ -n $1 ]]; do typeset OPTION=$1 case $OPTION in -D) INUWPAR=${INUWPAR:+"$INUWPAR "}"-D";; -M) INUWPAR=${INUWPAR:+"$INUWPAR "}"-G";; -I) INUWPAR_ENABLED="1";; -K) shift; INUWPAR=${INUWPAR:+"$INUWPAR "}"-d $1";; -k) shift; INUWPAR_FILE=$1;; *) ARGS=${ARGS:+"$ARGS "}"'$OPTION'";; esac shift done if [[ -n $INUWPAR_FILE ]]; then if [[ `head -1 $INUWPAR_FILE` == '_all_wpars' ]]; then INUWPAR=${INUWPAR:+"$INUWPAR "}"-A" else awk '{gsub(/ /,"\n");print}' < $INUWPAR_FILE > /tmp/inuwpar.$$.list mv /tmp/inuwpar.$$.list $INUWPAR_FILE INUWPAR=${INUWPAR:+"$INUWPAR "}"-f $INUWPAR_FILE" fi fi if [[ -n $INUWPAR_ENABLED ]]; then eval /usr/sbin/inuwpar $INUWPAR /usr/lib/instl/sm_inst installp_cmd -a -Q ${ARGS:+$ARGS} else eval /usr/lib/instl/sm_inst installp_cmd -a -Q ${ARGS:+$ARGS} fi } preprocess_inuwparYESNO=`dspmsg -s 1 smit.cat 51 'yes,no'` YES=`echo ${YESNO} | cut -f1 -d','` NO=`echo ${YESNO} | cut -f2 -d','` echo '#exists'; LANG=C LC_ALL=C lswpar -qa privateusr 2> /dev/null | grep -iqw yes && echo "${YES}" || echo "${NO}" update_by_fix,prev_updt,common_opts,wpar_inst_discovered,wpar_mgmt,wpar_mgmt_devUpdate Software by Fix (APAR)smit.catpreprocess_inuwpar() { while [[ -n $1 ]]; do typeset OPTION=$1 case $OPTION in -D) INUWPAR=${INUWPAR:+"$INUWPAR "}"-D";; -M) INUWPAR=${INUWPAR:+"$INUWPAR "}"-G";; -I) INUWPAR_ENABLED="1";; -K) shift; INUWPAR=${INUWPAR:+"$INUWPAR "}"-d $1";; -k) shift; INUWPAR_FILE=$1;; *) ARGS=${ARGS:+"$ARGS "}"'$OPTION'";; esac shift done if [[ -n $INUWPAR_FILE ]]; then if [[ `head -1 $INUWPAR_FILE` == '_all_wpars' ]]; then INUWPAR=${INUWPAR:+"$INUWPAR "}"-A" else awk '{gsub(/ /,"\n");print}' < $INUWPAR_FILE > /tmp/inuwpar.$$.list mv /tmp/inuwpar.$$.list $INUWPAR_FILE INUWPAR=${INUWPAR:+"$INUWPAR "}"-f $INUWPAR_FILE" fi fi if [[ -n $INUWPAR_ENABLED ]]; then eval /usr/sbin/inuwpar $INUWPAR /usr/lib/instl/sm_inst instfix_cmd ${ARGS:+$ARGS} else eval /usr/lib/instl/sm_inst instfix_cmd ${ARGS:+$ARGS} fi } preprocess_inuwparYESNO=`dspmsg -s 1 smit.cat 51 'yes,no'` YES=`echo ${YESNO} | cut -f1 -d','` NO=`echo ${YESNO} | cut -f2 -d','` echo '#exists'; LANG=C LC_ALL=C lswpar -qa privateusr 2> /dev/null | grep -iqw yes && echo "${YES}" || echo "${NO}" install_all,prev_inst,common_opts,req,over,prev_lic,accept_lic,live_update,wpar_inst_discovered,wpar_mgmt,wpar_mgmt_devInstall and Update from ALL Available Softwaresmit.catpreprocess_inuwpar() { while [[ -n $1 ]]; do typeset OPTION=$1 case $OPTION in -D) INUWPAR=${INUWPAR:+"$INUWPAR "}"-D";; -M) INUWPAR=${INUWPAR:+"$INUWPAR "}"-G";; -I) INUWPAR_ENABLED="1";; -K) shift; INUWPAR=${INUWPAR:+"$INUWPAR "}"-d $1";; -k) shift; INUWPAR_FILE=$1;; *) ARGS=${ARGS:+"$ARGS "}"'$OPTION'";; esac shift done if [[ -n $INUWPAR_FILE ]]; then if [[ `head -1 $INUWPAR_FILE` == '_all_wpars' ]]; then INUWPAR=${INUWPAR:+"$INUWPAR "}"-A" else awk '{gsub(/ /,"\n");print}' < $INUWPAR_FILE > /tmp/inuwpar.$$.list mv /tmp/inuwpar.$$.list $INUWPAR_FILE INUWPAR=${INUWPAR:+"$INUWPAR "}"-f $INUWPAR_FILE" fi fi if [[ -n $INUWPAR_ENABLED ]]; then eval /usr/sbin/inuwpar $INUWPAR /usr/lib/instl/sm_inst installp_cmd -a -l ${ARGS:+$ARGS} else eval /usr/lib/instl/sm_inst installp_cmd -a -l ${ARGS:+$ARGS} fi } preprocess_inuwparYESNO=`dspmsg -s 1 smit.cat 51 'yes,no'` YES=`echo ${YESNO} | cut -f1 -d','` NO=`echo ${YESNO} | cut -f2 -d','` echo '#exists'; LANG=C LC_ALL=C lswpar -qa privateusr 2> /dev/null | grep -iqw yes && echo "${YES}" || echo "${NO}" List Applied but Not Committed Software Updatessmit.catinstallp -s 1>/tmp/_$$.out 2>/tmp/_$$.err ; cat /tmp/_$$.err /tmp/_$$.out ; rm -rf /tmp/_$$.out /tmp/_$$.errlist_bundle,deviceList Filesets in a Bundlesmit.cat/usr/lib/instl/sm_inst list_filesets -l echo "#"list_media_swList Software on Installation Mediasmit.cat/usr/lib/instl/sm_inst list_filesets -l -f _all_availableecho "#"deviceList Software Fixes (APARs) on Installation Mediasmit.cat/usr/lib/instl/sm_inst instfix_list echo "#"list_media_info,deviceList Supplemental Fileset Information on Installation Mediasmit.cat/usr/lib/instl/sm_inst installp_cmd -iecho "#"commit,detail,extend,common_commit,wpar_inst_discovered,wpar_mgmtCommit Applied Software Updates (Remove Saved Files)smit.catpreprocess_inuwpar() { while [[ -n $1 ]]; do typeset OPTION=$1 case $OPTION in -M) INUWPAR=${INUWPAR:+"$INUWPAR "}"-G";; -I) INUWPAR_ENABLED="1";; -k) shift; INUWPAR_FILE=$1;; *) ARGS=${ARGS:+"$ARGS "}"'$OPTION'";; esac shift done if [[ -n $INUWPAR_FILE ]]; then if [[ `head -1 $INUWPAR_FILE` == '_all_wpars' ]]; then INUWPAR=${INUWPAR:+"$INUWPAR "}"-A" else awk '{gsub(/ /,"\n");print}' < $INUWPAR_FILE > /tmp/inuwpar.$$.list mv /tmp/inuwpar.$$.list $INUWPAR_FILE INUWPAR=${INUWPAR:+"$INUWPAR "}"-f $INUWPAR_FILE" fi fi if [[ -n $INUWPAR_ENABLED ]]; then eval /usr/sbin/inuwpar $INUWPAR /usr/lib/instl/sm_inst installp_cmd -c ${ARGS:+$ARGS} else eval /usr/lib/instl/sm_inst installp_cmd -c ${ARGS:+$ARGS} fi } preprocess_inuwparYESNO=`dspmsg -s 1 smit.cat 51 'yes,no'` YES=`echo ${YESNO} | cut -f1 -d','` NO=`echo ${YESNO} | cut -f2 -d','` echo '#exists'; LANG=C LC_ALL=C lswpar -qa privateusr 2> /dev/null | grep -iqw yes && echo "${YES}" || echo "${NO}" reject,extend,detail,common_reject,wpar_inst_discovered,wpar_mgmtReject Applied Software Updates (Use Previous Version)smit.catpreprocess_inuwpar() { while [[ -n $1 ]]; do typeset OPTION=$1 case $OPTION in -M) INUWPAR=${INUWPAR:+"$INUWPAR "}"-G";; -I) INUWPAR_ENABLED="1";; -k) shift; INUWPAR_FILE=$1;; *) ARGS=${ARGS:+"$ARGS "}"'$OPTION'";; esac shift done if [[ -n $INUWPAR_FILE ]]; then if [[ `head -1 $INUWPAR_FILE` == '_all_wpars' ]]; then INUWPAR=${INUWPAR:+"$INUWPAR "}"-A" else awk '{gsub(/ /,"\n");print}' < $INUWPAR_FILE > /tmp/inuwpar.$$.list mv /tmp/inuwpar.$$.list $INUWPAR_FILE INUWPAR=${INUWPAR:+"$INUWPAR "}"-f $INUWPAR_FILE" fi fi if [[ -n $INUWPAR_ENABLED ]]; then eval /usr/sbin/inuwpar $INUWPAR /usr/lib/instl/sm_inst installp_cmd -r -B ${ARGS:+$ARGS} else eval /usr/lib/instl/sm_inst installp_cmd -r -B ${ARGS:+$ARGS} fi } preprocess_inuwparYESNO=`dspmsg -s 1 smit.cat 51 'yes,no'` YES=`echo ${YESNO} | cut -f1 -d','` NO=`echo ${YESNO} | cut -f2 -d','` echo '#exists'; LANG=C LC_ALL=C lswpar -qa privateusr 2> /dev/null | grep -iqw yes && echo "${YES}" || echo "${NO}" remove,detail,common_remove,wpar_inst_discovered,wpar_mgmtRemove Installed Softwaresmit.catpreprocess_inuwpar() { while [[ -n $1 ]]; do typeset OPTION=$1 case $OPTION in -M) INUWPAR=${INUWPAR:+"$INUWPAR "}"-G";; -I) INUWPAR_ENABLED="1";; -k) shift; INUWPAR_FILE=$1;; *) ARGS=${ARGS:+"$ARGS "}"'$OPTION'";; esac shift done if [[ -n $INUWPAR_FILE ]]; then if [[ `head -1 $INUWPAR_FILE` == '_all_wpars' ]]; then INUWPAR=${INUWPAR:+"$INUWPAR "}"-A" else awk '{gsub(/ /,"\n");print}' < $INUWPAR_FILE > /tmp/inuwpar.$$.list mv /tmp/inuwpar.$$.list $INUWPAR_FILE INUWPAR=${INUWPAR:+"$INUWPAR "}"-f $INUWPAR_FILE" fi fi if [[ -n $INUWPAR_ENABLED ]]; then eval /usr/sbin/inuwpar $INUWPAR /usr/lib/instl/sm_inst installp_cmd -u ${ARGS:+$ARGS} else eval /usr/lib/instl/sm_inst installp_cmd -u ${ARGS:+$ARGS} fi } preprocess_inuwparYESNO=`dspmsg -s 1 smit.cat 51 'yes,no'` YES=`echo ${YESNO} | cut -f1 -d','` NO=`echo ${YESNO} | cut -f2 -d','` echo '#exists'; LANG=C LC_ALL=C lswpar -qa privateusr 2> /dev/null | grep -iqw yes && echo "${YES}" || echo "${NO}" rename.optRename Software Images in Repositorysmit.cat/usr/lib/instl/sm_inst bffcreate_rename_cmdecho "#"cleanup.optClean Up Software Images in Repositorysmit.catlppmgr() { FLAGS= while [[ $# -gt 0 ]] do case $1 in -b) FLAGS="${FLAGS} -bu";; -d) FLAGS="${FLAGS} -d $2"; shift;; -e) FLAGS="${FLAGS} -e";; -k) FLAGS="${FLAGS} -k $2"; shift ;; -l) FLAGS="${FLAGS} -ls";; -m) FLAGS="${FLAGS} -m $2"; shift ;; -r) FLAGS="${FLAGS} -r";; -x) FLAGS="${FLAGS} -x";; -X) FLAGS="${FLAGS} -X";; *) ;; esac shift done /usr/lib/instl/lppmgr ${FLAGS} exit $? } lppmgrecho "#_lang $LANG"bffcreate,device,extend,mvCDCopy Software to Hard Disk for Future Installationsmit.cat/usr/lib/instl/sm_inst bffcreate_cmdecho "#"copy_bundle,device,extend,mvCDCopy Software Bundle to Hard Disk for Future Installationsmit.cat/usr/lib/instl/sm_inst bffcreate_cmd -becho "#"Clean Up After Failed or Interrupted Installationsmit.catinstallp 2>&1 -Cinstofix.optCompare Installed Software to Fix Repositorysmit.catcompare_report() { FLAGS= while [[ $# -gt 0 ]] do case $1 in -i) FLAGS="${FLAGS} -i $2"; shift;; -b) FLAGS="${FLAGS} -b $2"; shift;; -h) FLAGS="${FLAGS} -h";; -l) FLAGS="${FLAGS} -l";; -m) FLAGS="${FLAGS} -m";; -n) FLAGS="${FLAGS} -n";; -t) FLAGS="${FLAGS} -t $2"; shift;; *) ;; esac shift done if [ `echo ${FLAGS} | grep -c -e -t` -eq 0 ]; then FLAGS="${FLAGS} -v" fi if [ `echo ${FLAGS} | grep -c -e -b` -eq 0 ]; then FLAGS="-s ${FLAGS}" fi print /usr/sbin/compare_report ${FLAGS};echo /usr/sbin/compare_report ${FLAGS} -J exit $? } compare_reportecho "#"instolist.optCompare Installed Software to List of Available Updatessmit.catcompare_report() { FLAGS= while [[ $# -gt 0 ]] do case $1 in -r) FLAGS="${FLAGS} -r $2"; shift;; -b) FLAGS="${FLAGS} -b $2"; shift;; -h) FLAGS="${FLAGS} -h";; -l) [[ `echo ${FLAGS} | grep -c -e -l` -eq 0 ]] && FLAGS="${FLAGS} -l";; -t) FLAGS="${FLAGS} -t $2"; shift;; *) ;; esac shift done if [ `echo ${FLAGS} | grep -c -e -t` -eq 0 ]; then FLAGS="${FLAGS} -v" fi if [ `echo ${FLAGS} | grep -c -e -b` -eq 0 ]; then FLAGS="-s ${FLAGS}" fi print /usr/sbin/compare_report ${FLAGS};echo /usr/sbin/compare_report ${FLAGS} -J exit $? } compare_reportecho "#"fixtolist.optCompare Fix Repository to List of Available Updatessmit.catcompare_report() { FLAGS= while [[ $# -gt 0 ]] do case $1 in -i) FLAGS="${FLAGS} -i $2"; shift;; -r) FLAGS="${FLAGS} -r $2"; shift;; -t) FLAGS="${FLAGS} -t $2"; shift;; *) ;; esac shift done if [ `echo ${FLAGS} | grep -c -e -t` -eq 0 ]; then FLAGS="${FLAGS} -v" fi print /usr/sbin/compare_report ${FLAGS};echo /usr/sbin/compare_report ${FLAGS} -J exit $? } compare_reportecho "#"device,devinst,prev_inst,lang,prev_lic,accept_licInstall Additional Device Softwaresmit.cat/usr/lib/instl/sm_inst installp_cmd -a -c -g -Q -Xecho "#"device,printerinst,prev_inst,langInstall Additional Printer/Plotter Softwaresmit.cat/usr/lib/instl/sm_inst installp_cmd -a -c -g -Q -Xecho "#"xinstallm_optionsInstallation Optionssmit.catfunction write_options { while getopts cNgXFvGV Option "$@" do case $Option in c) c='-c ' ;; N) N='-N ' ;; g) g='-g ' ;; X) X='-X ' ;; F) F='-F ' ;; v) v='-v ' ;; G) G='-G ' ;; V) V='-V2' ;; esac done echo "${c}${N}${g}${X}${F}${v}${G}${V}" > ${HOME}/.xinstallm_opts } write_optionsYESNO=`dspmsg -s 1 smit.cat 29 'no,yes'` NO=` echo ${YESNO} | cut -f1 -d','` YES=`echo ${YESNO} | cut -f2 -d','` ## Set Default Values c=${NO} ; N=${YES} ; g=${NO} ; X=${NO} ; F=${NO} ; v=${NO} ; G=${NO} ; V=${NO} ## Read values from defaults file if [[ -f ~/.xinstallm_opts ]] then OptionString=`cat ~/.xinstallm_opts` else OptionString='-g -X -G' fi while getopts cNgXFvGV: Option ${OptionString} do case $Option in c) c="${YES}" ;; N) N="${NO}" ;; g) g="${YES}" ;; X) X="${YES}" ;; F) F="${YES}" ;; v) v="${YES}" ;; G) G="${YES}" ;; V) V="${YES}" ;; esac done echo '#c:N:g:X:F:v:G:V' echo "${c}:${N}:${g}:${X}:${F}:${v}:${G}:${V}" lsxmaintm_optsList the Installed Softwaresmit.cat lslpp_info () { FILESETS=$1 shift while [[ $1 != '' ]] do case $1 in history) PARAM='-h';; requisites) PARAM='-p';; dependents) PARAM='-d';; files) PARAM='-f';; *) PARAM='';; esac if [[ $PARAM = '' ]] then continue fi lslpp $PARAM $FILESETS echo ' ---------------------------------------------------------------------------- ' shift done } lslpp_info emgr_install_optsInstall EFIX Packagessmit.cat/usr/sbin/emgremgr_list_optsList EFIXES and Related Informationsmit.cat/usr/sbin/emgr -lemgr_remove_optsRemove Installed EFIXESsmit.cat/usr/sbin/emgr -remgr_check_optsCheck Installed EFIXESsmit.cat/usr/sbin/emgr -cinstall_latest_r,common_opts_r,common_opts,req,over,lang,prev_lic,accept_lic,common_installInstall Softwaresmit.cat/usr/lib/instl/sm_inst installp_cmd -a -Qget_locationList Applied but Not Committed Software Updatessmit.catx() { FLAGS= if [ $1 ]; then FLAGS="-R $1" fi installp -s ${FLAGS} 1>/tmp/_$$.out 2>/tmp/_$$.err ; cat /tmp/_$$.err /tmp/_$$.out ; rm -rf /tmp/_$$.out /tmp/_$$.err exit $? } xcommit_r,detail,extend,common_opts_r,common_commitCommit Applied Software Updates (Remove Saved Files)smit.cat/usr/lib/instl/sm_inst installp_cmd -creject_r,extend,detail,common_rejectReject Applied Software Updates (Use Previous Version)smit.cat/usr/lib/instl/sm_inst installp_cmd -r -Bremove_r,detail,common_opts_r,common_removeRemove Installed Softwaresmit.cat/usr/lib/instl/sm_inst installp_cmd -uget_locationClean Up After Failed or Interrupted Installationsmit.catinstallp 2>&1 -Cchange_default_browser_optChange/Show Default Browserwebconfig.cat/usr/sbin/chwebconfigx() { browser=`grep "^DEFAULT_BROWSER" /etc/environment` browser=${browser#DEFAULT_BROWSER=} echo "#browser" echo "${browser}:" } xecho $(dspmsg smit.cat -s 10 22 'No previous dump recorded.') exit 0dump_copy_file_not_2Copy a System Dump from a Dump Device to a Filesmit.catx() { ODMDIR=/etc/objrepos LVNAME=`basename $1` LVTYPE=`/usr/sbin/lslv $LVNAME 2>/dev/null | grep "TYPE:" | awk '{print $2}'` if [ "$LVTYPE" = "paging" ] then dspmsg cmddump.cat -s 1 557 "The dump on %s is no longer valid. To see if the dump was copied to a file on boot, run the following command: sysdumpdev -L " $1 exit 1 else ISTAPE=`odmget -q "name = $LVNAME" CuDv |grep PdDvLn |grep tape |wc -l` ISCD=`odmget -q "name = $LVNAME" CuDv |grep PdDvLn |grep cdrom |wc -l` BSZE=$3 [[ $BSZE = 0 ]] && BSZE=65536 if [ "$ISTAPE" -eq 0 -a "$ISCD" -eq 0 ] then RCOUNT=`expr $4 + 511` COUNT=`expr $RCOUNT / 512` /usr/lib/ras/dumpread -d $1 | dd of=$2 ibs=512 obs=$BSZE count=$COUNT else RCOUNT=`expr $4 + $BSZE - 1` COUNT=`expr $RCOUNT / $BSZE` if [ "$ISCD" -eq 0 ] then INDEV=$1 else INDEV=`dirname $1`"/r"$LVNAME fi dd if=$INDEV of=$2 bs=$BSZE count=$COUNT case $2 in *.Z ) /usr/lib/ras/dumptrunc $2 $4;; esac case $2 in *.BZ ) /usr/lib/ras/dumptrunc $2 $4;; esac fi fi } x/usr/lib/ras/dump_smutil sysdumpdev -LStart a System Dump to the Primary Dump Devicesmit.catsysdumpstart -pStart a Full Memory Dump to the Primary Dump Devicesmit.catsysdumpstart -p -f requireStart a Selective Memory Dump to the Primary Dump Devicesmit.catsysdumpstart -p -f disallowStart a Traditional Dump to the Primary Dump Devicesmit.catsysdumpstart -p -t traditionalStart a Traditional System Dump to the Secondary Dump Devicesmit.catsysdumpstart -s -t traditionaldump_checkrCheck Dump Resources Utilitysmit.cat/usr/lib/ras/dumpcheck #Get current crontab setting set -f xy=`crontab -l 2>/dev/null | grep dumpcheck | wc -l | awk '{print $1}'` TIMESET=`crontab -l 2>/dev/null| grep dumpcheck | awk '{print $1, $2, $3, $4, $5}'` if [ $xy = 0 ] then TODCHECK=`dspmsg -s 10 smit.cat 29 'yes,no' | awk '/,/' |cut -f 2 -d ,` else TODCHECK=`dspmsg -s 10 smit.cat 29 'yes,no' | awk '/,/' |cut -f 1 -d ,` fi print '#_checkd:_crontime\n'$TODCHECK:$TIMESET List Components that are Dump Awaresmit.cat/usr/sbin/dumpctrl -qcdumpctrl_g_attrChange/Show Global Live Dump Attributessmit.cat/usr/sbin/dumpctrl /usr/lib/ras/dump_smutil dumpctrlqldumpctrl_change_1_optChange/Show Dump Attributes for a Componentsmit.cat/usr/sbin/dumpctrl /usr/lib/ras/dump_smutil dumpctrlqc comp_alias_selectordumpctrl_ldmp_multi_optChange Dump Attributes for multiple Componentssmit.cat/usr/sbin/dumpctrl smit.catdumpctrl_ldmp_multi_opt_xDelete Customizationssmit.cat/usr/sbin/dumpctrl -x smit.cat/usr/sbin/dumpctrl -kldmpstart_optStart a Live Dumpsmit.cat/usr/lib/ras/dump_smutil ldmpstart /usr/sbin/dumpctrl -qc -p/usr/sbin/dumpctrl -qc -Pdumpctrl_sdmp_optChange/Show Global System Dump Propertiessmit.cat/usr/sbin/dumpctrl /usr/lib/ras/dump_smutil dumpctrlqsdumpctrl_soptList Live Dumps in the Live Dump Repositorysmit.catx() { cmd="/usr/sbin/dumpctrl -s " for arg; do cmd="$cmd $arg" done eval $cmd rc=$? echo " Press Enter to Continue" read exit $rc } xsmit.caterrpt,errpt_filename,errpt_1Generate an Error Reportsmit.caterrpterrpt,errpt_filename,errpt_2Generate an Error Reportsmit.catecho $(dspmsg smit.cat -s 8 17 'This command will run unt il interrupted.') echo $(dspmsg smit.cat -s 8 18 'Press Enter to continue.') read xxxxx errpterrpt,errpt_printer,errpt_1Generate an Error Reportsmit.caterrptLANG=C; export LANG NL_MESSAGES=C; export NL_MESSAGES a=`switch.prt -d | grep AIX` rc=$? if [[ $rc -eq 0 ]]; then DFLT=`cat /etc/qconfig | awk 'BEGIN {FS=":";} $1 !~ /^\*/ {print $1; exit;}'` else lpstat -d | grep "no system default" >> /dev/null rc=$? if [[ $rc -eq 0 ]]; then DFLT="" else DFLT=`lpstat -d | awk '{print $4'}'` fi fi print '#errpt_printer' print $DFLTerrclearClean the Error Logsmit.caterrclearportmiron.optStart Port Mirror Sessionmirrord.cat/usr/sbin/portmirportmiroff.optStop Port Mirror Sessionmirrord.cat/usr/sbin/portmirportmircfg.optConfigure Console Mirror For Service Bootmirrord.cat/usr/sbin/portmirprint '#current\n'`portmir -q`chlicenseChange / Show Number of Licensed Userssmit.catchlicenselslicense -A -c amepat_rActive Memory Expansion Planner and Adviser - Recordingamepat.cat/usr/bin/amepatamepat_oActive Memory Expansion Planner and Adviser - Generate Reportamepat.cat/usr/bin/amepatamepat_o,amepat_dActive Memory Expansion Planner and Adviser - Generate Reportamepat.cat/usr/bin/amepatDataRentention_idChange/Show Data Retention Periodpm.cat/var/perf/pm/bin/config_pm.sh -R /var/perf/pm/bin/config_pm.sh -rEnablePmRec_idEnable Data Transmissionpm.cat/var/perf/pm/bin/config_pm.sh -T 'yes'DisablePmRec_idDisable Data Transmission/var/perf/pm/bin/config_pm.sh -T 'no'UpdateCustomerInfoDummyChange/Show Customer Informationecho $(dspmsg pm.cat -s 1 44 'PM Service is not supported inside WPAR')UpdateCustomerInfo_idChange/Show Customer Informationpm.cat x() { while getopts ':n:a:A:c:s:C:o:p:P:e:v:d:t:' option do case ${option} in n)Company_Name_PM=${OPTARG} ;; a)Address_PM=${OPTARG} ;; A)Address1_PM=${OPTARG} ;; c)City_PM=${OPTARG} ;; s)state_PM=${OPTARG} ;; C)country_PM=${OPTARG} ;; o)countrycode_PM=`/usr/java5/jre/bin/java -cp /usr/esa/lib/ISOCountryManager.jar ISOCountryManager retrieveISOByCountry "${OPTARG}" 2>/dev/null` ;; p)contactperson_PM=${OPTARG} ;; P)phone_PM=${OPTARG} ;; e)email_PM=${OPTARG} echo ${email_PM}|grep @ >/dev/null 2>&1 if [[ $? -ne 0 ]] then echo $(dspmsg pm.cat -s 1 45 'Invalid Email ID') exit 1 fi ;; v)nlv_PM=${OPTARG} ;; d)codepage_PM=${OPTARG} ;; t)calender_PM=${OPTARG} ;; [?])exit 1 ;; esac done PMCONF=/var/perf/pm/config/pmconf sed "s/Company_Name_PM:.*/Company_Name_PM:${Company_Name_PM}/" ${PMCONF} > /tmp/_pmconf cp /tmp/_pmconf ${PMCONF} sed "s/Address_PM:.*/Address_PM:${Address_PM}/" ${PMCONF} > /tmp/_pmconf cp /tmp/_pmconf ${PMCONF} sed "s/Address1_PM:.*/Address1_PM:${Address1_PM}/" ${PMCONF} > /tmp/_pmconf cp /tmp/_pmconf ${PMCONF} sed "s/City_PM:.*/City_PM:${City_PM}/" ${PMCONF} > /tmp/_pmconf cp /tmp/_pmconf ${PMCONF} sed "s/state_PM:.*/state_PM:${state_PM}/" ${PMCONF} > /tmp/_pmconf cp /tmp/_pmconf ${PMCONF} sed "s/country_PM:.*/country_PM:${country_PM}/" ${PMCONF} > /tmp/_pmconf cp /tmp/_pmconf ${PMCONF} sed "s/countrycode_PM:.*/countrycode_PM:${countrycode_PM}/" ${PMCONF} > /tmp/_pmconf cp /tmp/_pmconf ${PMCONF} sed "s/contactperson_PM:.*/contactperson_PM:${contactperson_PM}/" ${PMCONF} > /tmp/_pmconf cp /tmp/_pmconf ${PMCONF} sed "s/phone_PM:.*/phone_PM:${phone_PM}/" ${PMCONF} > /tmp/_pmconf cp /tmp/_pmconf ${PMCONF} sed "s/email_PM:.*/email_PM:${email_PM}/" ${PMCONF} > /tmp/_pmconf cp /tmp/_pmconf ${PMCONF} #sed "s/nlv_PM:.*/nlv_PM:${nlv_PM}/" ${PMCONF} > /tmp/_pmconf #cp /tmp/_pmconf ${PMCONF} #sed "s/codepage_PM:.*/codepage_PM:${codepage_PM}/" ${PMCONF} > /tmp/_pmconf #cp /tmp/_pmconf ${PMCONF} #sed "s/calender_PM:.*/calender_PM:${calender_PM}/" ${PMCONF} > /tmp/_pmconf #cp /tmp/_pmconf ${PMCONF} echo $(dspmsg pm.cat -s 1 43 'Successfully updated Customer Information ') } x yx() { PMCONF=/var/perf/pm/config/pmconf if [[ -f ${PMCONF} ]] then Company_Name_PM=`grep Company_Name_PM ${PMCONF} | cut -d ':' -f 2-10 | sed 's/:/#!:/g'` Address_PM=`grep 'Address_PM' ${PMCONF} | cut -d ':' -f 2-10 | sed 's/:/#!:/g'` Address1_PM=`grep 'Address1_PM' ${PMCONF} | cut -d ':' -f 2-10 | sed 's/:/#!:/g'` City_PM=`grep 'City_PM' ${PMCONF} | cut -d ':' -f 2-10 | sed 's/:/#!:/g'` state_PM=`grep 'state_PM' ${PMCONF} | cut -d ':' -f 2-10 | sed 's/:/#!:/g'` country_PM=`grep 'country_PM' ${PMCONF} | cut -d ':' -f 2-10 | sed 's/:/#!:/g'` countrycode_PM=`grep 'countrycode_PM' ${PMCONF} | cut -d ':' -f 2-10 | sed 's/:/#!:/g'` countrycode_PM=`/usr/java5/jre/bin/java -cp /usr/esa/lib/ISOCountryManager.jar ISOCountryManager retrieveCountryByISO ${countrycode_PM} 2>/dev/null` contactperson_PM=`grep 'contactperson_PM' ${PMCONF} | cut -d ':' -f 2-10 | sed 's/:/#!:/g'` phone_PM=`grep 'phone_PM' ${PMCONF} | cut -d ':' -f 2-10 | sed 's/:/#!:/g'` email_PM=`grep 'email_PM' ${PMCONF} | cut -d ':' -f 2-10 | sed 's/:/#!:/g'` #nlv_PM=`grep 'nlv_PM' ${PMCONF} | cut -d ':' -f 2-10 | sed 's/:/#!:/g'` #codepage_PM=`grep 'codepage_PM' ${PMCONF} | cut -d ':' -f 2-10 | sed 's/:/#!:/g'` #calender_PM=`grep 'calender_PM' ${PMCONF} | cut -d ':' -f 2-10 | sed 's/:/#!:/g'` fi echo "#Company_Name_PM:Address_PM:Address1_PM:City_PM:state_PM:country_PM:countrycode_PM:contactperson_PM:phone_PM:email_PM" echo "${Company_Name_PM}:${Address_PM}:${Address1_PM}:${City_PM}:${state_PM}:${country_PM}:${countrycode_PM}:${contactperson_PM}:${phone_PM}:${email_PM}" } yxRegDayRec_idRetransmit Recorded Data cmd() { /var/perf/pm/bin/pmcfg -D $* } cmdShiftTiming_idChange/Show Trending Days and Shift Timingpm.cat/var/perf/pm/bin/config_pm.sh -S /var/perf/pm/bin/config_pm.sh -s_migrationLive Partition Mobility with Host Ethernet Adapter (HEA)smit.cat/usr/sbin/heamigrList All Tap Adapterssmit.catlsdev -C -c adapter -s pseudo -t tapentaddtapoptAdd A Tap Adaptersmit.catfunction cmd_to_exec { DEV=`mkdev -c adapter -s pseudo -t tapent` RC=$? echo $DEV if [ $RC -eq 0 ] then mkdev -c if -s EN -t tap 2>/dev/null fi exit $RC }; cmd_to_execrmtapoptRemove A Tap Adaptersmit.catfunction cmd_to_exec { DEV=$@ IF=`echo $DEV | sed s/ent//` RESULT=`rmdev -d -l $DEV` RC=$? echo $RESULT if [ $RC -eq 0 ] then rmdev -d -l $IF 2>/dev/null fi exit $RC }; cmd_to_execchtapoptChange / Show Characteristics of a Tap Adaptersmit.catchdev lsattr -l logicname -E -O_chinetenChange / Show an TAP Network Interfacesmit.catfunction cmd_to_exec { eval chdev $* } cmd_to_execfunction cmd_to_discover { lsattr -E -l $1 |grep alias6 |awk '{ print $2 }' |grep : >/dev/null if [ $? = 0 ] then IP6=`lsattr -E -l $1 |grep netaddr6 |awk '{ print $2 }'` IP=`echo $IP6 | sed s/:/#!:/g` LINE=`lsattr -E -l $1 -O |grep $IP6` LINE=`echo $LINE | sed s/$IP6/$IP/` IPALIAS6LIST=`lsattr -E -l $1 |grep alias6 |awk '{ print $2 }'` for ALIAS6 in $IPALIAS6LIST do ALIAS6ADDR=`echo $ALIAS6 | cut -d / -f 1` ALIAS=`echo $ALIAS6ADDR | sed s/:/#!:/g` LINE=`echo $LINE | sed s/$ALIAS6ADDR/$ALIAS/` done echo `lsattr -E -l $1 -O |grep alias6` echo $LINE else lsattr -E -l $1 |grep netaddr6 |awk '{ print $2 }' |grep : >/dev/null if [ $? = 0 ] then IP6=`lsattr -E -l $1 |grep netaddr6 |awk '{ print $2 }'` IP=`echo $IP6 | sed s/:/#!:/g` lsattr -E -l $1 -O | sed s/$IP6/$IP/ else lsattr -E -l $1 -O fi fi } cmd_to_discover_rawname_chinet6enChange / Show an IPV6 TAP Network Interfacesmit.catfunction cmd_to_exec { eval chdev $* } cmd_to_execfunction cmd_to_discover { lsattr -E -l $1 |grep netaddr6 |awk '{ print $2 }' |grep : >/dev/null if [ $? = 0 ] then IP6=`lsattr -E -l $1 |grep netaddr6 |awk '{ print $2 }'` IP=`echo $IP6 | sed s/:/#!:/g` lsattr -E -l $1 -O | sed s/$IP6/$IP/ else lsattr -E -l $1 -O fi } cmd_to_discover_rawname_mktcpiptapMinimum Configuration & Startup To Delete existing configuration data, please use Further Configuration menussmit.cat/usr/sbin/mktcpip/usr/sbin/mktcpip -S $1_rawname_configdhcpUse DHCP for TCPIP Configuration & Startupsmit.catfunction setup_dhcp { # # Generate replacement text # STATE="NONE" OUTPUT="" for i in $* do case "$STATE" in "NONE") if [ "$i" = "interface" ] then STATE="interface" elif [ "$i" = "when" ] then STATE="when" elif [ "$i" = ":option" ] then STATE="option" fi;; "when") WHEN=$i STATE="NONE";; "interface") INTERFACE=$i if [ "$OUTPUT" = "" ] then OUTPUT="interface $i\n{" else OUTPUT=$OUTPUT"\ninterface $i\n{" fi STATE="NONE";; "option") NUM=$i STRING="" STATE="optionnum";; "optionnum") if [ "$i" = ":option" ] then STATE="option" if [ "$NUM" = "12" ] || [ "$NUM" = "14" ] || [ "$NUM" = "15" ] || [ "$NUM" = "17" ] || [ "$NUM" = "18" ] || [ "$NUM" = "40" ] || [ "$NUM" = "43" ] || [ "$NUM" = "47" ] || [ "$NUM" = "53" ] || [ "$NUM" = "56" ] then if [ "$OUTPUT" = "" ] then OUTPUT=" option $NUM \"$STRING\"" else OUTPUT=$OUTPUT"\n option $NUM \"$STRING\"" fi else if [ "$OUTPUT" = "" ] then OUTPUT=" option $NUM $STRING" else OUTPUT=$OUTPUT"\n option $NUM $STRING" fi fi else if [ "$STRING" = "" ] then STRING=$i else STRING=$STRING" "$i fi fi;; esac done if [ "$STATE" = "optionnum" ] then if [ "$NUM" = "12" ] || [ "$NUM" = "14" ] || [ "$NUM" = "15" ] || [ "$NUM" = "17" ] || [ "$NUM" = "18" ] || [ "$NUM" = "40" ] || [ "$NUM" = "43" ] || [ "$NUM" = "47" ] || [ "$NUM" = "53" ] || [ "$NUM" = "56" ] then if [ "$OUTPUT" = "" ] then OUTPUT=" option $NUM \"$STRING\"" else OUTPUT=$OUTPUT"\n option $NUM \"$STRING\"" fi else if [ "$OUTPUT" = "" ] then OUTPUT=" option $NUM $STRING" else OUTPUT=$OUTPUT"\n option $NUM $STRING" fi fi fi if [ "$OUTPUT" = "" ] then continue else OUTPUT=$OUTPUT"\n}\n" fi # # Remove interface # EAT="0" rm -rf /tmp/dhcpcd.ini.$$ exec 3< /etc/dhcpcd.ini while read -u3 -r line do if [ "$EAT" = "0" ] && [ "${line#interface }" != "$line" ] then HERE=${line#*interface } WORKINGIF=${HERE%%( )+([a-zA-Z0-9 \t])*} fi if [ "$EAT" != 0 ] || ([ "$WORKINGIF" != "" ] && ([ "$INTERFACE" = "$WORKINGIF" ] || [ "$INTERFACE" = "any" ] || ([ "$INTERFACE" != "any" ] && [ "$WORKINGIF" = "any" ]))) then if [ "$EAT" = "0" ] then EAT="1" elif [ "$EAT" = "1" ] then if [ "$line" = "{" ] then EAT="2" else EAT="0" WORKINGIF="" echo $line >> /tmp/dhcpcd.ini.$$ fi elif [ "$EAT" = "2" ] then if [ "$line" = "}" ] then EAT="0" WORKINGIF="" fi fi else echo $line >> /tmp/dhcpcd.ini.$$ fi done exec 3<&- mv /etc/dhcpcd.ini /etc/dhcpcd.ini.bak mv /tmp/dhcpcd.ini.$$ /etc/dhcpcd.ini # # Add interface back # echo $OUTPUT >> /etc/dhcpcd.ini if [ "$WHEN" = "1" ] then echo $WHEN > /dev/null elif [ "$WHEN" = "2" ] then startsrc -s dhcpcd else if [ "$WHEN" = "3" ] then /usr/sbin/chrctcp -a dhcpcd else /usr/sbin/chrctcp -S -a dhcpcd fi fi } setup_dhcpfunction parse_string { INTERFACE=$1 EAT="0" grep -v "^#" /etc/dhcpcd.ini > /tmp/dhcpcd.ini.$$ exec 3< /tmp/dhcpcd.ini.$$ WHEN=4 OPTION19=0 OPTION20=0 OPTION27=0 OPTION29=0 OPTION30=0 OPTION31=0 OPTION34=0 OPTION36=0 OPTION39=0 while read -u3 -r line do if [ "$EAT" = "0" ] && [ "${line#interface }" != "$line" ] then HERE=${line#*interface } WORKINGIF=${HERE%%( )+([a-zA-Z0-9 \t])*} fi if [ "$EAT" != "0" ] || [ "$INTERFACE" = "$WORKINGIF" ] then if [ "$EAT" = "0" ] then EAT="1" elif [ "$EAT" = "1" ] then if [ "$line" = "{" ] then EAT="2" else EAT="0" WORKINGIF="" fi elif [ "$EAT" = "2" ] then if [ "$line" = "}" ] then EAT="0" WORKINGIF="" fi fi fi if [ "${line#*option }" != "$line" ] then OPTION="option" HERE=${line#*option } OPTIONNUM=${HERE%%( )+([\"a-zA-Z0-9 \t])*} else OPTION= fi if [ "$OPTION" = "option" ] && [ "$EAT" = "2" ] then HERE=${line#*$OPTION*$OPTIONNUM } HERE2=${HERE#*\"} HERE3=${HERE2%\"*} line=$HERE3 case "$OPTIONNUM" in "1") OPTION01=$line;; "2") OPTION02=$line;; "3") OPTION03=$line;; "4") OPTION04=$line;; "5") OPTION05=$line;; "6") OPTION06=$line;; "7") OPTION07=$line;; "8") OPTION08=$line;; "9") OPTION09=$line;; "10") OPTION10=$line;; "11") OPTION11=$line;; "12") OPTION12=$line;; "13") OPTION13=$line;; "14") OPTION14=$line;; "15") OPTION15=$line;; "16") OPTION16=$line;; "17") OPTION17=$line;; "18") OPTION18=$line;; "19") OPTION19=$line;; "20") OPTION20=$line;; "21") OPTION21=$line;; "22") OPTION22=$line;; "23") OPTION23=$line;; "24") OPTION24=$line;; "25") OPTION25=$line;; "26") OPTION26=$line;; "27") OPTION27=$line;; "28") OPTION28=$line;; "29") OPTION29=$line;; "30") OPTION30=$line;; "31") OPTION31=$line;; "32") OPTION32=$line;; "33") OPTION33=$line;; "34") OPTION34=$line;; "35") OPTION35=$line;; "36") OPTION36=$line;; "37") OPTION37=$line;; "38") OPTION38=$line;; "39") OPTION39=$line;; "40") OPTION40=$line;; "41") OPTION41=$line;; "42") OPTION42=$line;; "43") OPTION43=$line;; "44") OPTION44=$line;; "45") OPTION45=$line;; "46") OPTION46=$line;; "47") OPTION47=$line;; "48") OPTION48=$line;; "49") OPTION49=$line;; "50") OPTION50=$line;; "51") OPTION51=$line;; "52") OPTION52=$line;; "53") OPTION53=$line;; "54") OPTION54=$line;; "55") OPTION55=$line;; "56") OPTION56=$line;; "57") OPTION57=$line;; "58") OPTION58=$line;; "59") OPTION59=$line;; "60") OPTION60=$line;; "61") OPTION61=$line;; "62") OPTION62=$line;; "63") OPTION63=$line;; "64") OPTION64=$line;; "65") OPTION65=$line;; "66") OPTION66=$line;; "67") OPTION67=$line;; "68") OPTION68=$line;; "69") OPTION69=$line;; "77") OPTION77=$line;; esac fi done exec 3<&- OUTPUT1="#interface:when:host:classid:clientid:ipaddrleasetime:reqipaddress:serverid:subnet:timeoffset:routers:timerservers:nameserver:dnsservers:logservers:cookieservers:LPRservers:impressserver:reslocserver:bootfilesize:meritdumpfile:domainname:swapserver:rootpath:extensionspath:ipforwarding:sourcerouting:policyfilters:maxdatareassmbly:ipttl:MTUagetimeout:" OUTPUT2="MTUplattable:interfaceMTU:localsubnets:broadcastaddr:maskdiscovery:masksupplier:routediscovery:routersolicaddr:staticroutes:trailencap:ARPcachetimeout:etherencap:tcpttl:tcpkeepalive:tcpkeepalivegarbage:nisdomain:nisserver:ntpservers:vendor:netbiosnameservers:netbiosdatadistservers:netbiosnodetype:netbiosscope:xfontservers:xdisplays:parmreqlist:message:maxdhcpmesssize:siteclassid" OUTPUT3="$INTERFACE:$WHEN:$OPTION12:$OPTION60:$OPTION61:$OPTION51:$OPTION50:$OPTION54:$OPTION01:$OPTION02:$OPTION03:$OPTION04:$OPTION05:$OPTION06:$OPTION07:$OPTION08:$OPTION09:$OPTION10:$OPTION11:$OPTION13:$OPTION14:$OPTION15:$OPTION16:$OPTION17:$OPTION18:$OPTION19:$OPTION20:$OPTION21:$OPTION22:$OPTION23:$OPTION24:" OUTPUT4="$OPTION25:$OPTION26:$OPTION27:$OPTION28:$OPTION29:$OPTION30:$OPTION31:$OPTION32:$OPTION33:$OPTION34:$OPTION35:$OPTION36:$OPTION37:$OPTION38:$OPTION39:$OPTION40:$OPTION41:$OPTION42:$OPTION43:$OPTION44:$OPTION45:$OPTION46:$OPTION47:$OPTION48:$OPTION49:$OPTION55:$OPTION56:$OPTION57:$OPTION77" echo $OUTPUT1$OUTPUT2 echo $OUTPUT3$OUTPUT4 rm -rf /tmp/dhcpcd.ini.$$ } parse_string_rawname_mktcpipenMinimum Configuration & Startup To Delete existing configuration data, please use Further Configuration menussmit.cat/usr/sbin/mktcpip/usr/sbin/mktcpip -S $1_rawname_mktcpipenMinimum Configuration & Startup To Delete existing configuration data, please use Further Configuration menussmit.cat/usr/sbin/mktcpip/usr/sbin/mktcpip -S $1_rawname_mktcpiptrMinimum Configuration & Startup To Delete existing configuration data, please use Further Configuration menussmit.cat/usr/sbin/mktcpip/usr/sbin/mktcpip -S $1_rawname_mktcpipxtMinimum Configuration & Startup To Delete existing configuration data, please use Further Configuration menussmit.cat/usr/sbin/mktcpip/usr/sbin/mktcpip -S $1_rawname_mktcpipxtMinimum Configuration & Startup To Delete existing configuration data, please use Further Configuration menussmit.cat/usr/sbin/mktcpip/usr/sbin/mktcpip -S $1_rawname_mkhostnameSet Hostname Please refer to Help for information concerning hostname / INTERNET address mappingsmit.catfunction cmd_to_exec { if test -z 'lsdev -C -S1 -F name -l inet0' then mkdev -t inet fi chdev -l inet0 -a hostname=$1 if [ -x /usr/sbin/hostid ] then /usr/sbin/hostid `hostname` if [ -x /usr/lib/lpd/pio/etc/piodmgr ] then /usr/lib/lpd/pio/etc/piodmgr -c > /dev/null 2>&1 fi else echo Could not find /usr/sbin/hostid fi }; cmd_to_execfunction cmd_host { echo "#_rawname" hostname } cmd_hostsmit.cathostnamesmit.catnetstat -rn_mkrouteAdd a Static Routesmit.catfunction cmd_to_exec { unset mask unset interface mask=${5#-m} interface=${6#-i} if [ $1 = "host" -a -n "$mask" ] ; then echo "netmask not allowed when adding a route with TYPE host" exit 1 fi if [ $mask ] ; then if [ "`echo $mask | cut -c 1,2`" != "0x" ] ; then unset i unset j i=5 if [ "`echo $mask | cut -f $i -d .`" != "" ] ; then echo "Invalid netmask" exit 1 else i=`expr $i - 1` while [ $i -gt 0 ] ; do j=`echo $mask | cut -f $i -d .` if [ "$j" = "" ] ; then echo "Invalid netmask" exit 1 fi if [ $j -lt 0 -o $j -gt 255 ] ; then echo "Warning : The netmask is not valid and may result to ambiguity" fi i=`expr $i - 1` done fi fi fi if test -z 'lsdev -C -S1 -F name -l inet0' then mkdev -t inet fi unset arg2 if [ $mask ] ; then arg2=-netmask,$mask else arg2= fi unset arg if [ $8 = "yes" ] ; then arg=-interface else arg=-hopcount,$4 fi unset arg3 if [[ $interface != '' && $interface != 'any Use any available interface' ]] ; then arg3=`echo $interface | awk '{ print $1 }'` arg3=-if,$arg3 else arg3= fi unset arg4 if [ $7 = "yes" ] ; then arg4=-active_dgd else arg4= fi unset arg5 if [ $9 = "0" ] ; then arg5= else arg5=-policy,$9 fi unset arg6 if [ ${10} = "1" ] ; then arg6= else arg6=-weight,${10} fi unset arg7 if [ ${11} = "no" ] ; then arg7= else arg7=-P fi chdev -l inet0 $arg7 -a route=$1,$arg,$arg2,$arg3,$arg4,$arg5,$arg6,-static,$2,$3 unset arg unset arg2 unset arg3 unset arg4 unset arg5 unset arg6 unset arg7 unset mask unset interface } cmd_to_exec_fshrttblFlush Routing Tablesmit.catfunction cmd_to_exec { eval $1 eval $2 eval $3 savebase } cmd_to_exec_rmrouteRemove Static Routesmit.catfunction cmd_to_exec { unset arg2 unset arg3 mask=${4#-m} interface=${5#-i} if [ $1 = "host" -a -n "$mask" ] ; then echo "netmask not allowed when deleting a route with TYPE host" exit 1 fi unset arg2 if [ $mask ] ; then arg2=-netmask,$mask else arg2= fi unset arg if [ $7 = "yes" ] ; then arg=-interface else arg=-hopcount,$6 fi if [[ $interface != '' && $interface != 'any Use any available interface' ]] ; then arg3=`echo $interface | awk '{ print $1 }'` arg3=-if,$arg3 else arg3= fi chdev -l inet0 -a delroute=$1,$arg,$arg2,$arg3,$2,$3 unset arg unset arg2 unset arg3 } cmd_to_exec_chif1Network Interface Driverssmit.catfunction cmd_to_exec { if [ -z "$3" ] then exit fi eval chdev $* } cmd_to_execfunction cmd_to_discover { # this enable the mtu size for 4 - 16 megabit ring speeds to be set # in the predefined attribute IF=`echo $1 | cut -c1-2` if [ "$IF" = "tr" ] then TOKADP=tok`echo $1 | cut -c3` RINGSPEED=`lsattr -E -l $TOKADP -F "value" -a ring_speed` if [ $RINGSPEED = autosense ] then CFG_RING_SPEED=`odmget -q "name=$TOKADP and attribute=cfg_ring_speed" CuAt | grep value | sed -e 's/"//g' | awk '{ print $3 }'` if [ "$CFG_RING_SPEED" = "" ] then RINGSPEED=4 else RINGSPEED=$CFG_RING_SPEED fi fi odmget -q"uniquetype=if/TR/tr and attribute=mtu_$RINGSPEED" PdAt | sed -e "s/mtu_$RINGSPEED/mtu/" >/tmp/tmpp$$ 2>/dev/null if [ $? = 0 ] then odmchange -o PdAt -q"uniquetype=if/TR/tr and attribute=mtu" /tmp/tmpp$$ 2>&1 >/dev/null fi if [ -f /tmp/tmpp$$ ] then rm /tmp/tmpp$$ 2>&1 >/dev/null fi fi lsattr -E -l $1 -O } cmd_to_discover_rawname_chifenNetwork Interface Driverssmit.catfunction cmd_to_exec { if [ -z "$3" ] then exit fi eval chdev $* } cmd_to_execlsattr -E -l en0 -O_chiftrNetwork Interface Driverssmit.catfunction cmd_to_exec { if [ -z "$3" ] then exit fi eval chdev $* } cmd_to_execlsattr -E -l tr0 -O_chifsoNetwork Interface Driverssmit.catfunction cmd_to_exec { if [ -z "$3" ] then exit fi eval chdev $* } cmd_to_execlsattr -E -l so0 -O_mkinetenAdd a Standard Ethernet Network Interfacesmit.catmkdev -c if -s EN -t en_mkinetetAdd an IEEE 802.3 Network Interfacesmit.catmkdev -c if -s EN -t ie3_mkinettrAdd a Token-Ring Network Interfacesmit.catmkdev -c if -s TR -t tr_mkinetslAdd a Serial Line INTERNET Network Interfacesmit.cat function cmdsl { echo $@ | grep "[ ]-a[ ]state=up" >/dev/null UP=$? echo $@ | grep "[ ]-a[ ]dialstring=" >/dev/null DS=$? echo $@ | grep "[ ]-a[ ]baudrate=" >/dev/null BD=$? PARM=`echo $@ | sed -e "s/[ ]-a[ ]dialstring=.*//"` UNIT=`echo $@ | sed -e 's/.*ttyport=tty\([0-9]*\).*/\1/'` if [ $DS = 0 -a $BD != 0 ] then echo "Missing Baudrate." exit 1 fi if [ $BD = 0 -a $DS != 0 ] then SLIP_DIAL_STRING="" fi if [ $DS = 0 ] then for i in "$@" do SLIP_DIAL_STRING="$i" shift done fi export SLIP_DIAL_STRING TMP=`mkdev -c if -s SL -t sl -w sl$UNIT $PARM` if [ $? != 0 ] then exit 1 fi strinfo -m | grep slip>/dev/null SD=$? if [ $SD != 0 ] then strload -m /usr/lib/drivers/slip fi SD=$? if [ $SD != 0 ] then echo "Cannot load slip discipline." exit 1 fi echo $TMP IP=`echo $TMP | awk '{ print $1 }'` TTY=`lsattr -E -l $IP -F "value" -a ttyport` if [ $UP = 0 ] then if [ $BD != 0 ] then eval slattach $TTY sleep 30 else BD=`lsattr -E -l $IP -F "value" -a baudrate` eval DST=\'$SLIP_DIAL_STRING\' eval slattach $TTY $BD \'$DST\' sleep 60 fi fi } cmdsl_mkinetsoAdd a Serial Optical Network Interfacesmit.catmkdev -c if -s SO -t soList All Network Interfacessmit.catlsdev -C -c if -F "name location description" | sort_chinetenChange / Show a Standard Ethernet Interfacesmit.catfunction cmd_to_exec { eval chdev $* } cmd_to_execfunction cmd_to_discover { lsattr -E -l $1 |grep alias6 |awk '{ print $2 }' |grep : >/dev/null if [ $? = 0 ] then IP6=`lsattr -E -l $1 |grep netaddr6 |awk '{ print $2 }'` IP=`echo $IP6 | sed s/:/#!:/g` LINE=`lsattr -E -l $1 -O |grep $IP6` LINE=`echo $LINE | sed s/$IP6/$IP/` IPALIAS6LIST=`lsattr -E -l $1 |grep alias6 |awk '{ print $2 }'` for ALIAS6 in $IPALIAS6LIST do ALIAS6ADDR=`echo $ALIAS6 | cut -d / -f 1` ALIAS=`echo $ALIAS6ADDR | sed s/:/#!:/g` LINE=`echo $LINE | sed s/$ALIAS6ADDR/$ALIAS/` done echo `lsattr -E -l $1 -O |grep alias6` echo $LINE else lsattr -E -l $1 |grep netaddr6 |awk '{ print $2 }' |grep : >/dev/null if [ $? = 0 ] then IP6=`lsattr -E -l $1 |grep netaddr6 |awk '{ print $2 }'` IP=`echo $IP6 | sed s/:/#!:/g` lsattr -E -l $1 -O | sed s/$IP6/$IP/ else lsattr -E -l $1 -O fi fi } cmd_to_discover_rawname_chinetenChange / Show an IEEE 802.3 Network Interfacesmit.catfunction cmd_to_exec { eval chdev $* } cmd_to_execfunction cmd_to_discover { lsattr -E -l $1 -O } cmd_to_discover_rawname_chinettrChange / Show a Token-Ring Network Interfacesmit.catfunction cmd_to_exec { eval chdev $* } cmd_to_execfunction cmd_to_discover { lsattr -E -l $1 -O } cmd_to_discover_rawname_chinetslChange / Show a Serial Line Network Interfacesmit.catfunction csl { IP=$2 PARM=`echo $@ | sed -e "s/[ ]-a[ ]dialstring=.*//"` BD=`echo $@ | sed -e "s/.*[ ]-a[ ]baudrate=//" -e "s/[ ].*//"` STATE=`echo $@ | sed -e "s/.*[ ]-a[ ]state=//" -e "s/[ ].*//"` for i in "$@" do SLIP_DIAL_STRING="$i" shift done export SLIP_DIAL_STRING DS="$SLIP_DIAL_STRING" if [ -z "$DS" -a ! -z "$BD" ] then SLIP_DIAL_STRING="" fi if [ -z "$BD" -a ! -z "$DS" ] then echo "Missing Baudrate" exit 1 fi strinfo -m | grep slip>/dev/null SD=$? if [ $SD != 0 ] then strload -m /usr/lib/drivers/slip fi SD=$? if [ $SD != 0 ] then echo "Cannot load slip discipline." exit 1 fi OP=`lsattr -E -l $IP -F "value" -a ttyport` ID=`ps -ef | grep "slattach[ ].*$OP[ ]" | awk '{ print $2 }'` if [ ! -z "$ID" ] then kill -15 $ID fi chdev $PARM if [ $? != 0 ] then exit 1 fi if [ $STATE = detach -o $STATE = down ] then exit 0 fi TP=`lsattr -E -l $IP -F "value" -a ttyport` if [ -z "$BD" -a -z "$DS" ] then eval slattach $TP sleep 30 else eval DST=\'$SLIP_DIAL_STRING\' eval slattach $TP $BD \'$DST\' sleep 60 fi } cslfunction cmd_to_discover { lsattr -E -l $1 -O } cmd_to_discover_rawname_chinetsoChange / Show a Serial Optical Network Interfacesmit.catfunction cmd_to_exec { eval chdev $* } cmd_to_execfunction cmd_to_discover { lsattr -E -l $1 -O } cmd_to_discover_rawname_rmi1smit.catfunction cmd_to_exec { rmdev $1 $2 -d } cmd_to_exec_stnamerslv1Restore a Copy of /etc/resolv.conf Filesmit.cat/usr/sbin/namerslvif [ -f /etc/resolv.conf.sv ]; then echo "#filename /etc/resolv.conf.sv" else echo "#filename" fi_stnamerslv2Create a New /etc/resolv.conf Filesmit.cat/usr/sbin/namerslv -bList All Nameserverssmit.cat/usr/sbin/namerslv -s -I_mknamerslvAdd a Nameserversmit.cat/usr/sbin/namerslv_rmnamerslvRemove a Nameserversmit.cat/usr/sbin/namerslv -d_spnamerslvStop Using a Nameserversmit.cat/usr/sbin/namerslv_mkdomainSet / Show the Domainsmit.cat/usr/sbin/namerslv/usr/sbin/namerslv -s -n -Z; echo; exit 0Remove the Domainsmit.cat/usr/sbin/namerslv -d -n_sedomainSet / Show the Domain Search Listsmit.cat/usr/sbin/namerslv/usr/sbin/namerslv -s -l -Z; echo; exit 0Remove the Domain Search Listsmit.cat/usr/sbin/namerslv -d -lsmit.cat/usr/sbin/hostent -S_mkhostentAdd a Host Namesmit.catfunction cmd_to_exec { eval /usr/sbin/hostent -a $1 -h \"$2 $3 $4\" } cmd_to_exec_chhostent1Change / Show Characteristics of a Hostsmit.catfunction cmd_to_exec { if [ "$2" = "-i" ] then eval /usr/sbin/hostent -c $1 $2 $3 -h \"$4 $5 $6\" else eval /usr/sbin/hostent -c $1 -h \"$2 $3 $4\" fi } cmd_to_execfunction cmddisc { IP=`echo $1 | awk '{ print $1 }'` IP2=`echo $IP | sed "s/:/#!:/g"` /usr/sbin/hostent -s $IP -Z | sed "s/$IP/$IP2/" } cmddisc_rawname_rmhostent1smit.cat/usr/sbin/hostentList all Servicessmit.catecho Service Port/Protocol Aliases;echo --------------------------------------------------------------------------;cat /etc/services | sed -e '/^#/d'_mkservicesAdd a Servicesmit.cat/usr/sbin/chservices -a _chservices1Change / Show Characteristics of a Servicesmit.cat/usr/sbin/chservices -c function cmddisc_conf { SV=`echo $1 | awk '{ print $1 }'` PR=`echo $1 | awk '{ print $2 }'` egrep "$SV.*.$PR" /etc/services | sed -e 's/\// /g' | awk '{ printf("#service:port:proto:aliases\n%s:%s:%s:\n",$1,$2,$3) }' } cmddisc_conf_rawname_rmservices1Remove a Servicesmit.cat/usr/sbin/chservices -d function cmddisc_conf { SV=`echo $1 | awk '{ print $1 }'` PR=`echo $1 | awk '{ print $2 }'` egrep "$SV.*.$PR" /etc/services | sed -e 's/\// /g' | awk '{ printf("#service:oldport:proto:aliases\n%s:%s:%s:\n",$1,$2,$3) }' } cmddisc_conf_rawnamesmit.catruser -s -R_mkhostsequivAdd a Remote Hostsmit.catruser_rmhostsequivRemove a Remote Hostsmit.catrusersmit.catruser -sF_mkftpusersAdd a Restricted Usersmit.catruser_rmftpusersRemove a Restricted Usersmit.catrusersmit.catstartsrc -s inetdsmit.cat/usr/sbin/chrctcp -a inetdsmit.cat/usr/sbin/chrctcp -S -a inetd_chinetdChange / Show Restart Characteristics of inetd Subsystemsmit.cat/usr/sbin/chrctcp -S -c inetd/usr/sbin/chrctcp -s inetdsmit.catstopsrc -s inetdsmit.cat/usr/sbin/chrctcp -d inetdsmit.cat/usr/sbin/chrctcp -S -d inetdsmit.catstartsrc -s syslogdsmit.cat/usr/sbin/chrctcp -a syslogdsmit.cat/usr/sbin/chrctcp -S -a syslogd_chsyslogdChange / Show Restart Characteristics of syslogd Subsystemsmit.cat/usr/sbin/chrctcp -S -c syslogd/usr/sbin/chrctcp -s syslogdsmit.catstopsrc -s syslogdsmit.cat/usr/sbin/chrctcp -d syslogdsmit.cat/usr/sbin/chrctcp -S -d syslogdsmit.catstartsrc -s routedsmit.cat/usr/sbin/chrctcp -a routedsmit.cat/usr/sbin/chrctcp -S -a routed_chroutedChange / Show Restart Characteristics of routed Subsystemsmit.cat/usr/sbin/chrctcp -S -c routed/usr/sbin/chrctcp -s routedsmit.catstopsrc -s routedsmit.cat/usr/sbin/chrctcp -d routedsmit.cat/usr/sbin/chrctcp -S -d routedsmit.catstartsrc -s gatedsmit.cat/usr/sbin/chrctcp -a gatedsmit.cat/usr/sbin/chrctcp -S -a gatedsmit.catstopsrc -s gatedsmit.cat/usr/sbin/chrctcp -d gatedsmit.cat/usr/sbin/chrctcp -S -d gatedsmit.catstartsrc -s namedsmit.cat/usr/sbin/chrctcp -a namedsmit.cat/usr/sbin/chrctcp -S -a named_chnamedChange / Show Restart Characteristics of named Subsystemsmit.cat/usr/sbin/chrctcp -S -c named/usr/sbin/chrctcp -s namedsmit.catstopsrc -s namedsmit.cat/usr/sbin/chrctcp -d namedsmit.cat/usr/sbin/chrctcp -S -d namedsmit.catstartsrc -s rwhodsmit.cat/usr/sbin/chrctcp -a rwhodsmit.cat/usr/sbin/chrctcp -S -a rwhodsmit.catstopsrc -s rwhodsmit.cat/usr/sbin/chrctcp -d rwhodsmit.cat/usr/sbin/chrctcp -S -d rwhodsmit.catstartsrc -s timedsmit.cat/usr/sbin/chrctcp -a timedsmit.cat/usr/sbin/chrctcp -S -a timedsmit.catstartsrc -s snmpdsmit.cat/usr/sbin/chrctcp -a snmpdsmit.cat/usr/sbin/chrctcp -S -a snmpdsmit.catstartsrc -s dhcpsdsmit.cat/usr/sbin/chrctcp -a dhcpsdsmit.cat/usr/sbin/chrctcp -S -a dhcpsdsmit.catstartsrc -s dhcpcdsmit.cat/usr/sbin/chrctcp -a dhcpcdsmit.cat/usr/sbin/chrctcp -S -a dhcpcdsmit.catstartsrc -s dhcprdsmit.cat/usr/sbin/chrctcp -a dhcprdsmit.cat/usr/sbin/chrctcp -S -a dhcprd_chtimedChange / Show Restart Characteristics of timed Subsystemsmit.cat/usr/sbin/chrctcp -S -c timed/usr/sbin/chrctcp -s timedsmit.catstopsrc -s timedsmit.cat/usr/sbin/chrctcp -d timedsmit.cat/usr/sbin/chrctcp -S -d timedsmit.catstopsrc -s snmpdsmit.cat/usr/sbin/chrctcp -d snmpdsmit.cat/usr/sbin/chrctcp -S -d snmpdsmit.catstopsrc -s dhcpsdsmit.cat/usr/sbin/chrctcp -d dhcpsdsmit.cat/usr/sbin/chrctcp -S -d dhcpsdsmit.catstopsrc -s dhcpcdsmit.cat/usr/sbin/chrctcp -d dhcpcdsmit.cat stopsrc -s dhcpcd /usr/sbin/chrctcp -d dhcpcd smit.catstopsrc -s dhcprdsmit.cat/usr/sbin/chrctcp -d dhcprdsmit.cat/usr/sbin/chrctcp -S -d dhcprdsmit.catecho "Service Socket Protocol Wait/ User Server Program Server Program";echo "Name Type Nowait Arguments";echo --------------------------------------------------------------------------;cat /etc/inetd.conf | sed -e '/^#/d'_mkinetdconf1Add an inetd Subserver Please refer to help for information concerning subserver dependenciessmit.cat/usr/sbin/chsubserver -r inetd -C /etc/inetd.conf -a function cmddisc_conf { SV=`echo $1 | awk '{ print $1 }'` PR=`echo $1 | awk '{ print $2 }'` egrep "$SV.*.$PR" /etc/inetd.conf > /dev/null 2>&1 RC=$? if [ $RC != 1 ] then egrep "$SV.*.$PR" /etc/inetd.conf | sed -e 's/^#//' | awk ' function find_args(b, field) { split(b, a) x = "" for (i = field; a[i]; ++i) if (length(x)) x = x " " a[i] else x = a[i] return x } { printf("#service:socket:proto:wait:user:prog:args\n%s:%s:%s:%s:%s:%s:%s:\n", $1, $2, $3, $4, $5, $6, find_args($0, 7)) }' else echo "#service:socket:proto:wait:user:prog:args\n$SV:stream:tcp:nowait:::" fi } cmddisc_conf_rawname_chinetdconf1Change / Show Characteristics of an inetd Subserversmit.cat/usr/sbin/chsubserver -r inetd -C /etc/inetd.conf -c function cmddisc_conf { SV=`echo $1 | awk '{ print $1 }'` PR=`echo $1 | awk '{ print $2 }'` egrep "$SV.*.$PR" /etc/inetd.conf > /dev/null 2>&1 RC=$? if [ $RC != 1 ] then egrep "$SV.*.$PR" /etc/inetd.conf | sed -e 's/^#//' | awk ' function find_args(b, field) { split(b, a) x = "" for (i = field; a[i]; ++i) if (length(x)) x = x " " a[i] else x = a[i] return x } { printf("#service:socket:proto:wait:user:prog:args\n%s:%s:%s:%s:%s:%s:%s:\n", $1, $2, $3, $4, $5, $6, find_args($0, 7)) }' else echo "#service:socket:proto:wait:user:prog:args\n$SV:stream:$PR:nowait:::" fi } cmddisc_conf_rawname_rminetdconf1Remove an inetd Subserversmit.cat/usr/sbin/chsubserver -r inetd -C /etc/inetd.conf -d List All Network Interfacessmit.catlsdev -C -c if -t en -F nameList All Network Interfacessmit.catlsdev -C -c if -t tr -F nameList All Network Interfacessmit.catlsdev -C -c if -t so -F name_setbootup_optionSelect BSD style rc Configuration Please answer yes if you want BSD style rc configuration. The default is no. AIX configuration uses the data in the ODM database and uses the file /etc/rc.net to define, load and configure a corresponding interface. BSD style configuration uses the traditional ifconfig command and it uses the file /etc/rc.bsdnet to configure the corresponding interface.smit.catfunction cmd_to_exec { if test -z 'lsdev -C -S1 -F name -l inet0' then mkdev -t inet fi chdev -l inet0 -a bootup_option=$1 } cmd_to_execfunction cmd_option { echo "#bootup_option" lsattr -E -l inet0 -a bootup_option -F value } cmd_optionsmit.cat/etc/rc.tcpipsmit.cat src_running=`ps -e | awk '$NF == "srcmstr" { print $1; exit }'` if [ -n "$src_running" ] then stopsrc -g tcpip 2> /dev/null > /dev/null else for i in `lssrc -g tcpip | grep tcpip | awk '{ print $1 }'` do pid=`ps -e | awk '$NF == "'$i'" { print $1; exit }'` if [ -n "$pid" ] then kill $pid 2>/dev/null sleep 1 kill -9 $pid 2>/dev/null fi done fi _mktcpipxtMinimum Configuration & Startup To Delete existing configuration data, please use Further Configuration menussmit.cat/usr/sbin/mktcpip/usr/sbin/mktcpip -S $1_rawname_chiffiNetwork Interface Driverssmit.catfunction cmd_to_exec { if [ -z "$3" ] then exit fi eval chdev $* } cmd_to_execlsattr -E -l fi0 -O_mkinetfiAdd a FDDI Network Interfacesmit.catmkdev -c if -s FI -t fi_chinetfiChange / Show a FDDI Network Interfacesmit.catfunction cmd_to_exec { eval chdev $* } cmd_to_execfunction cmd_to_discover { lsattr -E -l $1 -O } cmd_to_discover_rawnameList All Network Interfacessmit.catlsdev -C -c if -t fi -F namesmit.catstartsrc -s xntpdsmit.cat/usr/sbin/chrctcp -a xntpdsmit.cat/usr/sbin/chrctcp -S -a xntpdsmit.catstopsrc -s xntpdsmit.cat/usr/sbin/chrctcp -d xntpdsmit.cat/usr/sbin/chrctcp -S -d xntpdsmit.catstartsrc -s mroutedsmit.cat/usr/sbin/chrctcp -a mroutedsmit.cat/usr/sbin/chrctcp -S -a mroutedsmit.catstopsrc -s mroutedsmit.cat/usr/sbin/chrctcp -d mroutedsmit.cat/usr/sbin/chrctcp -S -d mroutedsmit.cat/usr/sbin/chrctcp -d autoconf6smit.cat/usr/sbin/autoconf6smit.cat/usr/sbin/chrctcp -a autoconf6smit.cat/usr/sbin/chrctcp -S -a autoconf6_configauto6Change / Show Restart Characteristics of Autoconf6 Processsmit.cat/usr/sbin/chrctcp -c autoconf6/usr/sbin/chrctcp -s autoconf6smit.catstartsrc -s ndpd-hostsmit.cat/usr/sbin/chrctcp -a ndpd-hostsmit.cat/usr/sbin/chrctcp -S -a ndpd-hostsmit.catstopsrc -s ndpd-hostsmit.cat/usr/sbin/chrctcp -d ndpd-hostsmit.cat/usr/sbin/chrctcp -S -d ndpd-host_chinetd6Change / Show Restart Characteristics of inetd Subsystemsmit.cat/usr/sbin/chrctcp -S -c inetd/usr/sbin/chrctcp -s inetd_mk6aliasAdd an IPV6 Network Aliassmit.catfunction cmd_to_exec { unset arg if [ $3 ] ; then arg=/$3 else arg= fi chdev -l $1 -a alias6=$2$arg } cmd_to_exec_rm6aliasRemove an IPV6 Network Aliassmit.catfunction cmd_to_exec { unset arg if [ $3 ] ; then arg=/$3 else arg= fi chdev -l $1 -a delalias6=$2$arg } cmd_to_exec_mkineten6Add an IPV6 Standard Ethernet Network Interfacesmit.catfunction cmd_to_exec { A=`/usr/sbin/lsadpnm -c if -s EN -t en 2>&1` if [ $? -eq 0 ] then mkdev -c if -s EN -t en fi if [ $4 ] then chdev -l $3 -a netaddr6=$1 -a prefixlen=$2 -a state=$4 else chdev -l $2 -a netaddr6=$1 -a state=$3 fi }; cmd_to_exec_mkinetet6Add an IPV6 IEEE 802.3 Network Interfacesmit.catfunction cmd_to_exec { A=`/usr/sbin/lsadpnm -c if -s EN -t ie3 2>&1` if [ $? -eq 0 ] then mkdev -c if -s EN -t ie3 fi if [ $4 ] then chdev -l $3 -a netaddr6=$1 -a prefixlen=$2 -a state=$4 else chdev -l $2 -a netaddr6=$1 -a state=$3 fi }; cmd_to_exec_mkinettr6Add an IPV6 Token-Ring Network Interfacesmit.catfunction cmd_to_exec { A=`/usr/sbin/lsadpnm -c if -s TR -t tr 2>&1` if [ $? -eq 0 ] then mkdev -c if -s TR -t tr fi if [ $4 ] then chdev -l $3 -a netaddr6=$1 -a prefixlen=$2 -a state=$4 else chdev -l $2 -a netaddr6=$1 -a state=$3 fi }; cmd_to_exec_mkinetfi6Add an IPV6 FDDI Network Interfacesmit.catfunction cmd_to_exec { A=`/usr/sbin/lsadpnm -c if -s FI -t fi 2>&1` if [ $? -eq 0 ] then mkdev -c if -s FI -t fi fi if [ $4 ] then chdev -l $3 -a netaddr6=$1 -a prefixlen=$2 -a state=$4 else chdev -l $2 -a netaddr6=$1 -a state=$3 fi }; cmd_to_exec_mkroute6Add an IPV6 Static Routesmit.catfunction cmd_to_exec { if test -z 'lsdev -C -S1 -F name -l inet0' then mkdev -t inet fi unset arg2 mask=${5#-p} if [ $1 = host -a -n $mask ] ; then echo "netmask not allowed when adding a route with TYPE host" exit 1 fi if [ $mask ] ; then arg2=-prefixlen,$mask else arg2= fi unset arg if [ $4 ] ; then arg=-hopcount,$4 else arg= fi unset arg3 xface=${6#-i} if [[ $xface != '' && $xface != 'any Use any available interface' ]] ; then arg3=`echo $xface | awk '{ print $1 }'` arg3=-if,$arg3 else arg3= fi unset arg4 if [ $7 = "yes" ] ; then arg4=-active_dgd else arg4= fi chdev -l inet0 -a rout6=$1,$arg,$arg2,$arg3,$arg4,-static,$2,$3 unset arg unset arg2 unset arg3 unset arg4 } cmd_to_exec_rmroute6Remove IPV6 Static Routesmit.catfunction cmd_to_exec { unset arg2 if [ $4 ] then arg2=-prefixlen,$4 else arg2= fi chdev -l inet0 -a delrout6=$1,$arg2,$2,$3 } cmd_to_exec_chinet6enChange / Show an IPV6 Standard Ethernet Interfacesmit.catfunction cmd_to_exec { eval chdev $* } cmd_to_execfunction cmd_to_discover { lsattr -E -l $1 |grep alias6 |awk '{ print $2 }' |grep : >/dev/null if [ $? = 0 ] then IP6=`lsattr -E -l $1 |grep netaddr6 |awk '{ print $2 }'` IP=`echo $IP6 | sed s/:/#!:/g` LINE=`lsattr -E -l $1 -O |grep $IP6` LINE=`echo $LINE | sed s/$IP6/$IP/` IPALIAS6LIST=`lsattr -E -l $1 |grep alias6 |awk '{ print $2 }'` for ALIAS6 in $IPALIAS6LIST do ALIAS6ADDR=`echo $ALIAS6 | cut -d / -f 1` ALIAS=`echo $ALIAS6ADDR | sed s/:/#!:/g` LINE=`echo $LINE | sed s/$ALIAS6ADDR/$ALIAS/` done echo `lsattr -E -l $1 -O |grep alias6` echo $LINE else lsattr -E -l $1 |grep netaddr6 |awk '{ print $2 }' |grep : >/dev/null if [ $? = 0 ] then IP6=`lsattr -E -l $1 |grep netaddr6 |awk '{ print $2 }'` IP=`echo $IP6 | sed s/:/#!:/g` lsattr -E -l $1 -O | sed s/$IP6/$IP/ else lsattr -E -l $1 -O fi fi } cmd_to_discover_rawname_chinet6enChange / Show an IPV6 IEEE 802.3 Network Interfacesmit.catfunction cmd_to_exec { eval chdev $* } cmd_to_execfunction cmd_to_discover { lsattr -E -l $1 |grep netaddr6 |awk '{ print $2 }' |grep : >/dev/null if [ $? = 0 ] then IP6=`lsattr -E -l $1 |grep netaddr6 |awk '{ print $2 }'` IP=`echo $IP6 | sed s/:/#!:/g` lsattr -E -l $1 -O | sed s/$IP6/$IP/ else lsattr -E -l $1 -O fi } cmd_to_discover_rawname_chinet6trChange / Show an IPV6 Token-Ring Network Interfacesmit.catfunction cmd_to_exec { eval chdev $* } cmd_to_execfunction cmd_to_discover { lsattr -E -l $1 |grep netaddr6 |awk '{ print $2 }' |grep : >/dev/null if [ $? = 0 ] then IP6=`lsattr -E -l $1 |grep netaddr6 |awk '{ print $2 }'` IP=`echo $IP6 | sed s/:/#!:/g` lsattr -E -l $1 -O | sed s/$IP6/$IP/ else lsattr -E -l $1 -O fi } cmd_to_discover_rawname_chinet6fiChange / Show an IPV6 FDDI Network Interfacesmit.catfunction cmd_to_exec { eval chdev $* } cmd_to_execfunction cmd_to_discover { lsattr -E -l $1 |grep netaddr6 |awk '{ print $2 }' |grep : >/dev/null if [ $? = 0 ] then IP6=`lsattr -E -l $1 |grep netaddr6 |awk '{ print $2 }'` IP=`echo $IP6 | sed s/:/#!:/g` lsattr -E -l $1 -O | sed s/$IP6/$IP/ else lsattr -E -l $1 -O fi } cmd_to_discover_rawname_addinetct6Add an IPV6 in IPV4 Tunnel Interfacesmit.catfunction cmd_to_exec { ctif=`/usr/lib/methods/deftunnel -c if -s CTI -t cti` unset arg2 if [ $3 ] ; then arg2=$3 else arg2=0 fi unset arg if [ $4 ] ; then arg=$4 else arg=0 fi chdev -l $ctif -a srctunnel4=$1 -a destunnel4=$2 -a srctunnel6=$arg2 -a destunnel6=$arg ret=$? if [ $ret -ne 0 ] ; then ans=`rmdev -dl $ctif` fi } cmd_to_exec_mk4aliasAdd an IPV4 Network Aliassmit.catfunction cmd_to_exec { unset arg if [ $3 ] ; then arg=,$3 else arg= fi chdev -l $1 -a alias4=$2$arg } cmd_to_exec_rm4aliasRemove an IPV4 Network Aliassmit.catfunction cmd_to_exec { unset arg if [ $3 ] ; then arg=,$3 else arg= fi chdev -l $1 -a delalias4=$2$arg } cmd_to_execsmit.cat/usr/bin/lsauthent_auth_setSet Authentication Methodssmit.cat/usr/bin/chauthent#Get initial authentication settings no=`dspmsg -s 8 smit.cat 21 "no"` yes=`dspmsg -s 8 smit.cat 22 "yes"` K5=$no K4=$no STD=$no LANG=C /usr/bin/lsauthent | while read A1 do if `echo $A1 | grep "Kerberos 5" > /dev/null` then K5=$yes fi if `echo $A1 | grep "Kerberos 4" > /dev/null` then K4=$yes fi if `echo $A1 | grep "Standard Aix" > /dev/null` then STD=$yes fi done print '#k5:k4:std\n'$K5:$K4:$STD smit.catstartsrc -s ndpd-routersmit.cat/usr/sbin/chrctcp -a ndpd-routersmit.cat/usr/sbin/chrctcp -S -a ndpd-routersmit.catstopsrc -s ndpd-routersmit.cat/usr/sbin/chrctcp -d ndpd-routersmit.cat/usr/sbin/chrctcp -S -d ndpd-routersmit.cat/usr/sbin/mkqos '-N'smit.cat/usr/sbin/mkqos '-I'smit.cat/usr/sbin/mkqos '-B'smit.cat/usr/sbin/rmqos '-N'smit.cat/usr/sbin/rmqos '-I'smit.cat/usr/sbin/rmqos '-B'_mkinetviAdd a Virtual IP Address Interfacesmit.catmkdev -c if -s VI -t vi_chinetviChange / Show a Virtual IP Address Interfacesmit.catfunction cmd_to_exec { tmp=`echo $* | grep REMOVE` if [ "$tmp" = "" ] then eval chdev $* else tmp=`echo $* | sed 's/REMOVE/ /g'` tmp=`echo $tmp | sed 's/interface_names='/interface_names='-,/g'` eval chdev $tmp fi } cmd_to_execfunction cmd_to_discover { lsattr -E -l $1 -O } cmd_to_discover_rawname_mkinetvi6Add an IPV6 Virtual IP Address Interfacesmit.catmkdev -c if -s VI -t vi_chinet6viChange / Show a Virtual IP Address Interfacesmit.catfunction cmd_to_exec { eval chdev $* } cmd_to_execfunction cmd_to_discover { lsattr -E -l $1 |grep netaddr6 |awk '{ print $2 }' |grep : >/dev/null if [ $? = 0 ] then IP6=`lsattr -E -l $1 |grep netaddr6 |awk '{ print $2 }'` IP=`echo $IP6 | sed s/:/#!:/g` lsattr -E -l $1 -O | sed s/$IP6/$IP/ else lsattr -E -l $1 -O fi } cmd_to_discover_rawnamesmit.catstartsrc -s pxedsmit.cat/usr/sbin/chrctcp -a pxedsmit.cat/usr/sbin/chrctcp -S -a pxedsmit.catstopsrc -s pxedsmit.cat/usr/sbin/chrctcp -d pxedsmit.catstopsrc -s pxed /usr/sbin/chrctcp -d pxedsmit.catstartsrc -s binldsmit.cat/usr/sbin/chrctcp -a binldsmit.cat/usr/sbin/chrctcp -S -a binldsmit.catstopsrc -s binldsmit.cat/usr/sbin/chrctcp -d binldsmit.catstopsrc -s binld /usr/sbin/chrctcp -d binld_yp.chypdomChange NIS Domain Name of this Hostsmit.cat/usr/sbin/chypdomecho "#domainname" ; /usr/bin/domainname_yp.mkclientConfigure this Host as a NIS Clientsmit.cat/usr/sbin/mkclient_yp.mkclientChange / Show Characteristics of Client Configurationsmit.cat/usr/sbin/chclient/usr/sbin/lsclient -c_yp.rmypclntRemove NIS Client Configuration from this Hostsmit.cat/usr/sbin/rmyp -cStart the Client Daemon, ypbindsmit.catstartsrc -s ypbind_yp.bindclientBind Client to a Serversmit.cat/usr/sbin/ypsetStop the Client Daemon, ypbindsmit.catstopsrc -s ypbind_startkeyservStart the Keyserv Daemonsmit.cat/usr/sbin/mkkeyserv_stopkeyservStop the Keyserv Daemonsmit.cat/usr/sbin/rmkeyserv_rpc.newkeyAdd / Change Keys for Userssmit.cat/usr/sbin/newkeychgiocpCmdOptChange/Show Characteristics of I/O Completion Portssmit.catx() { chdev -l iocp0 -P $* if [ $? = 0 ] then dspmsg smit.cat -s 25 763 'Changes will become effective at next system restart' fi } xlsattr -l iocp0 -E -O Configure Defined I/O Completion Portssmit.catmkdev -l iocp0diagcd /; shutdown -mcdat_create_optCreate the Repositorycdat.cat/usr/bin/cdat init/usr/lib/cdat/smit/cdat_init_valuescdat.catcdat_no_init_optNo initializationcdat.cat/usr/lib/cdat/smit/cdat_no_initcdat_disc_nodes_optDiscover Nodescdat.catdiscover() { eval /usr/bin/cdat discover-nodes \ "$1" \"$2$3\" "$4" "$5" "$6" REP=$? echo /usr/bin/dspmsg -s 11 cdat.cat 3 \ "Type enter to continue.\n" /usr/bin/line exit $REP } discover/usr/lib/cdat/smit/cdat_default_valuescdat.catcdat_list_nodes_optList the Remote Nodescdat.cat/usr/bin/cdat list-nodes/usr/lib/cdat/smit/cdat_default_valuescdat.catcdat_add_node_optAdd a Remote Nodecdat.cat/usr/lib/cdat/smit/cdat_add_node -a/usr/lib/cdat/smit/cdat_default_valuescdat.catcdat_add_node_optAdd a Remote Node and Initialize Accesscdat.cat/usr/lib/cdat/smit/cdat_add_node -i/usr/lib/cdat/smit/cdat_default_valuescdat.catcdat_access_nodes_optInitialize Access to Remote Nodescdat.catx() { if [ "$1" != "-f" -a "$1" != "-n" ] then /usr/bin/dspmsg -s 11 cdat.cat 4 \ "A value must be specified in the entry field for either \"Node filename\" or \"Remote nodes\".\n" /usr/bin/dspmsg -s 11 cdat.cat 3 \ "Type enter to continue.\n" /usr/bin/line exit 1 fi if [ "$1" = "-f" -a "$3" = "-n" ] then # no -f option if -n option shift shift fi if [ "$1" = "-f" ] then # add -f for each file if multiple files LIST="-f $(echo "$2" | \ /usr/bin/sed -e 's/,/ -f /g')" shift shift fi if [ "$1" = "-n" ] then # add -n for each node if multiple nodes LIST="-n $(echo "$2" | \ /usr/bin/sed -e 's/,/ -n /g')" shift shift fi while (($# > 0)) do LIST="$LIST '$1'" shift done eval /usr/bin/cdat access $LIST REP=$? echo /usr/bin/dspmsg -s 11 cdat.cat 3 \ "Type enter to continue.\n" /usr/bin/line exit $REP } x/usr/lib/cdat/smit/cdat_default_valuescdat.catcdat_change_node_optChange/Show Characteristics of a Remote Nodecdat.cat/usr/lib/cdat/smit/cdat_change_nodecdat_remove_node_optRemove a Remote Nodecdat.cat/usr/lib/cdat/smit/cdat_remove_node -rcdat.catcdat_remove_node_optRemove a Remote Node and Suppress Accesscdat.cat/usr/lib/cdat/smit/cdat_remove_node -scdat.catcdat_supp_auth2_optSuppress Access to Remote Nodescdat.catx() { if [ "$1" != "-f" -a "$1" != "-n" ] then /usr/bin/dspmsg -s 11 cdat.cat 4 \ "A value must be specified in the entry field for either \"Node filename\" or \"Remote nodes\".\n" /usr/bin/dspmsg -s 11 cdat.cat 3 \ "Type enter to continue.\n" /usr/bin/line exit 1 fi if [ "$1" = "-f" -a "$3" = "-n" ] then # no -f option if -n option shift shift fi if [ "$1" = "-f" ] then # add -f for each file if multiple files LIST="-f $(echo "$2" | \ /usr/bin/sed -e 's/,/ -f /g')" shift shift fi if [ "$1" = "-n" ] then # add -n for each node if multiple nodes LIST="-n $(echo "$2" | \ /usr/bin/sed -e 's/,/ -n /g')" shift shift fi while (($# > 0)) do LIST="$LIST '$1'" shift done eval /usr/bin/cdat access -d $LIST REP=$? echo /usr/bin/dspmsg -s 11 cdat.cat 3 \ "Type enter to continue.\n" /usr/bin/line exit $REP } x/usr/lib/cdat/smit/cdat_default_valuescdat.catcdat_collect_data_optCollect Data from Remote Nodescdat.catx() { if [ "$1" != "-f" -a "$1" != "-n" ] then /usr/bin/dspmsg -s 11 cdat.cat 4 \ "A value must be specified in the entry field for either \"Node filename\" or \"Remote nodes\".\n" exit 1 fi if [ "$1" = "-f" -a "$3" = "-n" ] then # no -f option if -n option shift shift fi if [ "$1" = "-f" ] then # add -f for each file if multiple files LIST="-f $(echo "$2" | \ /usr/bin/sed -e 's/,/ -f /g')" shift shift fi if [ "$1" = "-n" ] then # add -n for each node if multiple nodes LIST="-n $(echo "$2" | \ /usr/bin/sed -e 's/,/ -n /g')" shift shift fi while (($# > 4)) do LIST="$LIST '$1'" shift done if [ $# -eq 4 -a "$1" = "-t" -a "$3" = "-o" ] then # add -t for each type if multiple types Tx="$2" Px="$4" while [ -n "`echo $Tx | grep ,`" ] do [ -z "`echo $Px | grep ,`" ] && Px="$Px," T1=`echo "$Tx" | cut -d, -f1` Tx=`echo "$Tx" | cut -d, -f2-` P1=`echo "$Px" | cut -d, -f1` Px=`echo "$Px" | cut -d, -f2-` if [ -n "$P1" ] then LIST="$LIST -t '$T1,$P1'" else LIST="$LIST -t '$T1'" fi done if [ -n "$Px" ] then LIST="$LIST -t '$Tx,$Px'" else LIST="$LIST -t '$Tx'" fi else while (($# > 0)) do if [ "$1" = "-t" ] then # add -t for each type if multiple LIST="$LIST -t $(echo "$2" | \ sed -e 's/,/ -t /g')" shift shift else LIST="$LIST '$1'" shift fi done fi eval /usr/bin/cdat collect -q $LIST REP=$? exit $REP } x/usr/lib/cdat/smit/cdat_default_valuescdat.catcdat_display_coll_optDisplay Repository Contentscdat.cat/usr/bin/cdat showcdat.catcdat_delete_coll_optDelete Collects from the Repositorycdat.cat/usr/bin/cdat deletecdat.catcdat_check_repos_optCheck Consistency of the Repositorycdat.catx() { /usr/bin/cdat check $* REP=$? echo /usr/bin/dspmsg -s 11 cdat.cat 3 \ "Type enter to continue.\n" /usr/bin/line exit $REP } xcdat.catcdat_list_types_optList the Collect Typescdat.cat/usr/bin/cdat list-typescdat.catcdat_archive_coll_optArchive Collectscdat.cat/usr/bin/cdat archivecdat.catList All Collects Scheduledcdat.cat/usr/lib/cdat/smit/cdat_list_sched_collcdat.catcdat_add_sched2_optSchedule a Collectcdat.cat/usr/lib/cdat/smit/cdat_add_sched_coll -a/usr/lib/cdat/smit/cdat_default_valuescdat.catcdat_change_sched2_optChange/Show Characteristics of a Scheduled Collectcdat.cat/usr/lib/cdat/smit/cdat_add_sched_coll -c/usr/lib/cdat/smit/cdat_disc_sched_coll_collectcdat.catcdat_remove_sched2_optRemove a Collect from the Schedulecdat.cat/usr/lib/cdat/smit/cdat_rm_sched_collcdat.catalt_mksysb_optsInstall mksysb on an Alternate Diskalt_disk_install.cat/usr/sbin/alt_disk_mksysbalt_clone_optsClone the rootvg to an Alternate Diskalt_disk_install.cataltinst() { INSTP_FLAGS= DEBUG= SET_BOOTLIST= VERBOSE= REBOOT= UUFLAG= while getopts z:i:s:R:DBVrb:l:w:f:F:e:P: option do case $option in z) INSTP_FLAGS=$INSTP_FLAGS$OPTARG;; i) IMAGE_DATA=$OPTARG;; s) SCRIPT=$OPTARG;; R) RESOLV_CONF=$OPTARG;; D) DEBUG=yes;; B) SET_BOOTLIST=no;; V) VERBOSE=yes;; r) REBOOT=yes;; b) BUNDLE=$OPTARG;; l) IMAGE_LOC=$OPTARG;; w) FILESETS=$OPTARG;; F) FIXES=$OPTARG;; f) FIX_BUNDLE=$OPTARG;; e) EXCLUDE_LIST=$OPTARG;; P) PHASE=$OPTARG;; esac done shift $(($OPTIND - 1)) TARGET_DISK=$* D_WPARS=`/usr/sbin/lswpar -q -s D -a name 2>/dev/null` if [ -n "$D_WPARS" ] then usr/bin/dspmsg -s 2 alt_disk_install.cat 46 " ATTENTION: This is a system WPAR that contains WPARS in the Defined state. The filesystems are going to be mounted and unmounted for backup purposes. If you do not want to backup these file systems, please use the command line option. " UUFLAG="-u" fi [[ -n ${INSTP_FLAGS} ]] && INSTP_FLAGS=a${INSTP_FLAGS} /usr/sbin/alt_disk_copy $UUFLAG ${IMAGE_LOC:+-I $INSTP_FLAGS} ${IMAGE_DATA:+-i $IMAGE_DATA} ${PHASE:+-P $PHASE} ${SCRIPT:+-s $SCRIPT} ${RESOLV_CONF:+-R $RESOLV_CONF} ${DEBUG:+-D} ${SET_BOOTLIST:+-B} ${VERBOSE:+-V} ${REBOOT:+-r} ${BUNDLE:+-b $BUNDLE} ${IMAGE_LOC:+-l $IMAGE_LOC} ${FILESETS:+-w "${FILESETS}"} ${FIXES:+-F "${FIXES}"} ${FIX_BUNDLE:+-f $FIX_BUNDLE} ${EXCLUDE_LIST:+-e $EXCLUDE_LIST} -d "${TARGET_DISK}" } altinst nimadm_optsPerform NIM Alternate Disk Migrationalt_disk_install.cat/usr/sbin/nimadm -Hnimadm_clean_optsClean up NIM Alternate Disk Migrationalt_disk_install.cat/usr/sbin/nimadm -HCnimadm_sync_optsSynchronize Alternate Disk Migration Softwarealt_disk_install.cat/usr/sbin/nimadm -HMsm_aixpert.catx() { /usr/sbin/aixpert -l high }; x sm_aixpert.catx() { /usr/sbin/aixpert -l medium }; xsm_aixpert.catx() { /usr/sbin/aixpert -l low }; xsm_aixpert.catx() { /usr/sbin/aixpert -l default }; xsm_aixpert.catx() { /usr/sbin/aixpert -u }; xsm_aixpert.catx() { /usr/sbin/aixpert -c if test `wc -l /etc/security/aixpert/check_report.txt|awk '{print $1}'` -gt 3 then lastl=`tail -1 /etc/security/aixpert/check_report.txt` if [ ! -z $lastl ]; then echo --------------------------------------------------------------- echo Please check /etc/security/aixpert/check_report.txt for details echo --------------------------------------------------------------- fi fi }; xsm_aixpert.catx() { /usr/sbin/aixpert -l sox-cobit }; xsm_aixpert.catx() { /usr/sbin/aixpert -c -l sox-cobit if test `wc -l /etc/security/aixpert/check_report.txt|awk '{print $1}'` -gt 3 then lastl=`tail -1 /etc/security/aixpert/check_report.txt` if [ ! -z $lastl ]; then echo --------------------------------------------------------------- echo Please check /etc/security/aixpert/check_report.txt for details echo --------------------------------------------------------------- fi fi }; xcreate_fileCreate Data Fileprojctl.cat/usr/bin/acctctl faddrelease_fileRelease Data Fileprojctl.cat/usr/bin/acctctl frmreuse_fileRe-use Accounting Data Fileprojctl.cat/usr/bin/acctctl fresetList All Registered Filesprojctl.cat/usr/bin/acctctl fquerylist_fileList Accounting File Detailsprojctl.cat/usr/bin/acctctl fqueryswitch_fileSwitch Active Data Fileprojctl.cat/usr/bin/acctctl fswitchserverLDAP Server Setupprojctl.catx() { /usr/sbin/mkprojldap -s -h $1 -D $2 -w $3 -i -p $4 -a $5 } xclientLDAP Client Setupprojctl.catx() { if [ "$3" = daily ] || [ "$3" = hourly ] then cron=$3 else cron=off fi if [ $# -eq 5 ] then /usr/sbin/mkprojldap -c -D $1 -w $2 -p $4 -a $5 -r $cron else if [ $# -eq 4 ] then /usr/bin/echo $4 | /usr/bin/grep ou=projects > /dev/null if [ $? -eq 0 ] then /usr/sbin/mkprojldap -c -D $1 -w $2 -p $4 -r $cron else /usr/sbin/mkprojldap -c -D $1 -w $2 -a $4 -r $cron fi else /usr/sbin/mkprojldap -c -D $1 -w $2 -r $cron fi fi if [ $? -ne 0 ] then exit 1 fi } xemail_notifyConfigure Admin Notificationprojctl.catx() { if [ $1 = Off ] then /usr/bin/acctctl email off else if [ $# -eq 2 ] then /usr/bin/acctctl email $2 else /usr/bin/acctctl email on fi fi } xenable_cap_optEnable ACCT Capabilitiesprojctl.cat/usr/bin/chuser capabilities=CAP_AACCT,CAP_PROPAGATE disable_cap_optDisable ACCT Capabilitiesprojctl.cat/usr/bin/chuser capabilities= proc_int_optChange/Show Process Intervalprojctl.catx() { if [ $1 = On ] then /usr/bin/acctctl iprocess $2 else /usr/bin/acctctl iprocess off fi } x/usr/sbin/aacct_statsys_interval_optShow/Change System Intervalprojctl.catx() { if [ $1 = On ] then /usr/bin/acctctl isystem $2 else /usr/bin/acctctl isystem off fi } x/usr/sbin/aacct_statsys_paggr_optShow/Change Process Aggregationprojctl.catx() { if [ $1 = On ] then /usr/bin/acctctl agproc on else /usr/bin/acctctl agproc off fi } x/usr/sbin/aacct_statsys_kaggr_optShow/Change Kernel Extension Aggregationprojctl.catx() { if [ $1 = On ] then /usr/bin/acctctl agke on else /usr/bin/acctctl agke off fi } x/usr/sbin/aacct_statsys_aaggr_optShow/Change ARM Transaction Aggregationprojctl.catx() { if [ $1 = On ] then /usr/bin/acctctl agarm on else /usr/bin/acctctl agarm off fi } x/usr/sbin/aacct_statdump_dataWrite Process Accounting Dataprojctl.cat/usr/bin/acctctl dump start_accountingStart Advanced Accountingprojctl.catx() { val=`echo $1 | cut -d' ' -f1` if [ $val = NOW ] then /etc/rc.startaacct elif [ $val = Both ] then /usr/sbin/mkitab "aacct:2:once:/etc/rc.startaacct" /etc/rc.startaacct else /usr/sbin/mkitab "aacct:2:once:/etc/rc.startaacct" fi } xstop_accountingStop AACCTprojctl.catx() { val=`echo $1 | cut -d' ' -f1` if [ $val = NOW ] then /usr/bin/acctctl off elif [ $val = Both ] then grep '^aacct:' /etc/inittab > /dev/null 2>&1 if [ $? -eq 0 ] then /usr/sbin/rmitab aacct fi /usr/bin/acctctl off else grep '^aacct:' /etc/inittab > /dev/null 2>&1 if [ $? -eq 0 ] then /usr/sbin/rmitab aacct fi fi } xQuery Advanced Accountingprojctl.cat/usr/bin/acctctlmanage_turboacct_optShow/Change Turbo Mode Accountingprojctl.catx() { if [ $1 = True ] then /usr/bin/acctctl turacct on else /usr/bin/acctctl turacct off fi } xgen_proc_optGeneral Accounting Reportsacctrpt.catx() { opt='-P ALL' if [[ $1 = 'By Project' ]] then opt='-P ALL' elif [[ $1 = 'By Group' ]] then opt='-G ALL' elif [[ $1 = 'By User' ]] then opt='-U ALL' elif [[ $1 = 'By Command' ]] then opt='-C ALL' fi if [[ $4 != '' ]] then MM=`echo $4 | cut -c 1-2` dd=`echo $4 | cut -c 3-4` hh=`echo $4 | cut -c 5-6` mm=`echo $4 | cut -c 7-8` yy=`echo $4 | cut -c 9-10` error=0 if [[ $MM = '' || $MM < 0 || $MM > 11 ]] then error=1 elif [[ $dd = '' || $dd < 01 || $dd > 31 ]] then error=1 elif [[ $hh = '' || $hh < 0 || $hh > 23 ]] then error=1 elif [[ $mm = '' || $mm < 0 || $mm > 59 ]] then error=1 elif [[ $yy = '' || $yy < 0 || $yy > 99 ]] then error=1 fi if [ $error -eq 1 ] then dspmsg -s 1 acctrpt.cat 1 "acctrpt: Invalid Begin time; The date format should be MMddhhmmyy. " exit 1 fi fi if [[ $6 != '' ]] then MM=`echo $6 | cut -c 1-2` dd=`echo $6 | cut -c 3-4` hh=`echo $6 | cut -c 5-6` mm=`echo $6 | cut -c 7-8` yy=`echo $6 | cut -c 9-10` error=0 if [[ $MM = '' || $MM < 00 || $MM > 11 ]] then error=1 elif [[ $dd = '' || $dd < 01 || $dd > 31 ]] then error=1 elif [[ $hh = '' || $hh < 00 || $hh > 23 ]] then error=1 elif [[ $mm = '' || $mm < 00 || $mm > 59 ]] then error=1 elif [[ $yy = '' || $yy < 00 || $yy > 99 ]] then error=1 fi if [ $error -eq 1 ] then dspmsg -s 1 acctrpt.cat 2 "acctrpt: Invalid End time; The date format should be MMddhhmmyy. " exit 1 fi fi if [[ $4 != '' && $6 != '' ]] then /usr/bin/acctrpt -F $opt -f $2 -b $4 -e $6 elif [[ $4 != '' ]] then /usr/bin/acctrpt -F $opt -f $2 -b $4 elif [[ $6 != '' ]] then /usr/bin/acctrpt -F $opt -f $2 -e $6 else /usr/bin/acctrpt -F $opt -f $2 fi } xfil_proc_optFiltered Accounting Reportsacctrpt.catx() { if [[ $1 = 'By Projects' ]] then popt='-P ALL' elif [[ $1 = 'Not By Projects' ]] then popt='' elif [[ $1 = 'For specific Project' ]] then popt=`echo -P $3` fi if [[ $4 = 'By Group' ]] then gopt='-G ALL' elif [[ $4 = 'Not By Group' ]] then gopt='' elif [[ $4 = 'For specific Group' ]] then gopt=`echo -G $6` fi if [[ $7 = 'By User' ]] then uopt='-U ALL' elif [[ $7 = 'Not By User' ]] then uopt='' elif [[ $7 = 'For specific User' ]] then uopt=`echo -U $9` fi if [[ ${10} = 'By Commands' ]] then copt='-C ALL' elif [[ ${10} = 'Not By Commands' ]] then copt='' elif [[ ${10} = 'For specific Commands' ]] then copt=`echo -C ${12}` fi begin=`echo ${15}` end=`echo ${17}` if [[ $begin != '' ]] then MM=`echo $begin | cut -c 1-2` dd=`echo $begin | cut -c 3-4` hh=`echo $begin | cut -c 5-6` mm=`echo $begin | cut -c 7-8` yy=`echo $begin | cut -c 9-10` error=0 if [[ $MM = '' || $MM < 0 || $MM > 11 ]] then error=1 elif [[ $dd = '' || $dd < 01 || $dd > 31 ]] then error=1 elif [[ $hh = '' || $hh < 0 || $hh > 23 ]] then error=1 elif [[ $mm = '' || $mm < 0 || $mm > 59 ]] then error=1 elif [[ $yy = '' || $yy < 0 || $yy > 99 ]] then error=1 fi if [ $error -eq 1 ] then dspmsg -s 1 acctrpt.cat 1 "acctrpt: Invalid Begin time; The date format should be MMddhhmmyy. " exit 1 fi fi if [[ $end != '' ]] then MM=`echo $end | cut -c 1-2` dd=`echo $end | cut -c 3-4` hh=`echo $end | cut -c 5-6` mm=`echo $end | cut -c 7-8` yy=`echo $end | cut -c 9-10` error=0 if [[ $MM = '' || $MM < 00 || $MM > 11 ]] then error=1 elif [[ $dd = '' || $dd < 01 || $dd > 31 ]] then error=1 elif [[ $hh = '' || $hh < 00 || $hh > 23 ]] then error=1 elif [[ $mm = '' || $mm < 00 || $mm > 59 ]] then error=1 elif [[ $yy = '' || $yy < 00 || $yy > 99 ]] then error=1 fi if [ $error -eq 1 ] then dspmsg -s 1 acctrpt.cat 2 "acctrpt: Invalid End time; The date format should be MMddhhmmyy. " exit 1 fi fi if [[ $begin != '' && $end != '' ]] then /usr/bin/acctrpt -F $popt $copt $uopt $gopt -f ${13} -b $begin -e $nd elif [[ $begin != '' ]] then /usr/bin/acctrpt -F $popt $copt $uopt $gopt -f ${13} -b $begin elif [[ $end != '' ]] then /usr/bin/acctrpt -F $popt $copt $uopt $gopt -f ${13} -e $end else /usr/bin/acctrpt -F $popt $copt $uopt $gopt -f ${13} fi } xreport_lpar_optLPAR Accountingacctrpt.catx() { opt='-L ALL' if [[ $1 = 'CPU & Memory' ]] then opt='-L CPUMEM' elif [[ $1 = 'File Systems' ]] then opt='-L FILESYS' elif [[ $1 = 'Network Interfaces' ]] then opt='-L NETIF' elif [[ $1 = 'Disks' ]] then opt='-L DISK' elif [[ $1 = 'VSCSI Targets' ]] then opt='-L VTARGET' elif [[ $1 = 'VSCSI Clients' ]] then opt='-L VCLIENT' fi if [[ $4 != '' ]] then MM=`echo $4 | cut -c 1-2` dd=`echo $4 | cut -c 3-4` hh=`echo $4 | cut -c 5-6` mm=`echo $4 | cut -c 7-8` yy=`echo $4 | cut -c 9-10` error=0 if [[ $MM = '' || $MM < 0 || $MM > 11 ]] then error=1 elif [[ $dd = '' || $dd < 01 || $dd > 31 ]] then error=1 elif [[ $hh = '' || $hh < 0 || $hh > 23 ]] then error=1 elif [[ $mm = '' || $mm < 0 || $mm > 59 ]] then error=1 elif [[ $yy = '' || $yy < 0 || $yy > 99 ]] then error=1 fi if [ $error -eq 1 ] then dspmsg -s 1 acctrpt.cat 1 "acctrpt: Invalid Begin time; The date format should be MMddhhmmyy. " exit 1 fi fi if [[ $6 != '' ]] then MM=`echo $6 | cut -c 1-2` dd=`echo $6 | cut -c 3-4` hh=`echo $6 | cut -c 5-6` mm=`echo $6 | cut -c 7-8` yy=`echo $6 | cut -c 9-10` error=0 if [[ $MM = '' || $MM < 00 || $MM > 11 ]] then error=1 elif [[ $dd = '' || $dd < 01 || $dd > 31 ]] then error=1 elif [[ $hh = '' || $hh < 00 || $hh > 23 ]] then error=1 elif [[ $mm = '' || $mm < 00 || $mm > 59 ]] then error=1 elif [[ $yy = '' || $yy < 00 || $yy > 99 ]] then error=1 fi if [ $error -eq 1 ] then dspmsg -s 1 acctrpt.cat 2 "acctrpt: Invalid End time; The date format should be MMddhhmmyy. " exit 1 fi fi if [[ $4 != '' && $6 != '' ]] then /usr/bin/acctrpt -F $opt -f $2 -b $4 -e $6 elif [[ $4 != '' ]] then /usr/bin/acctrpt -F $opt -f $2 -b $4 elif [[ $6 != '' ]] then /usr/bin/acctrpt -F $opt -f $2 -e $6 else /usr/bin/acctrpt -F $opt -f $2 fi } xreport_trans_optTransaction Accountingacctrpt.catx() { if [[ $3 != '' ]] then MM=`echo $3 | cut -c 1-2` dd=`echo $3 | cut -c 3-4` hh=`echo $3 | cut -c 5-6` mm=`echo $3 | cut -c 7-8` yy=`echo $3 | cut -c 9-10` error=0 if [[ $MM = '' || $MM < 0 || $MM > 11 ]] then error=1 elif [[ $dd = '' || $dd < 01 || $dd > 31 ]] then error=1 elif [[ $hh = '' || $hh < 0 || $hh > 23 ]] then error=1 elif [[ $mm = '' || $mm < 0 || $mm > 59 ]] then error=1 elif [[ $yy = '' || $yy < 0 || $yy > 99 ]] then error=1 fi if [ $error -eq 1 ] then dspmsg -s 1 acctrpt.cat 1 "acctrpt: Invalid Begin time; The date format should be MMddhhmmyy. " exit 1 fi fi if [[ $5 != '' ]] then MM=`echo $5 | cut -c 1-2` dd=`echo $5 | cut -c 3-4` hh=`echo $5 | cut -c 5-6` mm=`echo $5 | cut -c 7-8` yy=`echo $5 | cut -c 9-10` error=0 if [[ $MM = '' || $MM < 00 || $MM > 11 ]] then error=1 elif [[ $dd = '' || $dd < 01 || $dd > 31 ]] then error=1 elif [[ $hh = '' || $hh < 00 || $hh > 23 ]] then error=1 elif [[ $mm = '' || $mm < 00 || $mm > 59 ]] then error=1 elif [[ $yy = '' || $yy < 00 || $yy > 99 ]] then error=1 fi if [ $error -eq 1 ] then dspmsg -s 1 acctrpt.cat 2 "acctrpt: Invalid End time; The date format should be MMddhhmmyy. " exit 1 fi fi if [[ $3 != '' && $5 != '' ]] then /usr/bin/acctrpt -F $opt -f $1 -b $3 -e $5 -T elif [[ $3 != '' ]] then /usr/bin/acctrpt -F $opt -f $1 -b $3 -T elif [[ $5 != '' ]] then /usr/bin/acctrpt -F $opt -f $1 -e $5 -T else /usr/bin/acctrpt -F $opt -f $1 -T fi } xList of Defined Transactionsprojctl.cat/usr/bin/acctctl trqueryhandle_kern_trans_optEnable/Disable Transactionsprojctl.catchg_state() { echo $1 | grep "-" > /dev/null 2>&1 if [ $? -eq 0 ] then fent=`echo $1 | cut -f1 -d'-'` lent=`echo $1 | cut -f2 -d'-'` while [ $fent -le $lent ] do if [ $2 = enabled ] then /usr/bin/acctctl tron $fent else /usr/bin/acctctl troff $fent fi fent=`expr $fent + 1` done else val=`echo $1 | tr ',' ' '` for i in $val do if [ $2 = enabled ] then /usr/bin/acctctl tron $i else /usr/bin/acctctl troff $i fi done fi } chg_state/usr/sbin/aacct_stat_rawnameldap_upload_proj_opUpload Project Definitions to LDAP Serverprojctl.catx() { if [ $2 ] then /usr/bin/projctl ldprojs -p $2 -d $1 else /usr/bin/projctl ldprojs -p -d $1 fi } xldap_download_proj_opDownload Project Definitions from LDAP Serverprojctl.catx() { if [ $2 ] then /usr/bin/projctl ldprojs -g $2 -d $1 else /usr/bin/projctl ldprojs -g -d $1 fi } xadd_projsAdd Project Definitionprojctl.catx() { if [ $3 = On ] then dspmsg -s 20 projctl.cat 34 "While adding project definitions, aggregation should be Disabled, by default. " exit 1 else if [ $# -eq 5 ] then comment="$4" repos=$5 else comment= repos=$4 fi if [ $repos = ldap ] then /usr/bin/projctl add $1 $2 "$comment" -p else /usr/bin/projctl add $1 $2 "$comment" fi fi } xchange_optChange/Show Project Definitionsprojctl.catx() { if [ $# -eq 5 ] then comment="$3" repos=$4 new_ent=$5:$1:$2::$3 projname=$5 else comment= repos=$3 new_ent=$4:$1:$2:: projname=$4 fi if [ $repos = ldap ] then projctl rm $projname -p if [ $? -eq 0 ] then projctl add $projname $1 "$comment" -p if [ $? -ne 0 ] then exit 1 fi else exit 1 fi if [ $2 = y ] then /usr/bin/projctl chattr agg $projname -s -p else /usr/bin/projctl chattr agg $projname -u -p fi else no_of_entries=`wc -l /etc/project/projdef | tr -s ' ' | /usr/bin/cut -f2 -d' '` cnt=1 while [ $cnt -le $no_of_entries ] do ent=`cat /etc/project/projdef | head -$cnt | tail -1` echo $ent | /usr/bin/grep "^$projname" > /dev/null if [ $? -ne 0 ] then echo $ent >> /tmp/projfile else echo $new_ent >> /tmp/projfile fi cnt=`expr $cnt + 1` done cp /tmp/projfile /etc/project/projdef rm -f /tmp/projfile if [ $2 = y ] then /usr/bin/projctl chattr agg $projname -s else /usr/bin/projctl chattr agg $projname -u fi fi } x/usr/sbin/projdata_rawnamerm_proj_listRemove Project Definitionsprojctl.catremove_pj() { arg=`echo $1 | tr ',' ' '` if [ $2 = ldap ] then for i in $arg do /usr/bin/projctl rm $i -p done else for i in $arg do /usr/bin/projctl rm $i done fi } remove_pjld_proj_opt1Load/Re-load Project Definitionsprojctl.catx() { if [ $2 = ldap ] then if [ $1 = yes ] then /usr/bin/projctl ldprojs -g -a else /usr/bin/projctl ldprojs -g -r fi else if [ $1 = yes ] then /usr/bin/projctl ldprojs -a else /usr/bin/projctl ldprojs -r fi fi } xunld_proj_opt1Unload Active Project Definitionsprojctl.catx() { if [ $2 = ldap ] then if [ $1 = yes ] then /usr/bin/projctl unldprojs -g -a else /usr/bin/projctl unldprojs -g fi else if [ $1 = yes ] then /usr/bin/projctl unldprojs -a else /usr/bin/projctl unldprojs fi fi } xList All Active Project Definitionsprojctl.cat/usr/bin/projctl qprojsldap_upload_admin_opUpload Admin Policy to LDAP serverprojctl.catx() { if [ "$3" = "default admin DN" ] then if [ $2 = default ] then /usr/bin/projctl ldadm -p -d $1 else /usr/bin/projctl ldadm -p $2 -d $1 fi else if [ $2 = default ] then /usr/bin/projctl ldadm -p $3 -d $1 else /usr/bin/projctl ldadm -p $2:$3 -d $1 fi fi } xldap_download_admin_opDownload Admin Policy from LDAP serverprojctl.catx() { if [ "$3" = "default admin DN" ] then if [ $2 = default ] then /usr/bin/projctl ldadm -g -d $1 else /usr/bin/projctl ldadm -g $2 -d $1 fi else if [ $2 = default ] then /usr/bin/projctl ldadm -g $3 -d $1 else /usr/bin/projctl ldadm -g $2:$3 -d $1 fi fi } xcr_adm_optCreate Admin Policyprojctl.catx() { /usr/bin/echo $1 | /usr/bin/grep / > /dev/null 2>&1 if [ $? -eq 0 ] then dspmsg -s 20 projctl.cat 44 "1400-251 The focus name cannot be a path. Please enter a valid string, without '/' character. " else if ! [ -d /etc/project/alter/$1 ] then mkdir /etc/project/alter/$1 fi path="/etc/project/alter/$1" touch $path/.projdef $path/admin $path/alias if [ $2 = yes ] then ln -fs $path /etc/project/alter/.current fi fi } xfocus_optShow/Change Current Focusprojctl.catx(){ ln -fs $1 /etc/project/alter/.current } x/usr/sbin/projdata focusrm_adm_optRemove Admin Policyprojctl.catx() { if [ $1 = /etc/project/ldap ] then projctl unldadm -p fi /usr/bin/rm -fr $1 ln -fs /etc/project /etc/project/alter/.current } xadd_adm_optAdd Rulesprojctl.catx() { if [ $1 = - ] then dspmsg -s 28 projctl.cat 8 "Order should be a valid number. " exit 1 fi cnt=0 path=`ls -l /etc/project/alter/.current | cut -d'>' -f2 | cut -d' ' -f2` while read line do echo $line | grep '^:' > /dev/null 2>&1 if [ $? -ne 0 ] then cnt=`expr $cnt + 1` fi done < $path/admin if [ $1 -gt $cnt ] then echo $2:$3:$4:$5:: >> $path/admin else if [ -f /tmp/tmpadmin ] then rm -f /tmp/tmpadmin fi new_rule=$2:$3:$4:$5:: rule=0 while read line do echo $line | grep '^:' > /dev/null 2>&1 if [ $? -eq 0 ] then echo $line >> /tmp/tmpadmin else rule=`expr $rule + 1` if [ $rule -eq $1 ] then echo $new_rule >> /tmp/tmpadmin fi echo $line >> /tmp/tmpadmin fi done < /$path/admin cp /tmp/tmpadmin /etc/project/admin rm /tmp/tmpadmin fi } xchg_admin_rule_next_optShow/Change Ruleprojctl.catchg_rule() { path=`ls -l /etc/project/alter/.current | cut -d'>' -f2 | cut -d' ' -f2` no_of_lines=`wc -l $path/admin | tr -s ' ' | cut -d' ' -f2` cnt=1 if [ -f /tmp/tmpfile ] then rm -f /tmp/tmpfile fi while [ $cnt -le $no_of_lines ] do if [ $cnt -eq $1 ] then cnt=`expr $cnt + 1` continue fi val=`cat $path/admin | head -$cnt | tail -1` echo $val >> /tmp/tmpfile cnt=`expr $cnt + 1` done cp /tmp/tmpfile $path/admin rm -f /tmp/tmpfile rule=$3:$4:$5:$6:: no_of_lines=`wc -l $path/admin | tr -s ' ' | cut -d' ' -f2` if [ $2 -gt $no_of_lines ] then echo $rule >> $path/admin else cnt=1 if [ -f /tmp/tmpadmin ] then rm -f /tmp/tmpadmin fi while [ $cnt -le $no_of_lines ] do if [ $cnt -eq $1 ] then echo $rule >> /tmp/tmpadmin fi val=`cat $path/admin | head -$cnt | tail -1` echo $val >> /tmp/tmpadmin cnt=`expr $cnt + 1` done cp /tmp/tmpadmin $path/admin rm -f /tmp/tmpadmin fi } chg_rule/usr/sbin/admindata_rawnameremove_admin_rule_optRemove Rulesprojctl.catremove() { path=`ls -l /etc/project/alter/.current | cut -d'>' -f2 | cut -d' ' -f2` no_of_lines=`wc -l $path/admin | tr -s ' ' | cut -d' ' -f2` cnt=1 found=0 if [ -f /tmp/tmpfile ] then rm -f /tmp/tmpfile fi while [ $cnt -le $no_of_lines ] do orig_val=`cat $path/admin | head -$cnt | tail -1` val=`echo $orig_val | tr -s ' ' | sed s/' '//g` noblan=`echo $1 | tr -s ' ' | sed s/' '//g` for i in `echo $noblan | sed s/'::,'/':: '/g` do if [ "$val" = "$i" ] then found=1 break fi done if [ $found -eq 0 ] then echo $orig_val >> /tmp/tmpfile fi cnt=`expr $cnt + 1` found=0 done cp /tmp/tmpfile $path/admin } removeload_admin_optLoad/Re-load Admin Policyprojctl.catload_adm() { val=`echo $2 | cut -d' ' -f1` if [ -f $1/.projdef ] then /usr/bin/projctl merge $1 if [ $? -eq 0 ] then /usr/bin/projctl ldprojs -r fi fi if [ $val = yes ] then /usr/bin/projctl ldadm -d $1 -ar else /usr/bin/projctl ldadm -d $1 -r fi } load_admunload_admin_optUnLoad Admin Policyprojctl.catunload_adm() { val=`echo $1 | cut -d' ' -f1` if [ $2 = /etc/project/ldap/ ] then if [ $val = yes ] then /usr/bin/projctl unldadm -g -a else /usr/bin/projctl unldadm -g fi else if [ $val = yes ] then /usr/bin/projctl unldadm -a else /usr/bin/projctl unldadm fi fi } unload_admadd_usr_alias_optAdd New Aliasprojctl.catx() { path=`ls -l /etc/project/alter/.current | cut -d'>' -f2 | cut -d' ' -f2` grep ^$1 $path/alias > /dev/null 2>&1 if [ $? -eq 0 ] then dspmsg -s 28 projctl.cat 7 "Alias %s already existing " $1 else echo $1:$2:: >> $path/alias fi } xadd_grp_alias_optAdd New Aliasprojctl.catx() { path=`ls -l /etc/project/alter/.current | cut -d'>' -f2 | cut -d' ' -f2` grep ^$1 $path/alias > /dev/null 2>&1 if [ $? -eq 0 ] then dspmsg -s 28 projctl.cat 7 "Alias %s already existing " $1 else echo $1:$2:: >> $path/alias fi } xchg_usr_alias_next_optShow/Change Aliasprojctl.catchg_als() { path=`ls -l /etc/project/alter/.current | cut -d'>' -f2 | cut -d' ' -f2` if [ -f /tmp/tmpfile ] then rm -f /tmp/tmpfile fi grep -v ^$1: $path/alias >> /tmp/tmpfile cp /tmp/tmpfile $path/alias rm -f /tmp/tmpfile new_ent=$1:$2:: echo $new_ent >> $path/alias } chg_als/usr/sbin/admindata alias_rawnamechg_grp_alias_next_optShow/Change Aliasprojctl.catchg_als() { path=`ls -l /etc/project/alter/.current | cut -d'>' -f2 | cut -d' ' -f2` if [ -f /tmp/tmpfile ] then rm -f /tmp/tmpfile fi grep -v ^$1: $path/alias >> /tmp/tmpfile cp /tmp/tmpfile $path/alias rm -f /tmp/tmpfile new_ent=$1:$2:: echo $new_ent >> $path/alias } chg_als/usr/sbin/admindata alias_rawnamerm_alias_optRemove Aliasprojctl.catrm_alias() { path=`ls -l /etc/project/alter/.current | cut -d'>' -f2 | cut -d' ' -f2` if [ -f /tmp/tmpfile ] then rm -f /tmp/tmpfile fi grep -v ^$1: $path/alias >> /tmp/tmpfile cp /tmp/tmpfile $path/alias rm -f /tmp/tmpfile } rm_aliasshow_chg_adm_proj_next_optShow/Change Project Definitionsprojctl.catchg_rule() { if [ $# -eq 4 ] then new_ent=$1:$2:$3::$4 else new_ent=$1:$2:$3:: fi path=`ls -l /etc/project/alter/.current | cut -d'>' -f2 | cut -d' ' -f2` if [ "$path" = "/etc/project" ] then projpath=$path/projdef else projpath=$path/.projdef fi if [ $2 -eq 0 ] then cat $path/admin | cut -d':' -f4 > /tmp/admprojs sed s/','/' '/g /tmp/admprojs > /tmp/admprojs1 mv /tmp/admprojs1 /tmp/admprojs grep -w $1 /tmp/admprojs > /dev/null 2>&1 if [ $? -ne 0 ] then grep -v $1: $projpath > /tmp/tmp_projdef mv /tmp/tmp_projdef $projpath else echo Project still under reference. Cannot be removed. fi else no_of_entries=`wc -l $projpath | tr -s ' ' | cut -f2 -d' '` cnt=1 while [ $cnt -le $no_of_entries ] do ent=`cat $projpath | head -$cnt | tail -1` echo $ent | grep $1: > /dev/null if [ $? -ne 0 ] then echo $ent >> /tmp/projfile else echo $new_ent >> /tmp/projfile fi cnt=`expr $cnt + 1` done cp /tmp/projfile $projpath rm -f /tmp/projfile fi } chg_rule/usr/sbin/projdata alt_rawnamerm_adm_proj_listRemove Project Definitionsprojctl.catremove_pd() { path=`ls -l /etc/project/alter/.current | cut -d'>' -f2 | cut -d' ' -f2` if [ "$path" = "/etc/project" ] then projpath=$path/projdef else projpath=$path/.projdef fi no_of_lines=`wc -l $projpath | tr -s ' ' | cut -d' ' -f2` cnt=1 found=0 if [ -f /tmp/tmpfile ] then rm -f /tmp/tmpfile fi while [ $cnt -le $no_of_lines ] do orig_val=`cat $projpath | head -$cnt | tail -1` val=`echo $orig_val | tr -s ' ' | sed s/' '//g` noblan=`echo $1 | tr -s ' ' | sed s/' '//g` for i in `echo $noblan | sed s/'::,'/':: '/g` do if [ "$val" = "$i" ] then found=1 break fi done if [ $found -eq 0 ] then echo $orig_val >> /tmp/tmpfile fi cnt=`expr $cnt + 1` found=0 done cp /tmp/tmpfile $projpath } remove_pdMerge Project Definitionsprojctl.catx() { path=`ls -l /etc/project/alter/.current | cut -d'>' -f2 | cut -d' ' -f2` /usr/bin/projctl merge $path } xcr_usr_next_optCreate Project list for a userprojctl.cat/usr/bin/chuser /usr/sbin/projdata useradd_rawnamechg_usr_next_optShow/Change Project list for a userprojctl.cat/usr/bin/chuser /usr/sbin/projdata userchange_rawnamerm_proj_usrRemove Project list for a userprojctl.cat/usr/bin/chuser projects=Show Project list for all usersprojctl.cat/usr/sbin/lsuser -a projects ALLld_usr_optLoad/Re-load User Policiesprojctl.catld_usr() { if [ $1 = yes ] then /usr/bin/projctl ldusr -a -r else /usr/bin/projctl ldusr -r fi } ld_usrunld_usr_optUnload User Policiesprojctl.catunld_usr() { if [ $1 = yes ] then /usr/bin/projctl unldusr -a else /usr/bin/projctl unldusr fi } unld_usrcr_grp_next_optCreate Project list for a groupprojctl.cat/usr/bin/chgroup /usr/sbin/projdata grpadd_rawnamechg_grp_next_optShow/Change Project list for a groupprojctl.cat/usr/bin/chgroup /usr/sbin/projdata grpchange_rawnamerm_proj_grpRemove Project list for a groupprojctl.cat/usr/bin/chgroup projects=Show Project list for all Groupsprojctl.cat/usr/sbin/lsgroup -a projects ALLld_grp_optLoad/Re-load Group Policiesprojctl.catld_grp() { if [ $1 = yes ] then /usr/bin/projctl ldgrp -a -r else /usr/bin/projctl ldgrp -r fi } ld_grpunld_grp_optUnload Group Policiesprojctl.catunld_grp() { if [ $1 = yes ] then /usr/bin/projctl unldgrp -a else /usr/bin/projctl unldgrp fi } unld_grpLoaded Policiesprojctl.cat/usr/bin/projctl qpolicyAuto-load Configurationprojctl.catget_conf() { admstat=0 projstat=0 entry=`tail -1 /etc/project/.config` admpath=`echo $entry | cut -d':' -f1` usrstat=`echo $entry | cut -d':' -f2` grpstat=`echo $entry | cut -d':' -f3` projpath=`echo $entry | cut -d':' -f4` if [ $admpath = - ] then admstat=0 else admstat=1 fi if [ $projpath = - ] then projstat=0 else projstat=1 fi if [ $projstat = 1 ] then dspmsg -s 28 projctl.cat 2 "Project Definitions [ %s ] " $projpath fi if [ $admstat = 1 ] then dspmsg -s 28 projctl.cat 3 "Admin [ %s ] " $admpath fi if [ $usrstat = 1 ] then dspmsg -s 28 projctl.cat 4 "User " fi if [ $grpstat = 1 ] then dspmsg -s 28 projctl.cat 5 "Group " fi } get_confShow Project assignment for all Processesprojctl.catx() { ps -eP | tr -s ' ' | cut -d' ' -f4,7,8 | sed s/" "/" "/g } xchg_proj_proc_optChange Project assignment for a processprojctl.catx() { if [ $# -eq 3 ] then if [ $3 = yes ] then /usr/bin/projctl chg $1 -p $2 -f elif [ $3 = no ] then /usr/bin/projctl chg $1 -p $2 fi else if [ $2 = yes ] then /usr/bin/projctl chg $1 -f else /usr/bin/projctl chg $1 fi fi } xshow_proj_pgm_optShow Project Assignments for a programprojctl.catprojctl qappstart_proj_prg_optStart program with a Project Assignmentprojctl.catx() { if [ $3 = yes ] then /usr/bin/projctl exec $1 $2 -f else /usr/bin/projctl exec $1 $2 fi } xsarcomm,sarOptsReport System Activitysmit.cat/usr/sbin/sarsarproc,sarcommReport System Activity per Processorsmit.cat/usr/sbin/sarvmstat_o,vmstat_wpar_oShow Virtual Memory Statisticssmit.cat/usr/bin/vmstatvmstat_oShow Virtual Memory Statisticssmit.cat/usr/bin/vmstatiostat_o,iostat_common_oShow Input/Output Statisticssmit.cat/usr/bin/iostatiostat_common_oShow Input/Output Statisticssmit.cat/usr/bin/iostattimex_oShow System Activity While Running a Commandsmit.cat/usr/bin/timex -sartexlistprofOptsList Profilesartex.cat/usr/sbin/artexlist artexshowprofOptsShow profile contentsartex.catx() { artexget -f txt $@ } xartexdiffprofOptsCompare profilesartex.catx() { artexdiff -s -f txt $@ if [[ $? -eq 0 || $? -eq 1 ]] then exit 0 else exit $? fi } xartexdiffsystOptsCompare profile with system configurationartex.catx() { artexdiff -s -f txt $@ if [[ $? -eq 0 || $? -eq 1 ]] then exit 0 else exit $? fi } xartexmergeprofOptsMerge profilesartex.catx() { if [[ -z "$ARTEX_PROFILE_PATH" ]]; then artexdir=/etc/security/artex/samples/ else artexdir=${ARTEX_PROFILE_PATH}/ fi version=0 comment= while getopts ctfvV:m:i:o: Option "$@" do case $Option in c) check=-c;; t) check=-t;; f) force=-f;; v) verbose=-v;; V) version=$OPTARG;; m) comment="$OPTARG";; i) input="$OPTARG";; o) output=$OPTARG targetInitChar=`echo $output | cut -c1` if [ "$targetInitChar" = "/" ]; then artexdir= fi;; esac done if [[ -n $comment ]]; then artexmerge $check $force $verbose -V $version -m "$comment" $input > "$artexdir$output" else artexmerge $check $force $verbose -V $version $input > "$artexdir$output" fi } xartexsystprofOptsCreate profile from system configurationartex.catx() { if [[ -z "$ARTEX_PROFILE_PATH" ]]; then artexdir=/etc/security/artex/samples/ else artexdir=${ARTEX_PROFILE_PATH}/ fi targetInitChar=`echo $3 | cut -c1` if [ "$targetInitChar" = "/" ]; then artexdir= fi version=0 comment= value=$1 ref=$2 output=$3 shift 3 while getopts rnvV:m: Option "$@" do case $Option in v) verbose=-v;; V) version=$OPTARG;; m) shift $(($OPTIND - 2)) comment=$*;; *) ;; esac done if [[ -n $comment ]]; then artexget $value $verbose -V $version -m "$comment" $ref > $artexdir$output else artexget $value $verbose -V $version $ref > $artexdir$output fi } xartexcheckprofOptsCheck profile correctnessartex.catartexset -t artexsystOptsDisplay system configurationartex.catx() { artexget -f txt $@ } xartexapplyprofOptsApply a profileartex.catx() { eval last=$"$#" if [ $1 = "-p" ]; then artexset $1 $last else master=`echo $@| sed 's/^.*\(-b\).*$/\1/'` if [ "$master" = "-b" ]; then artexset -b $last else artexset $@ fi fi } xartexbackupOptsRevert to backup profileartex.catx() { artexset -u } xartexbackupNoneRevert to backup profileartex.catDisable master profileartex.catartexset -xacf_tunables_optChange/Show Cryptographic Framework Parameterskpkcs11.cat/usr/sbin/chdev -l pkcs11/usr/sbin/lsattr -l pkcs11 -E -Okpkcs11.catacf_debug_optChange/Show Cryptographic Framework Tracingkpkcs11.cat/usr/sbin/chdev -l pkcs11/usr/sbin/lsattr -l pkcs11 -E -Okpkcs11.catacf_p11admin_optLaunch Administration Toolkpkcs11.cat/usr/sbin/p11adminkpkcs11.catacf_p11km_optLaunch Keystore Management Toolkpkcs11.cat/usr/bin/p11kmkpkcs11.catcxpasync_chgChange/Show Characteristics of a IBM 128-Port Async, EIA-232 (PCI) Adapterdevices.catchdev lsattr -l logicname -E -OList 128-Port PCI Async Adaptersdevices.catlsdev -C -c adapter -t 4f111b00 -H;lsdev -C -c concentrator -s sync_pci -t 16c232;lsdev -C -c concentrator -s sync_pci -t 16e232;lsdev -C -c concentrator -s sync_pci -t 16e422_nfs.mknfsStart NFSsmit.cat/usr/sbin/mknfs_nfs.rmnfsStop NFSsmit.cat/usr/sbin/rmnfs_nfs.chnfsChange Number of nfsd, biod, and lockd Daemonssmit.cat/usr/sbin/chnfs_nfs.addsecurityEnable RPCSEC_GSSsmit.cat/usr/sbin/chnfs -S_nfs.remsecurityDisable RPCSEC_GSSsmit.cat/usr/sbin/chnfs -s_nfs.chrootfhChange Version 4 Server Root Nodesmit.cat/usr/sbin/chnfs/usr/sbin/nfsd-getnodes_nfs.chpubfhChange Version 4 Public Root Nodesmit.cat/usr/sbin/chnfs/usr/sbin/nfsd-getnodes_nfs.chreplicationConfigure Version 4 Replicationsmit.cat/usr/sbin/chnfsecho '#replica'; /usr/sbin/nfsd -getreplicas | cut -d= -f2_nfs.nfsservdelegConfigure Version 4 Server Delegationsmit.cat/usr/sbin/nfso_nfs.nfsclntdelegConfigure Version 4 Client Delegationsmit.cat/usr/sbin/nfso_nfs.mknfsexpAdd a Directory to Exports Listsmit.cat/usr/sbin/mknfsexp_nfs.chnfsexpChange Attributes of an Exported Directorysmit.cat/usr/sbin/chnfsexp/usr/sbin/lsnfsexp-c _rawexpname -V _rawversions_nfs.rmnfsexpRemove a Directory from Exports Listsmit.cat/usr/sbin/rmnfsexp/usr/sbin/lsnfsexp-c _rawexpname_nfs.mknfsmntAdd a File System for Mountingsmit.cat/usr/sbin/mknfsmnt_nfs.chnfsmntChange / Show Attributes of an NFS File Systemsmit.cat/usr/sbin/chnfsmntx() { cur_iomode=`(/usr/sbin/lsnfsmnt $1 | /usr/bin/grep -wq 'cior' && /usr/sbin/lsnfsmnt $1 | /usr/bin/grep -wq 'cio' && echo 'cio,cior') || (/usr/sbin/lsnfsmnt $1 | /usr/bin/grep -wq 'cio' && echo 'cio') || (/usr/sbin/lsnfsmnt $1 | /usr/bin/grep -wq 'dio' && echo 'dio')` /usr/sbin/lsnfsmnt -c $1 | while read line1 do echo $line1:iomode read line2 echo $line2:$cur_iomode done } x_rawname_nfs.rmnfsmntRemove an NFS File Systemsmit.cat/usr/sbin/rmnfsmnt_nfs.mkautomntStart Automountersmit.cat/usr/sbin/automountStop Automountersmit.catstopsrc -s automountd_nfs.mknfs4clAdd NFSv4 File System FSID Optionssmit.cat/usr/sbin/nfs4cl setsmitfsoptions_nfs.chnfs4clChange / Show NFSv4 File System FSID Optionssmit.cat/usr/sbin/nfs4cl setsmitfsoptions/usr/sbin/nfs4cl showsmitfs_rawname_nfs.resetnfs4clReset NFSv4 File System FSID Optionssmit.cat/usr/sbin/nfs4cl resetfsoptions_flushV4cacheFlush NFS V4 Translation Cachesmit.cat/usr/sbin/nfsrgydDisplay Current NFS Local Domainsmit.cat/usr/sbin/chnfsdom_chnfsdom.changeChange Current NFS Local Domainsmit.cat/usr/sbin/chnfsdomDisplay Current Local Realm Mappingsmit.cat/usr/sbin/chnfsrtd_chnfsrtd.addAdd a Local Realm Mappingsmit.cat/usr/sbin/chnfsrtd -a_chnfsrtd.removeRemove a Local Realm Mappingsmit.cat/usr/sbin/chnfsrtd -rDisplay Current Default Client Security Listsmit.cat/usr/sbin/chnfssec_chnfssec.changeChange Default Client Security Listsmit.cat/usr/sbin/chnfssec -a_chnfssec.removeRemove Security From Listsmit.cat/usr/sbin/chnfssec -rDisplay Current NFS V4 Foreign Identity Mapping Configurationsmit.cat/usr/sbin/chnfsim -c_chnfsim.conf.setupAdd Server Entrysmit.cat/usr/sbin/chnfsim -c -acmdnfs.cat_chnfsim.list.serverList Server Entrysmit.cat/usr/sbin/chnfsim -c -lcmdnfs.cat_chnfsim.rem.serverRemove Server Entrysmit.cat/usr/sbin/chnfsim -c -xcmdnfs.cat_heartBeatIntSet HeartBeatInterval for nfsrgydsmit.cat/usr/bin/chssys -s nfsrgyd -a cmdnfs.cat_chnfsim.user.idAdd a New User Mapping Identitysmit.cat/usr/sbin/chnfsim -a -u_chnfsim.user.ridRemove a User Mapping Identitysmit.cat/usr/sbin/chnfsim -x -u_chnfsim.user.mapAdd a New Foreign User Identity Mappingsmit.cat/usr/sbin/chnfsim -a -u_chnfsim.user.rmapRemove a Foreign User Identity Mappingsmit.cat/usr/sbin/chnfsim -x -u_chnfsim.user.listList Identity Mappings of a User Mapping Identitysmit.cat/usr/sbin/chnfsim -l -u_chnfsim.user.searchSearch for a User Mapping Identitysmit.cat/usr/sbin/chnfsim -s -u_chnfsim.group.idAdd a New Group Mapping Identitysmit.cat/usr/sbin/chnfsim -a -g_chnfsim.group.ridRemove a Group Mapping Identitysmit.cat/usr/sbin/chnfsim -x -g_chnfsim.group.mapAdd a New Foreign Group Identity Mappingsmit.cat/usr/sbin/chnfsim -a -g_chnfsim.group.rmapRemove a Foreign Group Identity Mappingsmit.cat/usr/sbin/chnfsim -x -g_chnfsim.group.listList Identity Mappings of a Group Mapping Identitysmit.cat/usr/sbin/chnfsim -l -g_chnfsim.group.searchSearch for a Group Mapping Identitysmit.cat/usr/sbin/chnfsim -s -g_chnfsim.rtd.newAdd a New Realm to Domain Mappingsmit.cat/usr/sbin/chnfsim -a_chnfsim.rtd.remRemove a Realm to Domain Mappingsmit.cat/usr/sbin/chnfsim -xList Realm to Domain Mappingssmit.cat/usr/sbin/chnfsim -l_nfs.chleaseChange Version 4 Server Lease Timesmit.cat/usr/sbin/chnfsx() { #Get the current Lease Time lease_time=`odmget -q subsysname=nfsd SRCsubsys |grep cmdargs| awk ' { split($0, field); for (I = 1; I < NF; I++) { if(field[I] ~ /setlease/ ) { I++; leasetime=field[I]; break; } } printf("%d",leasetime); }'` echo '#leasetime' echo "$lease_time" } x_nfs.grcperiodConfigure Version 4 Grace Periodsmit.cat/usr/sbin/chnfsx() { #Check if Grace period is disabled/enabled currently odmget -q subsysname=nfsd SRCsubsys|grep cmdargs|grep off 2>&1 > /dev/null if [[ $? == 0 ]] then cur_grace=off else cur_grace=on fi #Get the current Grace period autoextend value cur_autoextend=`odmget -q subsysname=nfsd SRCsubsys |grep cmdargs| awk ' { split($0, field); for (I = 1; I < NF; I++) { if(field[I] ~ /gpx/ ) { I++; autoextend=field[I]; break; } } printf("%d",autoextend); }'` echo '#grace:autoextend' echo "$cur_grace:$cur_autoextend" } xips4_start_optStart IP Securitysm_ipsec.catx () { if [ $# -eq 1 ]; then /usr/sbin/mkdev -c ipsec -t 4 /usr/sbin/mkdev -c ipsec -t 6 > /dev/null 2>&1 /usr/sbin/mkfilt -v 4 -u -z $1 /usr/sbin/mkfilt -v 6 -u -z $1 > /dev/null 2>&1 else /usr/sbin/mkdev -c ipsec -t 4 $1 /usr/sbin/mkdev -c ipsec -t 6 $1 > /dev/null 2>&1 /usr/sbin/mkfilt -v 4 -z $2 /usr/sbin/mkfilt -v 6 -z $2 > /dev/null 2>&1 fi } x ips4_stop_optStop IP Securitysm_ipsec.cat/usr/sbin/rmdev -l ipsec_v4 sm_ipsec.cat/usr/sbin/ikedb -gsm_ipsec.catx() { if [[ ! -f /tmp/ike_template.xml ]]; then cp /etc/ipsec/inet/ike_template.xml /tmp/ike_template.xml fi if env EDITOR; then $EDITOR /tmp/ike_template.xml else vi /tmp/ike_template.xml fi /usr/sbin/ikedb -pF /tmp/ike_template.xml # If 'ikedb -p' succeed, exit after removing tmp file; # otherwise, display the error message from ikedb command. if [[ $? -eq 0 ]]; then rm /tmp/ike_template.xml else echo Press Enter to continue read x fi }; xsm_ipsec.catx () { if [[ ! -f /tmp/change_ikeobjects.xml ]]; then /usr/sbin/ikedb -g > /tmp/change_ikeobjects.xml cp /tmp/change_ikeobjects.xml /tmp/orig_ikeobjects.xml fi if env EDITOR; then $EDITOR /tmp/change_ikeobjects.xml else vi /tmp/change_ikeobjects.xml fi diff -w /tmp/change_ikeobjects.xml /tmp/orig_ikeobjects.xml > /dev/null 2>&1 # If nothing (except white spaces) is changed by vi, # exit after removing tmp files; # otherwise, wipe the IKE DB out and try to put the new xml file. if [[ $? -ne 0 ]]; then /usr/sbin/ikedb -x > /dev/null 2>&1 /usr/sbin/ikedb -p /tmp/change_ikeobjects.xml # If 'ikedb -p' succeed, exit after removing tmp files; # otherwise, restore the original IKE DB, and display # the error message from ikedb command. if [[ $? -eq 0 ]]; then rm /tmp/change_ikeobjects.xml rm /tmp/orig_ikeobjects.xml else /usr/sbin/ikedb -p /tmp/orig_ikeobjects.xml echo Press Enter to continue read x fi else rm /tmp/change_ikeobjects.xml rm /tmp/orig_ikeobjects.xml fi }; x ips_import_linux_optImport Linux IKE tunnelssm_ipsec.cat/usr/sbin/ikedb -cF ips_activate_ike_tunnels_optActivate IKE Tunnelssm_ipsec.catx () { if [[ $2 = all ]]; then /usr/sbin/ike cmd=activate else /usr/sbin/ike cmd=activate phase=$1 namelist=$2 fi }; x ips_deactivate_ike_tunnels_optDeactivate IKE Tunnelssm_ipsec.catx () { if [[ $2 = all ]]; then /usr/sbin/ike cmd=remove all else /usr/sbin/ike cmd=remove phase=$1 numlist=$2 fi } x ips_export_ike_tunnels_optExport IKE Tunnelssm_ipsec.catx () { /usr/sbin/ikedb -g > $1 } x ips_import_ike_tunnels_optImport AIX IKE Tunnelssm_ipsec.catx () { /usr/sbin/ikedb -psF $1 } x ips_A,ips_E,ips_L,ips_F,ips_G,ips_MAuthentication Only (AH)sm_ipsec.cat/usr/sbin/gentun -v 4 -t manual -p a -P a -e none -E noneips_A,ips_E,ips_I,ips_F,ips_H,ips_K,ips_M,ips_L,ips_J,ips_aPAuthentication with AH, Encryption with ESPsm_ipsec.cat/usr/sbin/gentun -v 4 -t manual -p ae -P aeips_N,ips_P,ips_A,ips_EA,ips_I,ips_H,ips_E,ips_MEncryption and Authentication with ESPsm_ipsec.cat/usr/sbin/gentun -v 4 -t manual -p e -P e -a none -A noneips_A,ips_C,ips_E,ips_L,ips_F,ips_G,ips_MAuthentication Only (AH)sm_ipsec.cat/usr/sbin/gentun -v 4 -t manual -p a -P a -e none -E noneips_A,ips_C,ips_E,ips_L,ips_J,ips_I,ips_F,ips_K,ips_H,ips_M,ips_aPAuthentication with AH, Encryption with ESPsm_ipsec.cat/usr/sbin/gentun -v 4 -t manual -p ae -P aeips_N,ips_P,ips_A,ips_C,ips_EA,ips_I,ips_H,ips_E,ips_MEncryption and Authentication with ESPsm_ipsec.cat/usr/sbin/gentun -v 4 -t manual -p e -P e -a none -A noneips_Q,ips_R,ips_l,ips_pP,ips_E,ips_I,ips_F,ips_EA,ips_U,ips_K,ips_M,ips_TChange a Manual Tunnel - Host-Hostsm_ipsec.cat/usr/sbin/chtun -v 4 -t /usr/sbin/lstun -v 4 -O -s -t _rawnameips_Q,ips_R,ips_l,ips_pP,ips_E,ips_I,ips_F,ips_U,ips_K,ips_M,ips_T,ips_SChange a Manual Tunnel - Host-Firewall-Hostsm_ipsec.cat/usr/sbin/chtun -v 4 -t /usr/sbin/lstun -v 4 -O -s -t _rawname/usr/sbin/lstun -v 4 -s -Oips_WRemove IP Security Manual Tunnelsm_ipsec.cat/usr/sbin/rmtun -v 4 -d ips_W,ips4_export_man_tunnel_optExport IP Security Tunnelsm_ipsec.cat/usr/sbin/exptun -v 4 directory_name,ips4_import_tunnel_optImport IP Security Tunnelsm_ipsec.cat/usr/sbin/imptun -v 4 ips_W,ips4_act_man_tunnel_optActivate a Tunnelsm_ipsec.cat/usr/sbin/mktun -v 4 ips_WDeactivate a Tunnelsm_ipsec.cat/usr/sbin/rmtun -v 4 List Encryption Modulessm_ipsec.catx () { odmget -q "class = 2" crypto_module | grep smit_choice | cut -d\" -f2 echo odmget -q "class = 1" crypto_module | grep smit_choice | cut -d\" -f2 } x List Active IP Security Filter Rulessm_ipsec.cat/usr/sbin/lsfilt -s -v 4 -a -OList IP Security Filter Rulessm_ipsec.cat/usr/sbin/lsfilt -s -v 4 -Oips4_add_filter_optAdd an IP Security Filter Rulesm_ipsec.cat/usr/sbin/genfilt -v 4 ips4_chg_filter_optChange IP Security Filter Rulessm_ipsec.cat/usr/sbin/chfilt -v 4 /usr/sbin/lsfilt -s -v 4 -O -n _rawnameips4_move_filter_optMove the Filter entrysm_ipsec.cat/usr/sbin/mvfilt -v 4 ips4_export_filter_optExport IP Security Filtersm_ipsec.cat/usr/sbin/expfilt -v 4 directory_name,ips4_import_filter_optImport IP Security Filtersm_ipsec.catecho all;/usr/sbin/impfilt -v 4 ips4_delete_filter_optDelete Filter Entrysm_ipsec.cat/usr/sbin/rmfilt -v 4 List Active Security Filterssm_ipsec.cat/usr/sbin/lsfilt -s -v 4 -a -OControl Filter Activationsm_ipsec.cat/usr/sbin/mkfilt -v 4 -uControl Filter Deactivationsm_ipsec.cat/usr/sbin/mkfilt -v 4 -dControl Filter Logging Statussm_ipsec.cat/usr/sbin/mkfilt -g startControl Filter Logging Statussm_ipsec.cat/usr/sbin/mkfilt -g stopips4_start_tracing_optStart IP Security Tracingsm_ipsec.catx () { if [[ $1 = all ]]; then /usr/bin/trace -a -j 2e9,2de,2df,2e0,2e1,2e2,2e3,2e4,2e5 else /usr/bin/trace -a -j $1 fi } x ips4_stop_tracing_optStop IP Security Tracingsm_ipsec.catx () { /usr/bin/trcstop if [[ $1 = y ]]; then /usr/bin/trcrpt > $2 fi } x ips_backupDB_optBackup IKE Databasesm_ipsec.catx () { /usr/sbin/ikedb -g > $1 } x ips_restoreDB_optRestore IKE Databasesm_ipsec.catx () { /usr/sbin/ikedb -x > /dev/null 2>&1 /usr/sbin/ikedb -pF $1 } x Initialize IKE Databasesm_ipsec.cat/usr/sbin/ikedb -xView IKE XML DTDsm_ipsec.cat/usr/sbin/ikedb -oips6_start_optStart IP Securitysm_ipsec.catx () { if [ $# -eq 1 ]; then /usr/sbin/mkdev -c ipsec -t 4 > /dev/null 2>&1 /usr/sbin/mkdev -c ipsec -t 6 /usr/sbin/mkfilt -v 4 -u -z $1 > /dev/null 2>&1 /usr/sbin/mkfilt -v 6 -u -z $1 else /usr/sbin/mkdev -c ipsec -t 4 $1 > /dev/null 2>&1 /usr/sbin/mkdev -c ipsec -t 6 $1 /usr/sbin/mkfilt -v 4 -z $2 > /dev/null 2>&1 /usr/sbin/mkfilt -v 6 -z $2 fi } x ips6_stop_optStop IP Securitysm_ipsec.cat/usr/sbin/rmdev -l ipsec_v6 ips_a,ips_E,ips_L6,ips_F,ips_G,ips_MAuthentication Only (AH)sm_ipsec.cat/usr/sbin/gentun -v 6 -t manual -p a -P a -e none -E noneips_a,ips_E,ips_I,ips_F,ips_H,ips_K,ips_M,ips_L6,ips_J6,ips_aPAuthentication with AH, Encryption with ESPsm_ipsec.cat/usr/sbin/gentun -v 6 -t manual -p ea -P eaips_N,ips_P,ips_a,ips_EA,ips_I,ips_H,ips_E,ips_MEncryption and Authentication with ESPsm_ipsec.cat/usr/sbin/gentun -v 6 -t manual -p e -P e -a none -A noneips_a,ips_C,ips_E,ips_L6,ips_F,ips_G,ips_MAuthentication Only (AH)sm_ipsec.cat/usr/sbin/gentun -v 6 -t manual -p a -P a -e none -E noneips_a,ips_C,ips_E,ips_L6,ips_J6,ips_I,ips_F,ips_K,ips_H,ips_M,ips_aPAuthentication with AH, Encryption with ESPsm_ipsec.cat/usr/sbin/gentun -v 6 -t manual -p ae -P aeips_N,ips_P,ips_a,ips_C,ips_EA,ips_I,ips_H,ips_E,ips_MEncryption and Authentication with ESPsm_ipsec.cat/usr/sbin/gentun -v 6 -t manual -p e -P e -a none -A noneips_Q,ips_r,ips_l6,ips_pP,ips_E,ips_I,ips_F,ips_EA,ips_U,ips_K,ips_M,ips_TChange a Manual Tunnel - Host-Hostsm_ipsec.cat/usr/sbin/chtun -v 6 -t /usr/sbin/lstun -v 6 -O -s -t _rawnameips_Q,ips_r,ips_l6,ips_pP,ips_E,ips_I,ips_F,ips_EA,ips_U,ips_K,ips_M,ips_T,ips_SChange a Manual Tunnel - Host-Firewall-Hostsm_ipsec.cat/usr/sbin/chtun -v 6 -t /usr/sbin/lstun -v 6 -O -s -t _rawname/usr/sbin/lstun -v 6 -s -Oips_wRemove IP Security Tunnelsm_ipsec.cat/usr/sbin/rmtun -v 6 -d ips_w,ips6_export_tunnel_optExport IP Security Tunnelsm_ipsec.cat/usr/sbin/exptun -v 6 directory_name,ips6_import_tunnel_optImport IP Security Tunnelsm_ipsec.cat/usr/sbin/imptun -v 6 ips_w,ips6_act_tunnel_optActivate a Tunnelsm_ipsec.cat/usr/sbin/mktun -v 6 ips_wDeactivate a Tunnelsm_ipsec.cat/usr/sbin/rmtun -v 6 List Encryption Modulessm_ipsec.catx () { odmget -q "class = 2" crypto_module | grep smit_choice | cut -d\" -f2 echo odmget -q "class = 1" crypto_module | grep smit_choice | cut -d\" -f2 } x List Active IP Security Filter Rulessm_ipsec.cat/usr/sbin/lsfilt -s -v 6 -a -OList IP Security Filter Rulessm_ipsec.cat/usr/sbin/lsfilt -s -v 6 -Oips6_add_filter_optAdd an IP Security Filter Rulesm_ipsec.cat/usr/sbin/genfilt -v 6 ips6_chg_filter_optChange IP Security Filter Rulessm_ipsec.cat/usr/sbin/chfilt -v 6 /usr/sbin/lsfilt -s -v 6 -O -n _rawnameips6_move_filter_optMove the Filter entrysm_ipsec.cat/usr/sbin/mvfilt -v 6 ips6_export_filter_optExport IP Security Filtersm_ipsec.cat/usr/sbin/expfilt -v 6 directory_name,ips6_import_filter_optImport IP Security Filtersm_ipsec.catecho all;/usr/sbin/impfilt -v 6 ips6_delete_filter_optDelete Filter Entrysm_ipsec.cat/usr/sbin/rmfilt -v 6 List Active Security Filterssm_ipsec.cat/usr/sbin/lsfilt -s -v 6 -a -OControl Filter Activationsm_ipsec.cat/usr/sbin/mkfilt -v 6 -uControl Filter Deactivationsm_ipsec.cat/usr/sbin/mkfilt -v 6 -dControl Filter Logging Statussm_ipsec.cat/usr/sbin/mkfilt -g startControl Filter Logging Statussm_ipsec.cat/usr/sbin/mkfilt -g stopips6_start_tracing_optStart IP Security Tracingsm_ipsec.catx () { if [[ $1 = all ]]; then /usr/bin/trace -a -j 2e9,2de,2df,2e0,2e1,2e2,2e3,2e4,2e5 else /usr/bin/trace -a -j $1 fi } x ips6_stop_tracing_optStop IP Security Tracingsm_ipsec.catx () { /usr/bin/trcstop if [[ $1 = y ]]; then /usr/bin/trcrpt > $2 fi } x conn_type,test_now,direct_info,proxy_info,proxy_host,proxy_port,proxy_userid,proxy_pwd_infoCreate/Change Primary Service Configurationecc.cat/usr/ecc/bin/config_conn_path -c 'PRIMARY'/usr/ecc/bin/config_conn_path -d 'PRIMARY'conn_type,test_now,direct_info,proxy_info,proxy_host,proxy_port,proxy_userid,proxy_pwd_infoCreate/Change Secondary Service Configurationecc.cat/usr/ecc/bin/config_conn_path -c 'SECONDARY'/usr/ecc/bin/config_conn_path -d 'SECONDARY'conn_type,test_now,direct_info,proxy_info,proxy_host,proxy_port,proxy_userid,proxy_pwd_infoCreate/Change Tertiary Service Configurationecc.cat/usr/ecc/bin/config_conn_path -c 'TERTIARY'/usr/ecc/bin/config_conn_path -d 'TERTIARY'Start Service and Support Proxyecc.catstartsrc -s IBM.SRVPROXYStop Service and Support Proxyecc.catstopsrc -s IBM.SRVPROXYproxy_enable,service_proxy_host,service_proxy_port,service_proxy_userid,service_proxy_pwd_infoCreate/Change the Service and Support Proxyecc.cat/usr/ecc/bin/config_service_proxy -c/usr/ecc/bin/config_service_proxy -dretry_attempts,conn_timeoutChange Connectivity Settingsecc.cat/usr/ecc/bin/config_global_settings -c/usr/ecc/bin/config_global_settings -dRestore Default Configurationecc.cat/usr/ecc/bin/restore_defaultsHostNameOrIPAddrAdd a Host to Topas Rsi.hosts Filetopas.catadd() { add1() { while ! [ -z "$1" ];do echo $1 >>$HOME/Rsi.hosts shift 2>/dev/null done } add1 $1 } addList hosts in topas external subnet search file (Rsi.hosts)topas.catlist() { if [ -s "$HOME/Rsi.hosts" ];then cat $HOME/Rsi.hosts else echo "$HOME/Rsi.hosts file does not exist" fi } listlistRECList of Recordingtopas.cat list_recording() { case $1 in persistent) listtrec -l ALL -P rc=$? ;; binary) /usr/bin/listtrec -l local_bin rc=$? ;; cec) /usr/bin/listtrec -l CEC rc=$? ;; cluster) /usr/bin/listtrec -l Cluster rc=$? ;; nmon) /usr/bin/listtrec -l local_nmon rc=$? ;; ALL) /usr/bin/listtrec -l ALL rc=$? ;; esac if [[ $rc != 0 ]] then echo -------------------------------------------- dspmsg -s 1 topas.cat 157 'There is no active recording' echo echo -------------------------------------------- fi } list_recording topas.cat print_message() { echo $(dspmsg topas.cat -s 2 53 'Local persistent recording is already running ') } print_messageperLocal_startBinaryidStart Persistent Binary recordingtopas.cat start_recording() { cmd="/usr/lpp/perfagent/config_aixwle.sh add local_bin" PauseRecording=no a_flag=no while getopts s:R:r:o:GHIJFWEa: option do case $option in s|R|r|F)ARG="$ARG -$option $OPTARG" ;; o)outpath="$OPTARG" echo $OPTARG|grep ".*/$" >/dev/null 2>&1 if [[ $? -ne 0 ]] then outpath=`dirname ${outpath}` fi if [[ ! -d $outpath ]] then echo $(dspmsg topas.cat -s 1 170 'Invalid Output Path') exit 1 fi ARG="$ARG -o $OPTARG " ;; W)EnableWle=yes ;; G)EnableDiskBasic=yes ;; H)EnableDiskservice=yes ;; I)EnableDiskAdBasic=yes ;; J)EnableDiskAdservice=yes ;; E)PauseRecording=yes ARG="$ARG -$option " ;; a)a_flag=yes if [[ ${PauseRecording} = yes ]] then ARG="$ARG -$option $OPTARG" fi ;; esac done #Do not start the recording only if minpct/maxpct is specified & the filesystem threshold is not enabled. if [[ ${PauseRecording} = no && ${a_flag} = yes ]] then echo $(dspmsg topas.cat -s 1 186 'Filesystem Threshold is NOT Enabled. Enable the filesystem threshold & specify the Minimum / Maximum percentage.') exit 1 fi #Default path is /var/perf/daily/ if [[ -z $outpath ]] then ARG="$ARG -o /var/perf/daily/" fi if [[ ${EnableDiskBasic} = yes ]] then /usr/lpp/perfagent/config_disk.sh diskn else /usr/lpp/perfagent/config_disk.sh disky fi if [[ ${EnableDiskservice} = yes ]] then /usr/lpp/perfagent/config_disk.sh disksn else /usr/lpp/perfagent/config_disk.sh disksy fi if [[ ${EnableDiskAdBasic} = yes ]] then /usr/lpp/perfagent/config_disk.sh diskan else /usr/lpp/perfagent/config_disk.sh diskay fi if [[ ${EnableDiskAdservice} = yes ]] then /usr/lpp/perfagent/config_disk.sh diskasn else /usr/lpp/perfagent/config_disk.sh diskasy fi $cmd /usr/bin/topasrec -L $ARG if [[ ${EnableWle} = yes ]] then /usr/lpp/perfagent/config_aixwle.sh start wle local_bin fi } start_recordingtopas.catperLocal_startNmonid,process_filter_topas,nmon_dataCollectorDef,nmon_dataCollectorStart Persistent nmon recordingtopas.cat run_nmon() { i=0 while getopts 'z:X:f:s:c:R:r:FZ:GDEJKVPN:MWS^OLAw:p:n:y:a:l:g:k:I:T:e:@:m:i' option do case $option in z)ARG="$ARG -z " ;; X)ARG="$ARG -X " ;; f)ARG="$ARG -f " ;; s)ARG="$ARG -s $OPTARG " ;; c)ARG="$ARG -c $OPTARG " ;; R)ARG="$ARG -ydays_file=$OPTARG " ;; r)ARG="$ARG -a $OPTARG " ;; F)ARG="$ARG -yoverwrite=1 " ;; Z)ARG="$ARG -Z $OPTARG" ;; G)ARG="$ARG -G " ;; @)sno=`echo $OPTARG|awk '{print $1}'` sno=${sno:-2} case $sno in 1) ;; 2)ARG="$ARG -t " ;; 3)ARG="$ARG -T " ;; 4)ARG="$ARG -Y " ;; esac ;; D)ARG="$ARG -D " ;; E)ARG="$ARG -E " ;; J)ARG="$ARG -J " ;; K)ARG="$ARG -K " ;; V)ARG="$ARG -V " ;; P)ARG="$ARG -P " ;; N) if [[ $OPTARG != no ]] then sno=`echo $OPTARG|awk '{print $1}'` case $sno in 1) ;; 2)ARG="$ARG -N " ;; 3)ARG="$ARG -NN " ;; esac fi ;; M)ARG="$ARG -M " ;; W)ARG="$ARG -W " ;; ^)ARG="$ARG -^ " ;; S)ARG="$ARG -S " ;; O)ARG="$ARG -O " ;; L)ARG="$ARG -L " ;; A)ARG="$ARG -A " ;; w)ARG="$ARG -w $OPTARG " ;; l)ARG="$ARG -l $OPTARG " ;; g)ARG="$ARG -g $OPTARG " ;; k)ARG="$ARG -k $OPTARG " ;; I)ARG="$ARG -I $OPTARG " ;; e)export NMON_ONE_IN="$OPTARG" ;; T)ARG="$ARG -T $OPTARG " ;; p)export NMONCMD${i}="$OPTARG" ((i=i+1)) ;; n)export NMON_START="$OPTARG" ;; y)export NMON_END="$OPTARG" ;; a)export NMON_SNAP="$OPTARG" ;; m) outpath="$OPTARG" echo $OPTARG|grep ".*/$" >/dev/null 2>&1 if [[ $? -ne 0 ]] then outpath=`dirname ${outpath}` fi if [[ ! -d $outpath ]] then echo $(dspmsg topas.cat -s 1 170 'Invalid Output Path') exit 1 fi ARG="$ARG -o $OPTARG " ;; i)ARG="$ARG -i " ;; esac done #Default path is /var/perf/daily/ if [[ -z $outpath ]] then ARG="$ARG -o /var/perf/daily/" fi /usr/lpp/perfagent/config_aixwle.sh add local_nmon /usr/bin/nmon -f $ARG } run_nmontopas.cat print_message() { dspmsg -s 2 topas.cat 54 'Persistent CEC recording is already running' } print_messagepersistent_cec_recordingidStart Persistent CEC recordingtopas.cat start_recording() { while getopts s:R:r:o:FW option do case $option in s|R|r|F)ARG="$ARG -$option $OPTARG" ;; o) outpath="$OPTARG" echo $OPTARG|grep ".*/$" >/dev/null 2>&1 if [[ $? -ne 0 ]] then outpath=`dirname ${outpath}` fi if [[ ! -d $outpath ]] then echo $(dspmsg topas.cat -s 1 170 'Invalid Output Path') exit 1 fi ARG="$ARG -o $OPTARG " ;; esac done #Default path is /var/perf/daily/ if [[ -z $outpath ]] then ARG="$ARG -o /var/perf/daily/" fi /usr/lpp/perfagent/config_topas.sh add "cec_bin" /usr/bin/topasrec -C $ARG } start_recordingtopas.cat print_message1() { dspmsg -s 2 topas.cat 59 'Persistent Cluster recording is already running' } print_message1persistent_cluster_recordingidStart Persistent Cluster recordingtopas.cat start_recording() { while getopts s:R:r:o:FW option do case $option in s|R|r|F)ARG="$ARG -$option $OPTARG" ;; o) outpath="$OPTARG" echo $OPTARG|grep ".*/$" >/dev/null 2>&1 if [[ $? -ne 0 ]] then outpath=`dirname ${outpath}` fi if [[ ! -d $outpath ]] then echo $(dspmsg topas.cat -s 1 170 'Invalid Output Path') exit 1 fi ARG="$ARG -o $OPTARG " ;; esac done /usr/lpp/perfagent/config_topas.sh add "cluster_bin" /usr/bin/topasrec -G $ARG } start_recordingtopas.catstart_localBinary_dayidStart Local Binary recordingtopas.cat/usr/bin/topasrec -Ltopas.catstart_localBinary_houridStart Local Binary recordingtopas.cat/usr/bin/topasrec -Ltopas.catstart_localBinary_customidStart Local Binary recordingtopas.cat/usr/bin/topasrec -Ltopas.catstart_cec_dayidStart Local CEC recordingtopas.cat/usr/bin/topasrec -Ctopas.catstart_cec_houridStart Local CEC recordingtopas.cat/usr/bin/topasrec -Ctopas.catstart_cec_customidStart Local CEC recordingtopas.cat/usr/bin/topasrec -Ctopas.catstart_cluster_dayidStart Local Cluster recordingtopas.cat/usr/bin/topasrec -Gtopas.catstart_cluster_houridStart Local Cluster recordingtopas.cat/usr/bin/topasrec -Gtopas.catstart_cluster_customidStart Local Cluster recordingtopas.cat/usr/bin/topasrec -Gtopas.catstart_localNmon_dayid,process_filter_topas,nmon_dataCollectorDef,nmon_dataCollectorStart nmon recordingtopas.cat run_nmon() { i=0 while getopts 'z:X:f:s:c:R:r:FZ:GDEJKVPN:MWS^OLAw:p:n:y:a:l:g:k:I:w:e:@:m:i' option do case $option in z)ARG="$ARG -z " ;; X)ARG="$ARG -X " ;; f)ARG="$ARG -f " ;; s)ARG="$ARG -s $OPTARG " ;; c)ARG="$ARG -c $OPTARG " ;; R)ARG="$ARG -R $OPTARG " ;; r)ARG="$ARG -r $OPTARG " ;; F)ARG="$ARG -yoverwrite=1 " ;; Z)ARG="$ARG -Z $OPTARG" ;; G)ARG="$ARG -G " ;; @)sno=`echo $OPTARG|awk '{print $1}'` sno=${sno:-2} case $sno in 1) ;; 2)ARG="$ARG -t " ;; 3)ARG="$ARG -T " ;; 4)ARG="$ARG -Y " ;; esac ;; D)ARG="$ARG -D " ;; E)ARG="$ARG -E " ;; J)ARG="$ARG -J " ;; K)ARG="$ARG -K " ;; V)ARG="$ARG -V " ;; P)ARG="$ARG -P " ;; N) if [[ $OPTARG != no ]] then sno=`echo $OPTARG|awk '{print $1}'` case $sno in 1) ;; 2)ARG="$ARG -N " ;; 3)ARG="$ARG -NN " ;; esac fi ;; M)ARG="$ARG -M " ;; W)ARG="$ARG -W " ;; ^)ARG="$ARG -^ " ;; S)ARG="$ARG -S " ;; O)ARG="$ARG -O " ;; L)ARG="$ARG -L " ;; A)ARG="$ARG -A " ;; w)ARG="$ARG -w $OPTARG " ;; l)ARG="$ARG -l $OPTARG " ;; g)ARG="$ARG -g $OPTARG " ;; k)ARG="$ARG -k $OPTARG " ;; I)ARG="$ARG -I $OPTARG " ;; e)export NMON_ONE_IN="$OPTARG" ;; w)ARG="$ARG -T $OPTARG " ;; p)export NMONCMD${i}="$OPTARG" ((i=i+1)) ;; n)export NMON_START="$OPTARG" ;; y)export NMON_END="$OPTARG" ;; a)export NMON_SNAP="$OPTARG" ;; m) outpath="$OPTARG" echo $OPTARG|grep ".*/$" >/dev/null 2>&1 if [[ $? -ne 0 ]] then outpath=`dirname ${outpath}` fi if [[ ! -d $outpath ]] then echo $(dspmsg topas.cat -s 1 170 'Invalid Output Path') exit 1 fi ARG="$ARG -o $OPTARG " ;; i)ARG="$ARG -i " ;; esac done /usr/bin/topas_nmon $ARG if [[ $? -eq 0 ]] then echo $(dspmsg topas.cat -s 1 171 'Successfully started recording') else return 1 fi } run_nmontopas.catstart_localNmon_hourid,process_filter_topas,nmon_dataCollectorDef,nmon_dataCollectorStart nmon recordingtopas.cat run_nmon() { i=0 while getopts 'z:X:f:s:c:R:r:FZ:GDEJKVPN:MWS^OLAw:p:n:y:a:l:g:k:I:w:e:@:m:i' option do case $option in z)ARG="$ARG -z " ;; X)ARG="$ARG -X " ;; f)ARG="$ARG -f " ;; s)ARG="$ARG -s $OPTARG " ;; c)ARG="$ARG -c $OPTARG " ;; R)ARG="$ARG -R $OPTARG " ;; r)ARG="$ARG -r $OPTARG " ;; F)ARG="$ARG -yoverwrite=1 " ;; Z)ARG="$ARG -Z $OPTARG" ;; G)ARG="$ARG -G " ;; @)sno=`echo $OPTARG|awk '{print $1}'` sno=${sno:-2} case $sno in 1) ;; 2)ARG="$ARG -t " ;; 3)ARG="$ARG -T " ;; 4)ARG="$ARG -Y " ;; esac ;; D)ARG="$ARG -D " ;; E)ARG="$ARG -E " ;; J)ARG="$ARG -J " ;; K)ARG="$ARG -K " ;; V)ARG="$ARG -V " ;; P)ARG="$ARG -P " ;; N) if [[ $OPTARG != no ]] then sno=`echo $OPTARG|awk '{print $1}'` case $sno in 1) ;; 2)ARG="$ARG -N " ;; 3)ARG="$ARG -NN " ;; esac fi ;; M)ARG="$ARG -M " ;; W)ARG="$ARG -W " ;; ^)ARG="$ARG -^ " ;; S)ARG="$ARG -S " ;; O)ARG="$ARG -O " ;; L)ARG="$ARG -L " ;; A)ARG="$ARG -A " ;; w)ARG="$ARG -w $OPTARG " ;; l)ARG="$ARG -l $OPTARG " ;; g)ARG="$ARG -g $OPTARG " ;; k)ARG="$ARG -k $OPTARG " ;; I)ARG="$ARG -I $OPTARG " ;; e)export NMON_ONE_IN="$OPTARG" ;; w)ARG="$ARG -T $OPTARG " ;; p)export NMONCMD${i}="$OPTARG" ((i=i+1)) ;; n)export NMON_START="$OPTARG" ;; y)export NMON_END="$OPTARG" ;; a)export NMON_SNAP="$OPTARG" ;; m) outpath="$OPTARG" echo $OPTARG|grep ".*/$" >/dev/null 2>&1 if [[ $? -ne 0 ]] then outpath=`dirname ${outpath}` fi if [[ ! -d $outpath ]] then echo $(dspmsg topas.cat -s 1 170 'Invalid Output Path') exit 1 fi ARG="$ARG -o $OPTARG " ;; i)ARG="$ARG -i " ;; esac done /usr/bin/topas_nmon $ARG if [[ $? -eq 0 ]] then echo $(dspmsg topas.cat -s 1 171 'Successfully started recording') else return 1 fi } run_nmontopas.catstart_localNmon_customid,process_filter_topas,nmon_dataCollectorCus,nmon_dataCollectorStart nmon recordingtopas.cat run_nmon() { i=0 while getopts 'z:X:f:s:c:R:r:FZ:GDEJKVPN:MWS^OLAw:p:n:y:a:l:g:k:I:w:e:@:m:i' option do case $option in z)ARG="$ARG -z " ;; X)ARG="$ARG -X " ;; f)ARG="$ARG -f " ;; s)ARG="$ARG -s $OPTARG " ;; c)ARG="$ARG -c $OPTARG " ;; R)ARG="$ARG -R $OPTARG " ;; r)ARG="$ARG -r $OPTARG " ;; F)ARG="$ARG -yoverwrite=1 " ;; Z)ARG="$ARG -Z $OPTARG" ;; G)ARG="$ARG -G " ;; @)sno=`echo $OPTARG|awk '{print $1}'` case $sno in 1) ;; 2)ARG="$ARG -t " ;; 3)ARG="$ARG -T " ;; 4)ARG="$ARG -Y " ;; esac ;; D)ARG="$ARG -D " ;; E)ARG="$ARG -E " ;; J)ARG="$ARG -J " ;; K)ARG="$ARG -K " ;; V)ARG="$ARG -V " ;; P)ARG="$ARG -P " ;; N) if [[ $OPTARG != no ]] then sno=`echo $OPTARG|awk '{print $1}'` case $sno in 1) ;; 2)ARG="$ARG -N " ;; 3)ARG="$ARG -NN " ;; esac fi ;; M)ARG="$ARG -M " ;; W)ARG="$ARG -W " ;; ^)ARG="$ARG -^ " ;; S)ARG="$ARG -S " ;; O)ARG="$ARG -O " ;; L)ARG="$ARG -L " ;; A)ARG="$ARG -A " ;; w)ARG="$ARG -w $OPTARG " ;; l)ARG="$ARG -l $OPTARG " ;; g)ARG="$ARG -g $OPTARG " ;; k)ARG="$ARG -k $OPTARG " ;; I)ARG="$ARG -I $OPTARG " ;; e)export NMON_ONE_IN="$OPTARG" ;; w)ARG="$ARG -T $OPTARG " ;; p)export NMONCMD${i}="$OPTARG" ((i=i+1)) ;; n)export NMON_START="$OPTARG" ;; y)export NMON_END="$OPTARG" ;; a)export NMON_SNAP="$OPTARG" ;; m) outpath="$OPTARG" echo $OPTARG|grep ".*/$" >/dev/null 2>&1 if [[ $? -ne 0 ]] then outpath=`dirname ${outpath}` fi if [[ ! -d $outpath ]] then echo $(dspmsg topas.cat -s 1 170 'Invalid Output Path') exit 1 fi ARG="$ARG -o $OPTARG " ;; i)ARG="$ARG -i " ;; esac done /usr/bin/topas_nmon $ARG if [[ $? -eq 0 ]] then echo $(dspmsg topas.cat -s 1 171 'Successfully started recording') else return 1 fi } run_nmontopas.catlist_recordingidPath to locate the completed recordingtopas.cat/usr/bin/topasout topas.catrec_infoStop the Recordinglisttrec -p list_output() { pid=$1 record=`/usr/bin/listtrec -l ALL|/usr/bin/grep $pid` user=`echo $record|awk '{print $2}'` format=`echo $record|awk '{print $3}'` start_time=`echo $record|awk '{print $4}'` start_time=`echo $start_time|sed 's/:/#!:/g'` output_path=`echo $record|awk '{print $5}'` PID=`echo $record|awk '{print $6}'` echo "#user:format:start_time:output_path:pid" echo "$user:$format:$start_time:$output_path:$pid" } list_output_selected_value print_message() { echo $(dspmsg topas.cat -s 2 55 'Persistent recording is not running ') /usr/lpp/perfagent/config_aixwle.sh delete local_bin } print_messagerec_info,wle_id,pm_idStop the Recording x() { /usr/lpp/perfagent/config_aixwle.sh delete local_bin $* } x list_output() { record=`/usr/bin/listtrec -l local_bin -P|tail +2` user=`echo $record|awk '{print $2}'` format=`echo $record|awk '{print $3}'` start_time=`echo $record|awk '{print $4}'` start_time=`echo $start_time|sed 's/:/#!:/g'` output_path=`echo $record|awk '{print $5}'` PID=`echo $record|awk '{print $1}'` WLE=`/usr/lpp/perfagent/config_aixwle.sh status wle local_bin 2>/dev/null` PM=`/var/perf/pm/bin/config_pm.sh status 2>/dev/null` echo "#user:format:start_time:output_path:pid:PM:WLE" echo "$user:$format:$start_time:$output_path:$PID:$PM:$WLE" } list_output print_message() { echo $(dspmsg topas.cat -s 2 55 'Persistent recording is not running ') /usr/lpp/perfagent/config_aixwle.sh delete local_nmon } print_messagerec_infoStop the Recording x() { /usr/lpp/perfagent/config_aixwle.sh delete local_nmon } x list_output() { record=`/usr/bin/listtrec -l local_nmon -P|tail +2` user=`echo $record|awk '{print $2}'` format=`echo $record|awk '{print $3}'` start_time=`echo $record|awk '{print $4}'` start_time=`echo $start_time|sed 's/:/#!:/g'` output_path=`echo $record|awk '{print $5}'` PID=`echo $record|awk '{print $1}'` echo "#user:format:start_time:output_path:pid" echo "$user:$format:$start_time:$output_path:$PID" } list_output print_message() { echo $(dspmsg topas.cat -s 2 55 'Persistent recording is not running ') /usr/lpp/perfagent/config_topas.sh delete topasrec } print_messagerec_infoStop the Recording x() { /usr/lpp/perfagent/config_topas.sh delete topasrec } x list_output() { record=`/usr/bin/listtrec -l CEC -P |tail +2` user=`echo $record|awk '{print $2}'` format=`echo $record|awk '{print $3}'` start_time=`echo $record|awk '{print $4}'` start_time=`echo $start_time|sed 's/:/#!:/g'` output_path=`echo $record|awk '{print $5}'` PID=`echo $record|awk '{print $1}'` echo "#user:format:start_time:output_path:pid" echo "$user:$format:$start_time:$output_path:$PID" } list_output print_message() { echo $(dspmsg topas.cat -s 2 55 'Persistent recording is not running ') /usr/lpp/perfagent/config_topas.sh delete clusterrec } print_messagerec_infoStop the Recording x() { /usr/lpp/perfagent/config_topas.sh delete clusterrec } x list_output() { record=`/usr/bin/listtrec -l Cluster -P |tail +2` user=`echo $record|awk '{print $2}'` format=`echo $record|awk '{print $3}'` start_time=`echo $record|awk '{print $4}'` start_time=`echo $start_time|sed 's/:/#!:/g'` output_path=`echo $record|awk '{print $5}'` PID=`echo $record|awk '{print $1}'` echo "#user:format:start_time:output_path:pid" echo "$user:$format:$start_time:$output_path:$PID" } list_outputrecording_file,report_format,type,recording_info,outfile1Generate a Reporttopas.catTOPASOUT() { while getopts :T:t:f:F:N: option do case $option in T) Record_Day=$OPTARG;; t) type=$OPTARG;; f) outfile=$OPTARG;; F) format=$OPTARG;; N) Recording_file=$OPTARG;; esac done if [ ! -z "$type" ];then type="-m $type" fi if ! echo $outfile |/usr/bin/grep /;then output_file=$PWD/$outfile else output_file=$outfile fi report_file=$Recording_file"_01" ######################################### if [[ "$format" = "comma_separated" ]];then topasout -c $type $Recording_file >/dev/null if [ ! -z "$outfile" ] ;then mv $report_file $output_file fi elif [[ "$format" = "spreadsheet" ]];then topasout -s $type $Recording_file >/dev/null if [ ! -z "$outfile" ] ;then mv $report_file $output_file fi fi if [ ! -z "$outfile" ] ;then filename=`/usr/bin/basename $report_file` echo $outfile | /usr/bin/grep / >/dev/null 2>&1 rc=$? if [[ -d $outfile ]] then echo "Report File Location : $outfile/$filename" elif [[ $rc -eq 0 ]] then echo "Report File Location : $outfile" else echo "Report File Location : $PWD/$filename " fi fi ######################################### } TOPASOUT x() { while getopts R:P: option do case $option in R) Rec_File=`echo "$OPTARG"| awk '{print $2}'` ;; P) Path="$OPTARG" ;; esac done echo $Rec_File | /usr/bin/grep />/dev/null 2>&1 rc=$? if [[ $rc -eq 0 ]] then FileName_Path="$Rec_File" else FileName_Path=`/usr/bin/topasout -l ${Path} | /usr/bin/grep ${Rec_File}|awk '{print $4}'` fi echo "#FileName_Path:Nothing" echo "$FileName_Path:$Nothing" } x-R _rawname -P _RecordingPathrecording_file,report_format,recording_info,time_info,outfileGenerate a Reporttopas.catTOPASOUT() { while getopts :T:f:b:e:i:F:N: option do case $option in T) Record_Day=$OPTARG;; f) outfile=$OPTARG;; b) begin=$OPTARG;; e) end=$OPTARG;; i) interval=$OPTARG;; F) format=$OPTARG;; N) Recording_file=$OPTARG;; esac done if [ ! -z "$interval" ];then interval="-i $interval" fi if [ ! -z "$end" ];then end="-e $end" fi if [ ! -z "$begin" ];then begin="-b $begin" fi if ! echo $outfile |/usr/bin/grep /;then output_file=$PWD/$outfile else output_file=$outfile fi ######################################### if [[ "$format" = "detailed" ]];then if [ ! -z "$outfile" ];then topasout -R detailed $begin $end $interval $Recording_file >$output_file else topasout -R detailed $begin $end $interval $Recording_file fi elif [[ "$format" = "summary" ]];then if [ ! -z "$outfile" ];then topasout -R summary $begin $end $interval $Recording_file >$output_file else topasout -R summary $begin $end $interval $Recording_file fi elif [[ "$format" = "pool_detail" ]];then if [ ! -z "$outfile" ];then topasout -R poolinfo $begin $end $interval $Recording_file >$output_file else topasout -R poolinfo $begin $end $interval $Recording_file fi elif [[ "$format" = "mempool" ]];then if [ ! -z "$outfile" ];then topasout -R mempool $begin $end $interval $Recording_file >$output_file else topasout -R mempool $begin $end $interval $Recording_file fi elif [[ "$format" = "VIO_Server/Client" ]];then if [ ! -z "$outfile" ];then topasout -R vios $begin $end $interval $Recording_file >$output_file else topasout -R vios $begin $end $interval $Recording_file fi elif [[ "$format" = "VIO_Server/Client_disk" ]];then if [ ! -z "$outfile" ];then topasout -R vios_adapter $begin $end $interval $Recording_file >$output_file else topasout -R vios_adapter $begin $end $interval $Recording_file fi fi if [ ! -z "$outfile" ];then filename=`/usr/bin/basename $output_file` echo $outfile | /usr/bin/grep / >/dev/null 2>&1 rc=$? if [[ -d $outfile ]] then echo "Report File Location : $outfile/$filename" elif [[ $rc -eq 0 ]] then echo "Report File Location : $outfile" else echo "Report File Location : $PWD/$filename " fi fi ######################################### } TOPASOUT func() { while getopts R:P: option do case $option in R) Rec_File=`echo "$OPTARG"| awk '{print $2}'` ;; P)Path="$OPTARG";; esac done echo $Rec_File | /usr/bin/grep />/dev/null 2>&1 rc=$? if [[ $rc -eq 0 ]] then FileName_Path="$Rec_File" Path=`/usr/bin/dirname $FileName_Path` else FileName_Path=`/usr/bin/topasout -l ${Path} | /usr/bin/grep ${Rec_File}|awk '{print $4}'` fi Begin_Time=`/usr/bin/topasout -l ${Path} | /usr/bin/grep ${Rec_File}|awk '{print $2}'` End_Time=`/usr/bin/topasout -l ${Path} | /usr/bin/grep ${Rec_File}|awk '{print $3}'` echo "#Begin_Time:End_Time:FileName_Path" echo "$Begin_Time:$End_Time:$FileName_Path" } func-R _rawname -P _RecordingPathrecording_file,report_format,type,recording_info,outfile1Generate a Reporttopas.catTOPASOUT() { while getopts :T:t:f:F:N: option do case $option in T) Record_Day=$OPTARG;; t) type=$OPTARG;; f) outfile=$OPTARG;; F) format=$OPTARG;; N) Recording_file=$OPTARG;; esac done if [ ! -z "$type" ];then type="-m $type" fi if ! echo $outfile |/usr/bin/grep /;then output_file=$PWD/$outfile else output_file=$outfile fi report_file=$Recording_file"_01" ######################################### if [[ "$format" = "comma_separated" ]];then topasout -c $type $Recording_file >/dev/null if [ ! -z "$outfile" ] ;then mv $report_file $output_file fi elif [[ "$format" = "spreadsheet" ]];then topasout -s $type $Recording_file >/dev/null if [ ! -z "$outfile" ] ;then mv $report_file $output_file fi fi if [ ! -z "$outfile" ] ;then filename=`/usr/bin/basename $report_file` echo $outfile | /usr/bin/grep / >/dev/null 2>&1 rc=$? if [[ -d $outfile ]] then echo "Report File Location : $outfile/$filename" elif [[ $rc -eq 0 ]] then echo "Report File Location : $outfile" else echo "Report File Location : $PWD/$filename " fi fi ######################################### } TOPASOUT x() { while getopts R:P: option do case $option in R) Rec_File=`echo "$OPTARG"| awk '{print $2}'` ;; P)Path="$OPTARG";; esac done echo $Rec_File | /usr/bin/grep />/dev/null 2>&1 rc=$? if [[ $rc -eq 0 ]] then FileName_Path="$Rec_File" else FileName_Path=`/usr/bin/topasout -l ${Path} | /usr/bin/grep ${Rec_File}|awk '{print $4}'` fi echo "#FileName_Path:Nothing" echo "$FileName_Path:$Nothing" } x-R _rawname -P _RecordingPathrecording_file,report_format,recording_info,time_info,outfileGenerate a Reporttopas.catTOPASOUT() { while getopts :T:f:b:e:i:F:N: option do case $option in T) Record_Day=$OPTARG;; f) outfile=$OPTARG;; b) begin=$OPTARG;; e) end=$OPTARG;; i) interval=$OPTARG;; F) format=$OPTARG;; N) Recording_file=$OPTARG;; esac done if [ ! -z "$interval" ];then interval="-i $interval" fi if [ ! -z "$end" ];then end="-e $end" fi if [ ! -z "$begin" ];then begin="-b $begin" fi if ! echo $outfile |/usr/bin/grep /;then output_file=$PWD/$outfile else output_file=$outfile fi ######################################### if [[ "$format" = "detailed" ]];then if [ ! -z "$outfile" ];then topasout -R detailed $begin $end $interval $Recording_file >$output_file else topasout -R detailed $begin $end $interval $Recording_file fi elif [[ "$format" = "summary" ]];then if [ ! -z "$outfile" ];then topasout -R summary $begin $end $interval $Recording_file >$output_file else topasout -R summary $begin $end $interval $Recording_file fi elif [[ "$format" = "disk_summary" ]];then if [ ! -z "$outfile" ];then topasout -R disk $begin $end $interval $Recording_file >$output_file else topasout -R disk $begin $end $interval $Recording_file fi elif [[ "$format" = "network_summary" ]];then if [ ! -z "$outfile" ];then topasout -R lan $begin $end $interval $Recording_file >$output_file else topasout -R lan $begin $end $interval $Recording_file fi elif [[ "$format" = "Adapter" ]];then if [ ! -z "$outfile" ];then topasout -R adapter $begin $end $interval $Recording_file >$output_file else topasout -R adapter $begin $end $interval $Recording_file fi elif [[ "$format" = "Virtual_Adapter" ]];then if [ ! -z "$outfile" ];then topasout -R vadapter $begin $end $interval $Recording_file >$output_file else topasout -R vadapter $begin $end $interval $Recording_file fi fi if [ ! -z "$outfile" ];then filename=`/usr/bin/basename $output_file` echo $outfile | /usr/bin/grep / >/dev/null 2>&1 rc=$? if [[ -d $outfile ]] then echo "Report File Location : $outfile/$filename" elif [[ $rc -eq 0 ]] then echo "Report File Location : $outfile" else echo "Report File Location : $PWD/$filename " fi fi ######################################### } TOPASOUT func() { while getopts R:P: option do case $option in R) Rec_File=`echo "$OPTARG"| awk '{print $2}'` ;; P)Path="$OPTARG";; esac done echo $Rec_File | /usr/bin/grep />/dev/null 2>&1 rc=$? if [[ $rc -eq 0 ]] then FileName_Path="$Rec_File" Path=`/usr/bin/dirname $FileName_Path` else FileName_Path=`/usr/bin/topasout -l ${Path} | /usr/bin/grep ${Rec_File}|awk '{print $4}'` fi Begin_Time=`/usr/bin/topasout -l ${Path} | /usr/bin/grep ${Rec_File}|awk '{print $2}'` End_Time=`/usr/bin/topasout -l ${Path} | /usr/bin/grep ${Rec_File}|awk '{print $3}'` echo "#Begin_Time:End_Time:FileName_Path" echo "$Begin_Time:$End_Time:$FileName_Path" } func-R _rawname -P _RecordingPathrecording_file,report_format,recording_info,outfile1Generate a Reporttopas.catTOPASOUT() { while getopts :T:f:F:N: option do case $option in T) Record_Day=$OPTARG;; f) outfile=$OPTARG;; F) format=$OPTARG;; N) Recording_file=$OPTARG;; esac done if [ ! -z "$type" ];then type="-m $type" fi if ! echo $outfile |/usr/bin/grep /;then output_file=$PWD/$outfile else output_file=$outfile fi report_file=$Recording_file".csv" ######################################### topasout -a $Recording_file >/dev/null if [ ! -z "$outfile" ] ;then mv $report_file $output_file filename=`/usr/bin/basename $report_file` echo $outfile | /usr/bin/grep / >/dev/null 2>&1 rc=$? if [[ -d $outfile ]] then echo "Report File Location : $outfile/$filename" elif [[ $rc -eq 0 ]] then echo "Report File Location : $outfile" else echo "Report File Location : $PWD/$filename " fi fi ######################################### } TOPASOUT x() { while getopts R:P: option do case $option in R) Rec_File=`echo "$OPTARG"| awk '{print $2}'` ;; P)Path="$OPTARG";; esac done echo $Rec_File | /usr/bin/grep />/dev/null 2>&1 rc=$? if [[ $rc -eq 0 ]] then FileName_Path="$Rec_File" else FileName_Path=`/usr/bin/topasout -l ${Path} | /usr/bin/grep ${Rec_File}|awk '{print $4}'` fi echo "#FileName_Path:Nothing" echo "$FileName_Path:$Nothing" } x-R _rawname -P _RecordingPathrecording_file,report_format,recording_infoGenerate a Reporttopas.catTOPASOUT() { while getopts :T:F:N: option do case $option in T) Record_Day=$OPTARG;; F) format=$OPTARG;; N) Recording_file=$OPTARG;; esac done ######################################### if [[ "$format" = "comma_separated" ]];then /usr/bin/topasout -c $Recording_file >/dev/null elif [[ "$format" = "spreadsheet" ]];then /usr/bin/topasout -s $Recording_file >/dev/null fi report_file=$Recording_file"_01" echo "Report File Location : $report_file" ######################################### } TOPASOUT x() { while getopts R:P: option do case $option in R) Rec_File=`echo "$OPTARG"| awk '{print $2}'` ;; P) Path="$OPTARG" ;; esac done echo $Rec_File | /usr/bin/grep />/dev/null 2>&1 rc=$? if [[ $rc -eq 0 ]] then FileName_Path="$Rec_File" else FileName_Path=`/usr/bin/topasout -l ${Path} | /usr/bin/grep ${Rec_File}|awk '{print $4}'` fi echo "#FileName_Path:Nothing" echo "$FileName_Path:$Nothing" } x-R _rawname -P _RecordingPathrecording_file,report_format,recording_infoGenerate a Reporttopas.catTOPASOUT() { while getopts :T:F:N:p: option do case $option in T) Record_Day=$OPTARG;; F) format=$OPTARG;; p) printer=$OPTARG;; N) Recording_file=$OPTARG;; esac done report_file=$Recording_file"_01" ######################################### if [[ "$format" = "comma_separated" ]];then /usr/bin/topasout -c $Recording_file >/dev/null cat $report_file |lpr -P $printer elif [[ "$format" = "spreadsheet" ]];then /usr/bin/topasout -s $Recording_file >/dev/null cat $report_file |lpr -P $printer fi echo "Report File Location : $report_file" ######################################### } TOPASOUT func() { while getopts R:P: option do case $option in R) Rec_File=`echo "$OPTARG"| awk '{print $2}'` ;; P)Path="$OPTARG";; esac done echo $Rec_File | /usr/bin/grep />/dev/null 2>&1 rc=$? if [[ $rc -eq 0 ]] then FileName_Path="$Rec_File" else FileName_Path=`/usr/bin/topasout -l ${Path} | /usr/bin/grep ${Rec_File}|awk '{print $4}'` fi dflt_printer=$(sed /^*/d /etc/qconfig |sed /^$/d |awk -F : '{if (NR==1) print $1 }') echo "#Begin_Time:End_Time:dflt_printer:FileName_Path" echo "$Begin_Time:$End_Time:$dflt_printer:$FileName_Path" } func-R _rawname -P _RecordingPathrecording_file,report_format,type,recording_info,printerGenerate a Reporttopas.catTOPASOUT() { while getopts :T:t:p:F:N: option do case $option in T) Record_Day=$OPTARG;; t) type=$OPTARG;; p) printer=$OPTARG;; F) format=$OPTARG;; N) Recording_file=$OPTARG;; esac done if [ ! -z "$type" ];then type="-m $type" fi if ! echo $outfile |/usr/bin/grep /;then output_file=$PWD/$outfile fi report_file=$Recording_file"_01" ######################################### if [[ "$format" = "comma_separated" ]];then topasout -c $type $Recording_file >/dev/null cat $report_file |lpr -P $printer elif [[ "$format" = "spreadsheet" ]];then topasout -s $type $Recording_file >/dev/null cat $report_file |lpr -P $printer fi ######################################### } TOPASOUT func() { while getopts R:P: option do case $option in R) Rec_File=`echo "$OPTARG"| awk '{print $2}'` ;; P)Path="$OPTARG";; esac done echo $Rec_File | /usr/bin/grep />/dev/null 2>&1 rc=$? if [[ $rc -eq 0 ]] then FileName_Path="$Rec_File" else FileName_Path=`/usr/bin/topasout -l ${Path} | /usr/bin/grep ${Rec_File}|awk '{print $4}'` fi dflt_printer=$(sed /^*/d /etc/qconfig |sed /^$/d |awk -F : '{if (NR==1) print $1 }') echo "#Begin_Time:End_Time:dflt_printer:FileName_Path" echo "$Begin_Time:$End_Time:$dflt_printer:$FileName_Path" } func-R _rawname -P _RecordingPathrecording_file,report_format,recording_info,time_info,printerGenerate a Reporttopas.catTOPASOUT() { while getopts :T:p:b:e:i:F:N: option do case $option in T) Record_Day=$OPTARG;; p) printer=$OPTARG;; b) begin=$OPTARG;; e) end=$OPTARG;; i) interval=$OPTARG;; F) format=$OPTARG;; N) Recording_file=$OPTARG;; esac done if [ ! -z "$interval" ];then interval="-i $interval" fi if [ ! -z "$end" ];then end="-e $end" fi if [ ! -z "$begin" ];then begin="-b $begin" fi if ! echo $outfile |grep /;then output_file=$PWD/$outfile fi ######################################### if [[ "$format" = "detailed" ]];then topasout -R detailed $begin $end $interval $Recording_file |lpr -P $printer elif [[ "$format" = "summary" ]];then topasout -R summary $begin $end $interval $Recording_file |lpr -P $printer elif [[ "$format" = "pool_detail" ]];then topasout -R poolinfo $begin $end $interval $Recording_file |lpr -P $printer elif [[ "$format" = "mempool" ]];then topasout -R mempool $begin $end $interval $Recording_file |lpr -P $printer elif [[ "$format" = "VIO_Server/Client" ]];then topasout -R vios $begin $end $interval $Recording_file |lpr -P $printer elif [[ "$format" = "VIO_Server/Client_disk" ]];then topasout -R vios_adapter $begin $end $interval $Recording_file |lpr -P $printer fi ######################################### } TOPASOUT func() { while getopts R:P: option do case $option in R) Rec_File=`echo "$OPTARG"| awk '{print $2}'` ;; P)Path="$OPTARG";; esac done echo $Rec_File | /usr/bin/grep />/dev/null 2>&1 rc=$? if [[ $rc -eq 0 ]] then FileName_Path="$Rec_File" Path=`/usr/bin/dirname $FileName_Path` else FileName_Path=`/usr/bin/topasout -l ${Path} | /usr/bin/grep ${Rec_File}|awk '{print $4}'` fi Begin_Time=`/usr/bin/topasout -l ${Path} | /usr/bin/grep ${Rec_File}|awk '{print $2}'` End_Time=`/usr/bin/topasout -l ${Path} | /usr/bin/grep ${Rec_File}|awk '{print $3}'` dflt_printer=$(sed /^*/d /etc/qconfig |sed /^$/d |awk -F ":" '{if (NR==1) print $1}') echo "#Begin_Time:End_Time:FileName_Path:dflt_printer:" echo "$Begin_Time:$End_Time:$FileName_Path:$dflt_printer:" } func-R _rawname -P _RecordingPathrecording_file,report_format,type,recording_info,printerGenerate a Reporttopas.catTOPASOUT() { while getopts :T:t:p:F:N: option do case $option in T) Record_Day=$OPTARG;; t) type=$OPTARG;; p) printer=$OPTARG;; F) format=$OPTARG;; N) Recording_file=$OPTARG;; esac done if [ ! -z "$type" ];then type="-m $type" fi if ! echo $outfile |grep /;then output_file=$PWD/$outfile fi report_file=$Recording_file"_01" ######################################### if [[ "$format" = "comma_separated" ]];then topasout -c $type $Recording_file >/dev/null cat $report_file |lpr -P $printer elif [[ "$format" = "spreadsheet" ]];then topasout -s $type $Recording_file >/dev/null cat $report_file |lpr -P $printer fi ######################################### } TOPASOUT func() { while getopts R:P: option do case $option in R) Rec_File=`echo "$OPTARG"| awk '{print $2}'` ;; P)Path="$OPTARG";; esac done echo $Rec_File | /usr/bin/grep />/dev/null 2>&1 rc=$? if [[ $rc -eq 0 ]] then FileName_Path="$Rec_File" else FileName_Path=`/usr/bin/topasout -l ${Path} | /usr/bin/grep ${Rec_File}|awk '{print $4}'` fi dflt_printer=$(sed /^*/d /etc/qconfig |sed /^$/d |awk -F : '{if (NR==1) print $1 }') echo "#Begin_Time:End_Time:dflt_printer:FileName_Path" echo "$Begin_Time:$End_Time:$dflt_printer:$FileName_Path" } func-R _rawname -P _RecordingPathrecording_file,report_format,recording_info,time_info,printerGenerate a Reporttopas.catTOPASOUT() { while getopts :T:p:b:e:i:F:N: option do case $option in T) Record_Day=$OPTARG;; p) printer=$OPTARG;; b) begin=$OPTARG;; e) end=$OPTARG;; i) interval=$OPTARG;; F) format=$OPTARG;; N) Recording_file=$OPTARG;; esac done if [ ! -z "$interval" ];then interval="-i $interval" fi if [ ! -z "$end" ];then end="-e $end" fi if [ ! -z "$begin" ];then begin="-b $begin" fi if ! echo $outfile |/usr/bin/grep /;then output_file=$PWD/$outfile fi ######################################### if [[ "$format" = "detailed" ]];then topasout -R detailed $begin $end $interval $Recording_file |lpr -P $printer elif [[ "$format" = "summary" ]];then topasout -R summary $begin $end $interval $Recording_file |lpr -P $printer elif [[ "$format" = "disk_summary" ]];then topasout -R disk $begin $end $interval $Recording_file |lpr -P $printer elif [[ "$format" = "network_summary" ]];then topasout -R lan $begin $end $interval $Recording_file |lpr -P $printer elif [[ "$format" = "Adapter" ]];then topasout -R adapter $begin $end $interval $Recording_file |lpr -P $printer elif [[ "$format" = "Virtual_Adapter" ]];then topasout -R vadapter $begin $end $interval $Recording_file |lpr -P $printer fi ######################################### } TOPASOUT func() { while getopts R:P: option do case $option in R) Rec_File=`echo "$OPTARG"| awk '{print $2}'` ;; P)Path="$OPTARG";; esac done echo $Rec_File | /usr/bin/grep />/dev/null 2>&1 rc=$? if [[ $rc -eq 0 ]] then FileName_Path="$Rec_File" Path=`/usr/bin/dirname $FileName_Path` else FileName_Path=`/usr/bin/topasout -l ${Path} | /usr/bin/grep ${Rec_File}|awk '{print $4}'` fi Begin_Time=`/usr/bin/topasout -l ${Path} | /usr/bin/grep ${Rec_File}|awk '{print $2}'` End_Time=`/usr/bin/topasout -l ${Path} | /usr/bin/grep ${Rec_File}|awk '{print $3}'` dflt_printer=$(sed /^*/d /etc/qconfig |sed /^$/d |awk -F ":" '{if (NR==1) print $1}') echo "#Begin_Time:End_Time:dflt_printer:FileName_Path" echo "$Begin_Time:$End_Time:$dflt_printer:$FileName_Path" } func-R _rawname -P _RecordingPathrecording_file,report_format,recording_info,printerGenerate a Reporttopas.catTOPASOUT() { while getopts :T:p:F:N: option do case $option in T) Record_Day=$OPTARG;; p) printer=$OPTARG;; F) format=$OPTARG;; N) Recording_file=$OPTARG;; esac done if [ ! -z "$type" ];then type="-m $type" fi if ! echo $outfile |grep /;then output_file=$PWD/$outfile fi report_file=$Recording_file".csv" ######################################### topasout -a $Recording_file >/dev/null cat $report_file |lpr -P $printer ######################################### } TOPASOUT func() { while getopts R:P: option do case $option in R) Rec_File=`echo "$OPTARG"| awk '{print $2}'` ;; P)Path="$OPTARG";; esac done echo $Rec_File | /usr/bin/grep />/dev/null 2>&1 rc=$? if [[ $rc -eq 0 ]] then FileName_Path="$Rec_File" else FileName_Path=`/usr/bin/topasout -l ${Path} | /usr/bin/grep ${Rec_File}|awk '{print $4}'` fi dflt_printer=$(sed /^*/d /etc/qconfig |sed /^$/d |awk -F : '{if (NR==1) print $1 }') echo "#Begin_Time:End_Time:dflt_printer:FileName_Path" echo "$Begin_Time:$End_Time:$dflt_printer:$FileName_Path" } func-R _rawname -P _RecordingPathSetupWle_idWLE x() { /usr/lpp/perfagent/config_aixwle.sh $1 wle $2 } x/usr/lpp/perfagent/config_aixwle.sh status wle -sxmtopas_configChange/Show xmtopas configuration filexmtopas.cat add_tofile() { while getopts n:c:C:S:O:a:s:R:m:M:p:P:L:N:r:G:F: option do case $option in n|c|C|S|O|a|R|m|M|p|P|L|N|r|G|F)ARG="$ARG -$option ""$OPTARG""" ;; s) value=`echo "$OPTARG"` a=`echo "$value"` echo $a value=`echo $a | sed 's/ /#/g'` ARG="$ARG -$option $value" ;; esac done sh /usr/lpp/perfagent/config_xmtopas.sh $ARG } add_tofile/usr/lpp/perfagent/config_xmtopas.sh parseEnable/Refresh xmtopasxmtopas.catadd_xmtopastoinetd() { rc=0 iswpar=0 iswpar=`uname -W` if [ $iswpar -gt 0 ] then echo -------------------------------------------- echo $(dspmsg xmtopas.cat -s 1 27 'Not Supported inside WPAR') echo echo -------------------------------------------- else RC=`grep -c xmtopas /etc/inetd.conf` if [[ $RC -eq 0 && -z $INUWPAR ]] then /usr/sbin/chsubserver -a -v xmquery -p udp -t dgram -w wait -u root -g /usr/bin/xmtopas xmtopas -p3 > /dev/null rc=$? else /usr/sbin/chsubserver -a -v xmquery -p udp > /dev/null 2>&1 rc=$? fi if [[ $rc != 0 ]] then echo -------------------------------------------- echo $(dspmsg xmtopas.cat -s 1 23 'Failed to add xmtopas entry to inetd') echo echo -------------------------------------------- else refresh -s inetd > /dev/null 2>&1 fi #restart xmtopas ps_o=`ps -ef -o comm,pid | grep xmtopas` if [ $? -eq 0 ] then pid=`echo $ps_o | awk '{print $2}'` kill $pid > /dev/null 2>&1 rc=$? if [ $rc != 0 ] then echo $(dspmsg xmtopas.cat -s 1 24 'Failed to kill xmtopas') fi else echo $(dspmsg xmtopas.cat -s 1 25 'xmtopas is not running') fi fi } add_xmtopastoinetd xmtopas.catDisable xmtopasxmtopas.catrm_xmtopasfrminetd() { iswpar=0 iswpar=`uname -W` if [ $iswpar -gt 0 ] then echo -------------------------------------------- echo $(dspmsg xmtopas.cat -s 1 27 'Not Supported inside WPAR') echo echo -------------------------------------------- else RC=`grep -c xmtopas /etc/inetd.conf` if [ $RC -gt 0 ] then /usr/sbin/chsubserver -d -v xmquery -p udp -t dgram -w wait -u root -g /usr/bin/xmtopas xmtopas -p3 > /dev/null rc=$? if [ $rc -eq 0 ] then refresh -s inetd > /dev/null fi fi if [[ $rc != 0 ]] then echo -------------------------------------------- echo $(dspmsg xmtopas.cat -s 1 26 'Failed to delete xmtopas inetd entry') echo echo -------------------------------------------- fi ps_o=`ps -ef -o comm,pid | grep xmtopas` if [ $? -eq 0 ] then pid=`echo $ps_o | awk '{print $2}'` kill $pid > /dev/null 2>&1 rc=$? if [ $rc != 0 ] then echo $(dspmsg xmtopas.cat -s 1 24 'Failed to kill xmtopas') fi else echo $(dspmsg xmtopas.cat -s 1 25 'xmtopas is not running') fi fi } rm_xmtopasfrminetd xmtopas.catenet_chg,enet_chg_lnc2entChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_lnc2entChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_lnc2entChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_lnc2entChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_lnc2entChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_lnc2entChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_lnc2entChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_lnc2entChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_lnc2entChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_lnc2entChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_lnc2entChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_lnc2entChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_lnc2entChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_lnc2entChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_lnc2entChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_lnc2entChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_lnc2entChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_lnc2entChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_lnc2entChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_lnc2entChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_lnc2entChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_lnc2entChange/Show Characteristics of an Ethernet Adaptersmit.catchdev lsattr -l logicname -E -Oenet_chg,enet_chg_mlxent_b31550677365000Change / Show Characteristics of an Ethernet Adaptersmit.catchdevlsattr-l logicname -E -Oenet_chg,enet_chg_mlxent_b31550677265000Change / Show Characteristics of an Ethernet Adaptersmit.catchdevlsattr-l logicname -E -Oenet_chg,enet_chg_mlxent_b31550676104000Change / Show Characteristics of an Ethernet Adaptersmit.catchdevlsattr-l logicname -E -Oenet_chg,enet_chg_mlxent_b31550671604000Change / Show Characteristics of an Ethernet Adaptersmit.catchdevlsattr-l logicname -E -Oenet_chg,enet_chg_mlxcent_b3151e10a606Change / Show Characteristics of an Ethernet Adaptersmit.catchdevlsattr-l logicname -E -Oenet_chg,enet_chg_mlxcent_b3151d10a606Change / Show Characteristics of an Ethernet Adaptersmit.catchdevlsattr-l logicname -E -Oenet_chg,enet_chg_mlxcent_b3151a103506Change / Show Characteristics of an Ethernet Adaptersmit.catchdevlsattr-l logicname -E -Oenet_chg,enet_chg_mlxcent_b31519103506Change / Show Characteristics of an Ethernet Adaptersmit.catchdevlsattr-l logicname -E -Oenet_chg,enet_chg_mlxcent_b31516101f06Change / Show Characteristics of an Ethernet Adaptersmit.catchdevlsattr-l logicname -E -Oenet_chg,enet_chg_mlxcent_b31516101e06Change / Show Characteristics of an Ethernet Adaptersmit.catchdevlsattr-l logicname -E -Oenet_chg,enet_chg_mlxcent_b31515101f06Change / Show Characteristics of an Ethernet Adaptersmit.catchdevlsattr-l logicname -E -Oenet_chg,enet_chg_mlxcent_b31515101e06Change / Show Characteristics of an Ethernet Adaptersmit.catchdevlsattr-l logicname -E -Oenet_chg,enet_chg_mlxcent_b3151410f704Change / Show Characteristics of an Ethernet Adaptersmit.catchdevlsattr-l logicname -E -Oenet_chg,enet_chg_mlxcent_b3151310f704Change / Show Characteristics of an Ethernet Adaptersmit.catchdevlsattr-l logicname -E -Oenet_chg,enet_chg_mlxent_b3150710eb04000Change / Show Characteristics of an Ethernet Adaptersmit.catchdevlsattr-l logicname -E -Oenet_chg,enet_chg_mlxent_b3150710e704000Change / Show Characteristics of an Ethernet Adaptersmit.catchdevlsattr-l logicname -E -Oenet_chg,enet_chg_mlxent_b3150310b504000Change / Show Characteristics of an Ethernet Adaptersmit.catchdevlsattr-l logicname -E -Osuma_easy_ml_optsDownload Maintenance Level or Technology Levelsuma.cat/usr/suma/bin/suma -x -a RqType=ML -a Action=Download -a Repeats=nsuma_easy_sp_optsDownload Service Packsuma.cat/usr/suma/bin/suma -x -a RqType=SP -a Action=Download -a Repeats=nDownload All Latest Fixessuma.cat/usr/suma/bin/suma -x -a RqType=Latest -a RqName= -a Action=Download -a Repeats=nsuma_task_new_hdr_sexec,suma_task_displayname,suma_task_genCreate a New SUMA Tasksuma.cat/usr/suma/bin/suma -wx /usr/suma/bin/sm_suma cmd_to_discover_from_stanza defaultsuma_task_new_hdr_exec,suma_task_genCreate a New SUMA Tasksuma.cat/usr/suma/bin/suma -x /usr/suma/bin/sm_suma cmd_to_discover_from_stanza defaultsuma_task_new_hdr_sched,suma_task_displayname,suma_task_gen,suma_task_notify,suma_task_schedCreate a New SUMA Tasksuma.cat/usr/suma/bin/suma -a Repeats=y/usr/suma/bin/sm_suma cmd_to_discover_from_stanza defaultsuma_task_new_hdr_onetime,suma_task_displayname,suma_task_gen,suma_task_sched,suma_task_notifyCreate a New SUMA Tasksuma.cat/usr/suma/bin/suma -a Repeats=n/usr/suma/bin/sm_suma cmd_to_discover_from_stanza defaultsuma_task_new_hdr_saveo,suma_task_displayname,suma_task_genCreate a New SUMA Tasksuma.cat/usr/suma/bin/suma -w /usr/suma/bin/sm_suma cmd_to_discover_from_stanza defaultsuma_task_edit_hdr_sexec,suma_task_edit_taskid,suma_task_displayname,suma_task_genView or Change an Existing SUMA Tasksuma.cat/usr/suma/bin/suma -wx /usr/suma/bin/sm_suma cmd_to_discover_from_stanza _taskidsuma_task_edit_hdr_exec,suma_task_edit_taskid,suma_task_displayname,suma_task_genView or Change an Existing SUMA Tasksuma.cat/usr/suma/bin/suma -x /usr/suma/bin/sm_suma cmd_to_discover_from_stanza _taskidsuma_task_new_hdr_sched,suma_task_edit_taskid,suma_task_displayname,suma_task_gen,suma_task_notify,suma_task_schedView or Change an Existing SUMA Tasksuma.cat/usr/suma/bin/suma -a Repeats=y /usr/suma/bin/sm_suma cmd_to_discover_from_stanza _taskidsuma_task_new_hdr_onetime,suma_task_edit_taskid,suma_task_displayname,suma_task_gen,suma_task_sched,suma_task_notifyView or Change an Existing SUMA Tasksuma.cat/usr/suma/bin/suma -a Repeats=n /usr/suma/bin/sm_suma cmd_to_discover_from_stanza _taskidsuma_task_edit_hdr_saveo,suma_task_edit_taskid,suma_task_displayname,suma_task_genView or Change an Existing SUMA Tasksuma.cat/usr/suma/bin/suma -w /usr/suma/bin/sm_suma cmd_to_discover_from_stanza _taskidsuma_task_delete_optsRemove a SUMA Tasksuma.cat/usr/suma/bin/suma View All SUMA Taskssuma.cat/usr/suma/bin/suma -Lsuma_task_gen,suma_task_notifyView/Change SUMA Task Defaultssuma.cat/usr/suma/bin/suma -D/usr/suma/bin/sm_suma cmd_to_discover_from_stanza defaultsuma_config_base_optsBase Configurationsuma.cat/usr/suma/bin/suma -c/usr/suma/bin/sm_suma cmd_to_discover_from_stanza configView All Saved Email Addressessuma.cat/usr/suma/bin/suma -nsuma_notify_remove_optsRemove a Saved Email Addresssuma.cat/usr/suma/bin/suma -ndViewLastdcoView Last Boot Parameterssm_tune.catcat /etc/tunables/lastbootViewLastLogdcoView Last Boot Log Filesm_tune.catcat /etc/tunables/lastboot.logSaveAllCurNBdcoSave All Current Parameters for Next Bootsm_tune.cat/usr/sbin/tunsave -a -F nextbootSaveAllCurdcoSave All Current Parameterssm_tune.cat/usr/sbin/tunsave -aRestAllLastdcoRestore All Current Parameters from Last Bootsm_tune.cat/usr/sbin/tunrestore -f lastbootRestAllSavedGetList of Saved Values/usr/sbin/tunrestore -fRestAllDfltdcoReset All Current Parameters to Default Valuesm_tune.cat/usr/sbin/tundefaultSaveAllNBdcoSave All Next Boot Parameterssm_tune.cat function tuncopy { cp /etc/tunables/nextboot /etc/tunables/$1 } tuncopyRestAllNBLastdcoRestore All Next Boot Parameters from Last Boot Valuessm_tune.cat/usr/sbin/tunrestore -r -f lastbootRestAllNBSavedGetList of Saved Values/usr/sbin/tunrestore -r -f RestAllNBDfltdcoReset All Next Boot Parameters to Default Valuesm_tune.cat/usr/sbin/tundefault -rListAllSchedodcoList All Characteristics of Current Parameterssm_tune.catschedo -LChShCurSchedodcoChange/Show Current Scheduler & Memory Load Control Parameterssm_tune.cat/usr/lib/perf/sm_setcurrent -t schedo /usr/lib/perf/sm_getfield -n 2 -t schedoChShSchedoNBdcoChange/Show Scheduler & Memory Load Control Parameters for Next Bootsm_tune.catschedo -r/usr/lib/perf/sm_getfield -n 4 -t schedo SaveSchedoNBdcoSave Current Scheduler & Memory Load Control Parameters for Next Boot/usr/sbin/tunsave -a -F nextboot -t schedoResetCurDfltSchedodcoReset Current Parameters to Default Value/usr/sbin/tundefault -t schedoResetNBDfltSchedodcoReset Next Boot Parameters to Default Value/usr/sbin/tundefault -r -t schedoListAllVMdcoList All Characteristics of Current Parametersvmo -LChShCurVMdcoChange/Show Current VM Manager, File System and LV Manager Parameterssm_tune.cat/usr/lib/perf/sm_setcurrent -t vmo /usr/lib/perf/sm_getfield -n 2 -t vmoChShVMNBdcoChange/Show VM Manager, File System and LV Manager Parameters for Next Bootsm_tune.catvmo -r/usr/lib/perf/sm_getfield -n 4 -t vmoSaveVMNBdcoSave Current VM Manager, File System and LV Manager Parameters for Next Boot/usr/sbin/tunsave -a -F nextboot -t vmoResetCurDfltVMdcoReset Current VM Manager, File System and LV Manager Parameters to Default Value/usr/sbin/tundefault -t vmoResetNBDfltVMdcoReset Next Boot VM Manager, File System and LV Manager Parameters to Default Value/usr/sbin/tundefault -r -t vmoListAllNetdcoList All Characteristics of Current Parametersno -LChShCurNetdcoChange/Show Current Network Option Parameterssm_tune.cat/usr/lib/perf/sm_setcurrent -t no /usr/lib/perf/sm_getfield -n 2 -t no ChShNetNBdcoChange/Show Network Option Parameters for Next Bootsm_tune.catno -r/usr/lib/perf/sm_getfield -n 4 -t no SaveNetNBdcoSave Current Network Option Parameters for Next Boot/usr/sbin/tunsave -a -F nextboot -t noResetCurDfltNetdcoReset Current Network Option Parameters to Default Value/usr/sbin/tundefault -t noResetNBDfltNetdcoReset Next Boot Network Option Parameters to Default Value/usr/sbin/tundefault -r -t noListAllNFSdcoList All Characteristics of Current Parametersnfso -LChShCurNFSdcoChange/Show Current NFS Parameterssm_tune.cat/usr/lib/perf/sm_setcurrent -t nfso /usr/lib/perf/sm_getfield -n 2 -t nfso ChShNFSNBdcoChange/Show NFS Parameters for Next Bootsm_tune.catnfso -r/usr/lib/perf/sm_getfield -n 4 -t nfso SaveNFSNBdcoSave Current NFS Parameters for Next Boot/usr/sbin/tunsave -a -F nextboot -t nfsoResetCurDfltNFSdcoReset Current NFS Parameters to Default Value/usr/sbin/tundefault -t nfsoResetNBDfltNFSdcoReset Next Boot NFS Parameters to Default Value/usr/sbin/tundefault -r -t nfsoListAllIOdcoList All Characteristics of Current Parametersioo -LChShCurIOdcoChange/Show Current IO Parameterssm_tune.cat/usr/lib/perf/sm_setcurrent -t ioo /usr/lib/perf/sm_getfield -n 2 -t iooChShIONBdcoChange/Show IO Parameters for Next Bootsm_tune.catioo -r/usr/lib/perf/sm_getfield -n 4 -t ioo SaveIONBdcoSave Current IO Parameters for Next Boot/usr/sbin/tunsave -a -F nextboot -t iooResetCurDfltIOdcoReset Current IO Parameters to Default Value/usr/sbin/tundefault -t iooResetNBDfltIOdcoReset Next Boot IO Parameters to Default Value/usr/sbin/tundefault -r -t iooListAllRAdcoList All Characteristics of Current Parametersraso -LChShCurRAdcoChange/Show Current RAS Parameterssm_tune.cat/usr/lib/perf/sm_setcurrent -t raso /usr/lib/perf/sm_getfield -n 2 -t rasoChShRANBdcoChange/Show RAS Parameters for Next Bootsm_tune.catraso -r/usr/lib/perf/sm_getfield -n 4 -t raso SaveRANBdcoSave Current RAS Parameters for Next Boot/usr/sbin/tunsave -a -F nextboot -t rasoResetCurDfltRAdcoReset Current RAS Parameters to Default Value/usr/sbin/tundefault -t rasoResetNBDfltRAdcoReset Next Boot RAS Parameters to Default Value/usr/sbin/tundefault -r -t rasoListAllSchedodcoDevList All Characteristics of Current Development Parameterssm_tune.catschedo -FLChShCurSchedodcoDevChange/Show Current Scheduler & Memory Load Control Dev Parameterssm_tune.cat/usr/lib/perf/sm_setcurrent -t schedo /usr/lib/perf/sm_getfield -n 2 -t schedo" -F"ChShSchedoNBdcoDevChange/Show Scheduler & Memory Load Control Dev Parameters for Next Bootsm_tune.catschedo -r/usr/lib/perf/sm_getfield -n 4 -t schedo" -F" SaveSchedoNBdcoDevSave Current Scheduler & Memory Load Control Parameters for Next Boot/usr/sbin/tunsave -a -F nextboot -t schedoResetCurDfltSchedodcoDevReset Current Parameters to Default Value/usr/sbin/tundefault -t schedoResetNBDfltSchedodcoDevReset Next Boot Parameters to Default Value/usr/sbin/tundefault -r -t schedoListAllVMdcoDevList All Characteristics of Current Development Parametersvmo -FLChShCurVMdcoDevChange/Show Current VM Manager, File System and LV Manager Dev Parameterssm_tune.cat/usr/lib/perf/sm_setcurrent -t vmo /usr/lib/perf/sm_getfield -n 2 -t vmo" -F"ChShVMNBdcoDevChange/Show VM Manager, File System and LV Manager Dev Parameters for Next Bootsm_tune.catvmo -r/usr/lib/perf/sm_getfield -n 4 -t vmo" -F"SaveVMNBdcoDevSave Current VM Manager, File System and LV Manager Parameters for Next Boot/usr/sbin/tunsave -a -F nextboot -t vmoResetCurDfltVMdcoDevReset Current VM Manager, File System and LV Manager Parameters to Default Value/usr/sbin/tundefault -t vmoResetNBDfltVMdcoDevReset Next Boot VM Manager, File System and LV Manager Parameters to Default Value/usr/sbin/tundefault -r -t vmoListAllNetdcoDevList All Characteristics of Current Development Parametersno -FLChShCurNetdcoDevChange/Show Current Network Option Development Parameterssm_tune.cat/usr/lib/perf/sm_setcurrent -t no /usr/lib/perf/sm_getfield -n 2 -t no" -F" ChShNetNBdcoDevChange/Show Network Option Development Parameters for Next Bootsm_tune.catno -r/usr/lib/perf/sm_getfield -n 4 -t no" -F" SaveNetNBdcoDevSave Current Network Option Parameters for Next Boot/usr/sbin/tunsave -a -F nextboot -t noResetCurDfltNetdcoDevReset Current Network Option Parameters to Default Value/usr/sbin/tundefault -t noResetNBDfltNetdcoDevReset Next Boot Network Option Parameters to Default Value/usr/sbin/tundefault -r -t noListAllNFSdcoDevList All Characteristics of Current Development Parametersnfso -FLChShCurNFSdcoDevChange/Show Current NFS Development Parameterssm_tune.cat/usr/lib/perf/sm_setcurrent -t nfso /usr/lib/perf/sm_getfield -n 2 -t nfso" -F" ChShNFSNBdcoDevChange/Show NFS Development Parameters for Next Bootsm_tune.catnfso -r/usr/lib/perf/sm_getfield -n 4 -t nfso" -F" SaveNFSNBdcoDevSave Current NFS Parameters for Next Boot/usr/sbin/tunsave -a -F nextboot -t nfsoResetCurDfltNFSdcoDevReset Current NFS Parameters to Default Value/usr/sbin/tundefault -t nfsoResetNBDfltNFSdcoDevReset Next Boot NFS Parameters to Default Value/usr/sbin/tundefault -r -t nfsoListAllIOdcoDevList All Characteristics of Current Development Parametersioo -FLChShCurIOdcoDevChange/Show Current IO Development Parameterssm_tune.cat/usr/lib/perf/sm_setcurrent -t ioo /usr/lib/perf/sm_getfield -n 2 -t ioo" -F"ChShIONBdcoDevChange/Show IO Development Parameters for Next Bootsm_tune.catioo -r/usr/lib/perf/sm_getfield -n 4 -t ioo" -F" SaveIONBdcoDevSave Current IO Parameters for Next Boot/usr/sbin/tunsave -a -F nextboot -t iooResetCurDfltIOdcoDevReset Current IO Parameters to Default Value/usr/sbin/tundefault -t iooResetNBDfltIOdcoDevReset Next Boot IO Parameters to Default Value/usr/sbin/tundefault -r -t iooListAllRAdcoDevList All Characteristics of Current Development Parametersraso -FLChShCurRAdcoDevChange/Show Current RAS Development Parameterssm_tune.cat/usr/lib/perf/sm_setcurrent -t raso /usr/lib/perf/sm_getfield -n 2 -t raso" -F"ChShRANBdcoDevChange/Show RAS Development Parameters for Next Bootsm_tune.catraso -r/usr/lib/perf/sm_getfield -n 4 -t raso" -F" SaveRANBdcoDevSave Current RAS Parameters for Next Boot/usr/sbin/tunsave -a -F nextboot -t rasoResetCurDfltRAdcoDevReset Current RAS Parameters to Default Value/usr/sbin/tundefault -t rasoResetNBDfltRAdcoDevReset Next Boot RAS Parameters to Default Value/usr/sbin/tundefault -r -t rasoListAllAsodcoList All Characteristics of Current Parametersasoo -LChShCurAsodcoChange/Show Current ASO Parameterssm_tune.cat/usr/lib/perf/sm_setcurrent -t asoo /usr/lib/perf/sm_getfield -n 2 -t asooChShAsoNBdcoChange/Show ASO Parameters for Next Bootsm_tune.catasoo -r/usr/lib/perf/sm_getfield -n 4 -t asoo SaveAsoNBdcoSave Current ASO Parameters for Next Boot/usr/sbin/tunsave -a -F nextboot -t asoo ResetCurDfltAsodcoReset Current ASO Parameters to Default Value/usr/sbin/tundefault -t asooResetNBDfltAsodcoReset Next Boot ASO Parameters to Default Value/usr/sbin/tundefault -r -t asooesa_company,esa_service_contact,esa_name,esa_email,esa_tele_number,sec_esa_name,sec_esa_email,sec_esa_tele_number,esa_contact_country,esa_system_location,esa_system_tele_number,esa_system_country,esa_system_address,esa_system_city,esa_system_state,esa_system_zip,esa_system_building,esa_ibmid,esa_oper,esa_portConfiguring Electronic Service Agentesa.cat/usr/esa/bin/activator -c /usr/esa/bin/activator -d Starting Electronic Service Agentesa.catstartsrc -s IBM.ESAGENTStopping Electronic Service Agentesa.catstopsrc -s IBM.ESAGENTUnconfiguring Electronic Service Agentesa.cat/usr/esa/sbin/unconfig.shVerify Electronic Service Agent Connectivityesa.cat/usr/esa/bin/verifyConnectivity -tDisplay Current Cluster Security Configurationsmit.cat/usr/sbin/savesecconf -eDisable Current Cluster Security Configurationsmit.cat/usr/sbin/savesecconf -l 0Default Cluster Security Configuration with AES Symmetric key and Self-Signed Certificatesmit.cat/usr/sbin/savesecconf -l 2clustsec_advance_optAdvanced Cluster Security Configurationsmit.cat/usr/sbin/savesecconf -l 2 /usr/sbin/savesecconf -z_mkinetclAdd a Cluster Pseudo Network Interfacesmit.catmkdev -c if -s pseudo -t cl_chinetclChange / Show a Cluster Pseudo Interfacesmit.catfunction cmd_to_exec { eval chdev $* } cmd_to_execfunction cmd_to_discover { lsattr -E -l $1 -O } cmd_to_discover_rawnamesetup_eznim_master_optEasy NIM - Setup the NIM Master environmentcmdnim.catcall_nim_master_setup() { OPTIONS= while getopts s:v:f:BFV option do case $option in s) SRC=$OPTARG;; v) VG=$OPTARG;; f) FS=$OPTARG;; B) OPTIONS="$OPTIONS -B";; F) OPTIONS="$OPTIONS -F";; V) OPTIONS="$OPTIONS -v";; esac done if [[ $SRC = cd* ]] then SRC="/dev/$SRC" fi nim_master_setup -a device=$SRC -a volume_group=$VG -a file_system=$FS ${OPTIONS} exit $? } call_nim_master_setupupdate_eznim_master_optEasy NIM - Add fixes to the NIM Master environmentcmdnim.catcall_nim_update_all() { no_update= while getopts s:u: option do case $option in s) SRC=$OPTARG;; u) UPDATE=$OPTARG;; esac done if [[ $SRC = cd* ]] then SRC="/dev/$SRC" fi if [[ $UPDATE = no ]] then no_update="-u" fi # run eznim method with appropriate function /usr/lpp/bos.sysmgt/nim/methods/eznim perform_update $SRC $no_update if [[ $? -ne 0 ]] then return -1 fi } call_nim_update_allupdate_client_eznim_optEasy NIM - Update clientscmdnim.catupdate_eznim_clients_only() { CLIENTS=$@ # perform update_all using lpp_source from resource group /usr/sbin/nim -o cust -a fixes=update_all -a group=basic_res_grp ${CLIENTS} 2>&1 exit $? } update_eznim_clients_onlybackup_client_eznim_optEasy NIM - Backup a clientcmdnim.catcall_eznim_backup_client() { # run eznim method with appropriate function /usr/lpp/bos.sysmgt/nim/methods/eznim create_backup $@ if [[ $? -ne 0 ]] then return -1 fi } call_eznim_backup_clientreinstall_client_eznim_optEasy NIM - Reinstall clientscmdnim.catcall_nim_clients_setup () { CLIENTS= MKSYSB= OPTIONS= while getopts c:m:rn option do case $option in c) CLIENTS="$OPTARG";; m) MKSYSB="-m $OPTARG";; r) OPTIONS="$OPTIONS -r";; n) OPTIONS="$OPTIONS -n";; esac done nim_clients_setup ${MKSYSB} ${OPTIONS} ${CLIENTS} exit $? } call_nim_clients_setupreset_client_eznim_optEasy NIM - Reset clientscmdnim.catreset_eznim_clients() { CLIENTS=$@ # reset & deallocate resources from clients /usr/sbin/nim -Fo reset ${CLIENTS} /usr/sbin/nim -Fo deallocate -a subclass=all ${CLIENTS} exit } reset_eznim_clientsEasy NIM - Show the NIM environmentcmdnim.cat/usr/lpp/bos.sysmgt/nim/methods/eznim show_eznim_envremove_nim_env_eznim_optEasy NIM - Remove the NIM environmentcmdnim.catrm_eznim_env() { FLAG=$1 # run eznim method with appropriate function /usr/lpp/bos.sysmgt/nim/methods/eznim remove_eznim_env ${FLAG} if [[ $? -ne 0 ]] then return -1 fi } rm_eznim_envsetup_eznim_client_optEasy NIM - Client Configurationcmdnim.catcall_niminit() { LINE= RING_SPEED= CABLE_TYPE= PIF_NAME= while getopts n:i:m:k: option do case $option in n) LINE="$LINE -aname=$OPTARG";; i) PIF_NAME=$OPTARG LINE="$LINE -apif_name=$PIF_NAME";; m) LINE="$LINE -amaster=$OPTARG";; k) LINE="$LINE -anetboot_kernel=$OPTARG";; esac done if [[ $PIF_NAME = tr* ]] then RING_SPEED=`mktcpip -S ${PIF_NAME} 2>&1 | awk 'BEGIN { RS="\n"; FS=":" } { for (i=1;i<=NF;i++) { if ( match($i,/speed/) ) (j=i) } if (NR==2){print $j} }'` LINE="$LINE -aring_speed1=$RING_SPEED"; else if [[ $PIF_NAME = e[nt]* ]] then CABLE_TYPE=`mktcpip -S ${PIF_NAME} 2>&1 | awk 'BEGIN { RS="\n"; FS=":" } { for (i=1;i<=NF;i++) { if ( match($i,/type/) ) (j=i) } if (NR==2){print $j} }'` LINE="$LINE -acable_type1=$CABLE_TYPE"; fi fi niminit $LINE exit $? } call_niminitupdate_client_optEasy NIM - Update clientscmdnim.catupdate() { # perform update_all using lpp_source from resource group /usr/sbin/nimclient -o cust -a fixes=update_all -a group=basic_res_grp 2>&1 rc=$? if [[ $rc -ne 0 ]] then . /usr/lpp/bos.sysmgt/nim/methods/cmdnim_errors.shh dspmsg -s ${MSG_SET} cmdnim.cat ${MSG_NO_UPDATES} ' No fixes are available for updating NIM clients. ' fi exit $rc } updatereinstall_eznim_client_optEasy NIM - Reinstall this systemcmdnim.catreinstall() { MKSYSB= SOURCE= while getopts m:n option do case $option in m) MKSYSB=$OPTARG;; n) SOURCE=rte;; esac done # check for resource group - created from nim_master_setup script . /usr/lpp/bos.sysmgt/nim/methods/cmdnim_errors.shh dspmsg -s ${MSG_SET} cmdnim.cat ${MSG_CHK_RES_GRP} ' Checking for resource group %s...' basic_res_grp >/tmp/eznim_$$ /usr/sbin/nimclient -l basic_res_grp >/dev/null 2>/tmp/eznim_$$ if [[ -s /tmp/eznim_$$ ]]; then dspmsg -s ${MSG_SET} cmdnim.cat ${MSG_ERR_RES_GRP} ' The resource group %s is not defined. Please define using desired resources for install - Exiting. ' basic_res_grp exit 1 else # lets make it the default_res for this client /usr/sbin/nimclient -Fo change -a default_res=basic_res_grp dspmsg -s ${MSG_SET} cmdnim.cat ${MSG_DONE} 'done ' fi # perform install using default_res if [[ -n ${MKSYSB} ]]; then /usr/sbin/nimclient -o allocate -a mksysb=${MKSYSB} fi /usr/sbin/nimclient -o bos_inst -a accept_licenses=yes -a source=${SOURCE:-mksysb} 2>&1 exit $? } reinstallreset_eznim_client_optEasy NIM - Reset clientscmdnim.catreset_client() { # reset client & deallocate resources /usr/sbin/nimclient -Fo reset /usr/sbin/nimclient -Fo deallocate -a subclass=all exit } reset_clientEasy NIM - Show the NIM environmentcmdnim.catshow_env_client() { # display long listing of members in basic_res_grp /usr/sbin/nimclient -l -ml basic_res_grp exit } show_env_clientniminit_optConfigure Network Installation Management Client Filesetcmdnim.catdoit() { LINE= RING_SPEED= CABLE_TYPE= PIF_NAME= SPEED= DUPLEX= NIM_SERVICE= while getopts n:P:i:m:p:c:R:k:s:d:S:V:Y: c do case $c in n) LINE="$LINE -aname=$OPTARG";; P) LINE="$LINE -aplatform=$OPTARG";; i) PIF_NAME=$OPTARG LINE="$LINE -apif_name=$PIF_NAME";; m) LINE="$LINE -amaster=$OPTARG";; p) LINE="$LINE -amaster_port=$OPTARG";; R) LINE="$LINE -aregistration_port=$OPTARG";; k) LINE="$LINE -anetboot_kernel=$OPTARG";; c) COMMENTS="$OPTARG";; s) SPEED="$OPTARG";; d) DUPLEX="$OPTARG";; S) NIM_SERVICE="$OPTARG";; V) VLAN_TAG="$OPTARG";; Y) VLAN_PRI="$OPTARG";; esac done if [[ $(uname -W) -eq 0 ]] then if [[ $PIF_NAME = tr* ]] then RING_SPEED=`mktcpip -S ${PIF_NAME} 2>&1 | awk 'BEGIN { RS="\n"; FS=":" } { for (i=1;i<=NF;i++) { if ( match($i,/speed/) ) (j=i) } if (NR==2){print $j} }'` LINE="$LINE -aring_speed1=$RING_SPEED"; else if [[ $PIF_NAME = e[nt]* ]] then CABLE_TYPE=`mktcpip -S ${PIF_NAME} 2>&1 | awk 'BEGIN { RS="\n"; FS=":" } { for (i=1;i<=NF;i++) { if ( match($i,/type/) ) (j=i) } if (NR==2){print $j} }'` LINE="$LINE -acable_type1=$CABLE_TYPE"; fi fi if [[ -n $SPEED || -n $DUPLEX ]] then NET_SETTINGS="$SPEED $DUPLEX"; fi fi niminit $LINE ${COMMENTS:+-a comments="${COMMENTS}"} ${NET_SETTINGS:+-a net_settings="${NET_SETTINGS}"} ${NIM_SERVICE:+-a connect="${NIM_SERVICE}"} ${VLAN_TAG:+-a vlan_tag="${VLAN_TAG}"} ${VLAN_PRI:+-a vlan_pri="${VLAN_PRI}"} exit $? } doit PLAT=`/usr/sbin/bootinfo -p` echo "#master_port:platform 1058:$PLAT"nim_c_showres_optShow the Contents of a Resourcecmdnim.catshow_resource() { TYPE=`nimclient -l $1 | awk '{print $3}'` if [[ $TYPE = lpp_source ]] then nimclient -o showres -a resource=$1 | cut -c 1-67 else nimclient -o showres -a resource=$1 fi } show_resourcenim_c_inst_latest_opt,nim_c_instflags1_optInstall Softwaresmit.cat/usr/lpp/bos.sysmgt/nim/methods/c_sm_nim cust nim_c_update_all_opt,nim_c_instflags1_optUpdate Installed Software to Latest Level (Update All)smit.cat/usr/lpp/bos.sysmgt/nim/methods/c_sm_nim update_all nim_c_inst_bundle_opt,nim_c_instflags1_optInstall Software Bundlesmit.cat/usr/lpp/bos.sysmgt/nim/methods/c_sm_nim inst_bundle nim_c_updt_by_fix_opt,nim_c_instflags2_optUpdate Software by Fix (APAR)smit.catinst_fix() { FLAGS= while getopts l:o:b:s:f: option do case $option in l) LPP_SOURCE=$OPTARG;; o) FIXES=$OPTARG;; b) FIX_BUNDLE=$OPTARG;; s) SCRIPT=$OPTARG;; f) FLAGS=$FLAGS$OPTARG;; esac done if [[ -n ${FIXES} && -n ${FIX_BUNDLE} ]] then . /usr/lpp/bos.sysmgt/nim/methods/cmdnim_errors.shh; dspmsg -s $MSG_SET cmdnim.cat $MSG_FIXES_BUNDLE_CONFLICT 'You can not specify both FIXES and a FIX_BUNDLE for this operation. ' exit -1 fi if [[ -z ${FIXES} && -z ${FIX_BUNDLE} ]] then . /usr/lpp/bos.sysmgt/nim/methods/cmdnim_errors.shh; dspmsg -s $MSG_SET cmdnim.cat $MSG_FIXES_BUNDLE_MISSING 'You must specify either FIXES or a FIX_BUNDLE for this operation. ' exit -1 fi [[ -n ${FLAGS} ]] && FLAGS=a${FLAGS} # Check for simple errors in installp flag combinations. /usr/lpp/bos.sysmgt/nim/methods/c_sm_nim chk_installp_flags_smit ${FLAGS} if [[ $? -ne 0 ]] then return -1 fi nimclient -o cust -a lpp_source=${LPP_SOURCE} ${FIXES:+-a fixes="$FIXES"} ${FIX_BUNDLE:+-a fix_bundle=$FIX_BUNDLE} ${SCRIPT:+-a script=$SCRIPT} ${FLAGS:+-a installp_flags=-$FLAGS} } inst_fixnim_c_inst_all_optInstall and Update from ALL Available Softwaresmit.cat/usr/lpp/bos.sysmgt/nim/methods/c_sm_nim cust nim_c_bosinst_optReinstall the Base Operating Systemcmdnim.catbosinst() { FLAGS= INSTALLP_BUNDLE= while getopts r:p:l:m:b:i:x:s:F:v:Lcn:o:f:edj option do case $option in r) SOURCE=$OPTARG;; p) SPOT=$OPTARG;; l) LPP_SOURCE=$OPTARG;; m) MKSYSB=$OPTARG;; b) BOSINST_DATA=$OPTARG;; i) IMAGE_DATA=$OPTARG;; s) SCRIPT=$OPTARG;; F) FB_SCRIPT=$OPTARG;; v) RESOLV_CONF=$OPTARG;; L) ACCEPT_LICENSES=yes;; c) NO_NIM_CLIENT=yes;; n) INSTALLP_BUNDLE=$INSTALLP_BUNDLE" -a installp_bundle=$OPTARG";; o) FILESETS=$OPTARG;; f) FLAGS=$FLAGS$OPTARG;; e) NO_CLIENT_BOOT=yes;; d) SET_BOOTLIST=yes;; j) PRESERVE_RES=yes;; esac done [[ -n ${FLAGS} ]] && FLAGS=a${FLAGS} # Check for simple errors in installp flag combinations. /usr/lpp/bos.sysmgt/nim/methods/c_sm_nim chk_installp_flags_smit ${FLAGS} if [[ $? -ne 0 ]] then return -1 fi if [[ -n $FILESETS ]] then INSTALLP_BUNDLE= fi nimclient -o bos_inst -a source=${SOURCE} -a spot=${SPOT} ${LPP_SOURCE:+-a lpp_source=$LPP_SOURCE} ${MKSYSB:+-a mksysb=$MKSYSB} ${BOSINST_DATA:+-a bosinst_data=$BOSINST_DATA} ${IMAGE_DATA:+-a image_data=$IMAGE_DATA} ${SCRIPT:+-a script=$SCRIPT} ${FB_SCRIPT:+-a fb_script=$FB_SCRIPT} ${RESOLV_CONF:+-a resolv_conf=$RESOLV_CONF} ${ACCEPT_LICENSES:+-a accept_licenses=$ACCEPT_LICENSES} ${NO_NIM_CLIENT:+-a no_nim_client=$NO_NIM_CLIENT} ${INSTALLP_BUNDLE:+$INSTALLP_BUNDLE} ${FILESETS:+-a filesets="$FILESETS"} ${FLAGS:+-a installp_flags=-$FLAGS} ${NO_CLIENT_BOOT:+-a no_client_boot=$NO_CLIENT_BOOT} ${SET_BOOTLIST:+-a set_bootlist=$SET_BOOTLIST} ${PRESERVE_RES:+-a preserve_res=$PRESERVE_RES} } bosinstnim_c_list_bundle_optList Filesets in a Bundlesmit.catlist_bundle() { while getopts b: option do case $option in b) INSTALLP_BUNDLE=$OPTARG;; esac done nimclient -o showres -a resource=${INSTALLP_BUNDLE} } list_bundlenim_c_list_sw_optList Software on Installation Mediasmit.catlist_sw() { FLAGS= while getopts l: option do case $option in l) LPP_SOURCE=$OPTARG;; esac done nimclient -o showres -a installp_flags=l -a resource=${LPP_SOURCE} } list_sw nim_c_list_fixes_optList Software Fixes (APARs) on Installation Mediasmit.catlist_fixes() { while getopts l: option do case $option in l) LPP_SOURCE=$OPTARG;; esac done nimclient -o showres -a instfix_flags=T -a resource=${LPP_SOURCE} } list_fixes nim_c_list_info_optList Supplemental Fileset Information on Installation Mediasmit.catlist_info() { while getopts l:o: option do case $option in l) LPP_SOURCE=$OPTARG;; o) FILESETS=$OPTARG;; esac done nimclient -o showres -a installp_flags=qi ${FILESETS:+-a filesets="$FILESETS"} -a resource=${LPP_SOURCE} } list_info nim_perms_optManage Network Install Permissionscmdnim.catnimclient $1nim_config_services_optConfigure Client Communication Servicescmdnim.catconfig_services() { ENABLE_SSL= INSTALL_OPT= INSTALLP_LOC=/dev/cd0 SEC_PORT= PORT_RANGE=0 CLIENT_SERVICE= while getopts e:i:l:p:r:S:L:A: option do case $option in e) ENABLE_SSL=$OPTARG;; i) INSTALL_OPT=$OPTARG;; l) INSTALLP_LOC=$OPTARG;; p) SEC_PORT=$OPTARG;; r) PORT_RANGE=$OPTARG;; S) CLIENT_SERVICE=$OPTARG;; L) lpp_res=$OPTARG;; A) alternate_master=$OPTARG;; esac done # check ssl_support of NIM master if [[ ${ENABLE_SSL} = yes ]]; then /usr/sbin/nimclient -l -a ssl_support master | grep -qw yes if [[ $? -ne 0 ]]; then dspmsg -s 1 cmdnim.cat 315 '0042-315 %s: No authentication methods are configured. ' master return -1 fi fi # if requested - install OpenSSL INSTALLP pkg if [[ ${INSTALL_OPT} = yes ]] && [[ -n ${lpp_res} ]] then /usr/sbin/nimclient -o cust -a lpp_source=$lpp_res -a filesets="I:openssl" [[ $? -ne 0 ]] && return -1 elif [[ ${INSTALL_OPT} = yes ]] && [[ -n ${INSTALLP_LOC} ]] then /usr/sbin/installp -gaXYd ${INSTALLP_LOC} openssl [[ $? -ne 0 ]] && return -1 fi # configure env file BEFORE calling nimsh daemon if [[ ${CLIENT_SERVICE} = nimsh ]] && [[ -n ${SEC_PORT} ]]; then grep -v NIM_SECONDARY_PORT /etc/environment >/tmp/nim_etc_env$$ echo NIM_SECONDARY_PORT=${SEC_PORT}:${PORT_RANGE} >>/tmp/nim_etc_env$$ cp /tmp/nim_etc_env$$ /etc/environment [[ $? -ne 0 ]] && return -1 rm -f /tmp/nim_etc_env$$ fi # re-initialize the NIM client - # (service change requires new niminfo file) rmitab nimsh 2>/dev/null . /etc/niminfo rm /etc/niminfo niminit -aname=$NIM_NAME -amaster=$NIM_MASTER_HOSTNAME -amaster_port=$NIM_MASTER_PORT -aregistration_port=$NIM_REGISTRATION_PORT -aconnect=$CLIENT_SERVICE [[ $? -ne 0 ]] && return -1 # if requested - start daemon in SSL auth mode if [[ ${CLIENT_SERVICE} = nimsh ]] && [[ ${ENABLE_SSL} = yes ]]; then nimclient -c [[ $? -ne 0 ]] && return -1 fi # Get SSL key from alternate master if [[ ${CLIENT_SERVICE} = nimsh ]] && [[ ${ENABLE_SSL} = yes ]] && [[ -n $alternate_master ]]; then /usr/sbin/nimclient -o get_cert -a master_name=$alternate_master if [[ $? -ne 0 ]]; then dspmsg -s 1 cmdnim.cat 315 '0042-315 %s: No authentication methods are configured. ' master return -1 fi fi return $? } config_servicesList Allocated Network Install Resourcescmdnim.catlist_res() { . /etc/niminfo nimclient -l -c resources ${NIM_NAME} exit $? } list_resnim_c_alloc_optAllocate Network Install Resourcescmdnim.catalloc_res() { . /etc/niminfo [[ $# -le 0 ]] && exit 0 nimclient -l -L ${NIM_NAME} >/tmp/$$ if [[ -s /tmp/$$ ]] then set -- $* while [[ $# -gt 0 ]] do attr=`awk -v r=$1 '$1==r {print "-a " $2 "=" $1}' /tmp/$$` [[ -n "$attr" ]] && LINE="$LINE $attr" shift done fi rm /tmp/$$ 2>/dev/null [[ -n "$LINE" ]] && nimclient -o allocate $LINE exit $? } alloc_resnim_c_dealloc_optDeallocate Network Install Resourcescmdnim.catdealloc_res() { . /etc/niminfo [[ $# -le 0 ]] && exit 0 LINE= nimclient -l -c resources ${NIM_NAME} >/tmp/$$ if [[ -s /tmp/$$ ]] then set $* while [[ $# -gt 0 ]] do attr=`awk -v r=$1 '$1==r {print "-a " $2 "=" $1}' /tmp/$$` [ -n "$attr" ] && LINE="$LINE $attr" shift done fi rm /tmp/$$ 2>/dev/null [[ -n "$LINE" ]] && nimclient -o deallocate $LINE exit $? } dealloc_resnim_c_installp_flags,nim_install_com,nim_install_options,nim_c_fixes,nim_cust_spec_flags,nim_lku_opt3Perform a Network Installcmdnim.catinst_op() { LIVE_UPDATE= while getopts f:o:k:Lu c do case $c in f) FLAGS=$FLAGS$OPTARG;; o) OPTIONS=$OPTARG;; k) FIXES=$OPTARG;; L) FLAGS=Y${FLAGS};; u) LIVE_UPDATE="-a live_update=yes";; esac done [[ -n ${FLAGS} ]] && FLAGS=a${FLAGS} [[ ${FLAGS} = *N* ]] && [[ ${FLAGS} != *c* ]] && FLAGS=c${FLAGS} # Check for simple errors in installp flag combinations. /usr/lpp/bos.sysmgt/nim/methods/c_sm_nim chk_installp_flags_smit ${FLAGS} if [[ $? -ne 0 ]] then return -1 fi nimclient -o cust ${FLAGS:+-a installp_flags=-"$FLAGS"} ${OPTIONS:+-a filesets="$OPTIONS"} ${FIXES:+-a fixes="$FIXES"} ${LIVE_UPDATE} exit $? } inst_opnim_update_all_flags,nim_update_all_com,nim_c_installp_flags,nim_up_all_spec_flags,nim_lku_opt3Perform a Network Installcmdnim.catinst_op() { LIVE_UPDATE= while getopts f:u c do case $c in f) FLAGS=$FLAGS$OPTARG;; u) LIVE_UPDATE="-a live_update=yes";; esac done [[ -n ${FLAGS} ]] && FLAGS=a${FLAGS} # Check for simple errors in installp flag combinations. /usr/lpp/bos.sysmgt/nim/methods/c_sm_nim chk_installp_flags_smit ${FLAGS} if [[ $? -ne 0 ]] then return -1 fi nimclient -o cust ${FLAGS:+-a installp_flags=-"$FLAGS"} ${LIVE_UPDATE} -afixes=update_all exit $? } inst_opnim_bos_inst_opt,nim_install_flags,nim_install_com,nim_install_options,nim_c_mac_stay_clientPerform a Network Installcmdnim.catinst_op() { while getopts f:o:s:nL c do case $c in f) FLAGS=$OPTARG;; o) OPTIONS=$OPTARG;; s) SOURCE=$OPTARG;; n) NO_NIM_CLIENT="-a no_nim_client=yes";; L) ACCEPT_LICENSES="-a accept_licenses=yes";; esac done # Check for simple errors in installp flag combinations. /usr/lpp/bos.sysmgt/nim/methods/c_sm_nim chk_installp_flags_list ${FLAGS} if [[ $? -ne 0 ]] then return -1 fi nimclient -o bos_inst ${FLAGS:+-a installp_flags="$FLAGS"} ${OPTIONS:+-a filesets="$OPTIONS"} ${SOURCE:+-a source=$SOURCE} ${ACCEPT_LICENSES} ${NO_NIM_CLIENT} exit $? } inst_opecho "#source:installp_flags rte:-aXg"Reset the NIM State of a Machinecmdnim.catnimclient -Fo resetEnable Diagnostic Bootcmdnim.catnimclient -o diagEnable Diagnostic Bootcmdnim.catnimclient -o diagEnable Maintenance Bootcmdnim.catnimclient -o maint_bootReset the NIM State of a Machinecmdnim.catnimclient -Fo resetnim_install_com,nim_c_installp_flags,nim_cust_spec_flags,nim_c_accept_flagPerform a Network Installcmdnim.catinst_op() { while getopts f: c do case $c in f) FLAGS=$FLAGS$OPTARG;; esac done [[ -n ${FLAGS} ]] && FLAGS=a${FLAGS} [[ ${FLAGS} = *N* ]] && [[ ${FLAGS} != *c* ]] && FLAGS=c${FLAGS} # Check for simple errors in installp flag combinations. /usr/lpp/bos.sysmgt/nim/methods/c_sm_nim chk_installp_flags_smit ${FLAGS} if [[ $? -ne 0 ]] then return -1 fi nimclient -o cust ${FLAGS:+-a installp_flags="$FLAGS"} exit $? } inst_opnim_bos_inst_opt,nim_install_flags,nim_install_com,nim_install_options,nim_c_mac_stay_clientPerform a Network Installcmdnim.catinst_op() { FLAGS= OPTIONS= SOURCE= NO_NIM_CLIENT= ACCEPT_LICENSES= while getopts f:o:s:nL c do case $c in f) FLAGS=$OPTARG;; o) OPTIONS=$OPTARG;; s) SOURCE=$OPTARG;; n) NO_NIM_CLIENT="-a no_nim_client=yes";; L) ACCEPT_LICENSES="-a accept_licenses=yes";; esac done # Check for simple errors in installp flag combinations. /usr/lpp/bos.sysmgt/nim/methods/c_sm_nim chk_installp_flags_list ${FLAGS} if [[ $? -ne 0 ]] then return -1 fi nimclient -o bos_inst ${FLAGS:+-a installp_flags="$FLAGS"} ${OPTIONS:+-a filesets="$OPTIONS"} ${SOURCE:+-a source=$SOURCE} ${ACCEPT_LICENSES} ${NO_NIM_CLIENT} exit $? } inst_opecho "#source:installp_flags rte:-aXg"nim_install_com,nim_c_restvg_optRestore a Volume Group on Standalone Clientcmdnim.catinst_op() { while getopts N:f:sD:nP:b:d:r option do case $option in N) NAME=$OPTARG;; f) SAVEVG=$OPTARG;; s) SHRINK=-ashrink=yes;; D) DISK=$OPTARG;; n) MAP=-amap=no;; P) PARTITION=$OPTARG;; b) BLOCK=$OPTARG;; d) VG_DATA=$OPTARG;; r) VG_DATA_ONLY=-avg_data_only=yes;; esac done nimclient -o restvg ${SAVEVG:+-a savevg="$SAVEVG"} ${SHRINK} ${MAP} ${DISK:+-a disk="$DISK"} ${PARTITION:+-a partition="$PARTITION"} ${BLOCK:+-a block="$BLOCK"} ${VG_DATA:+-a vg_data="$VG_DATA"} ${VG_DATA_ONLY} exit $? } inst_opnim_client_node_inst_optConfigure Client as Master for Virtual I/O Server and Integrated Virtualization Manager Installationcmdnim.cat/usr/sbin/installiosmkts_opt,ts_cosi_name_optMake Thin Servercmdnim.cat/usr/sbin/mktsswts_opt,ts_server_name_opt,ts_cosi_name_optSwitch Thin Server to New Common OS Imagecmdnim.cat/usr/sbin/swtsts_server_name_opt,tscosi_level_detail_optGet Thin Server Statuscmdnim.cat/usr/sbin/lststs_server_name_optDebug Boot Thin Servercmdnim.cat/usr/sbin/dbtsts_server_name_opt,tscosi_force_optRemove Thin Servercmdnim.cat/usr/sbin/rmtscosi_name_opt,cosi_source_opt,cosi_server_opt,cosi_location_optMake Common OS Imagecmdnim.cat/usr/sbin/mkcosicosi_name_opt,cpcosi_opt,cosi_server_opt,cosi_location_optClone Common OS Imagecmdnim.cat/usr/sbin/cpcosicosi_name_list_opt,cosi_source_opt,chcosi_opt,cosi_commit_optInstall Software to Common OS Imagecmdnim.cat/usr/sbin/chcosi -icosi_name_list_opt,cosi_source_opt,chcosi_opt,cosi_commit_optUpdate Software to Common OS Imagecmdnim.cat/usr/sbin/chcosi -ucosi_name_list_opt,chcosi_optCommit Software on Common OS Imagecmdnim.cat/usr/sbin/chcosi -ccosi_name_list_opt,chcosi_optReject Software on Common OS Imagecmdnim.cat/usr/sbin/chcosi -jcosi_name_list_opt,chcosi_optRemove Software on Common OS Imagecmdnim.cat/usr/sbin/chcosi -rcosi_name_list_opt,tscosi_level_detail_optGet Common OS Image Statuscmdnim.cat/usr/sbin/lscosicosi_name_list_opt,tscosi_force_optRemove Common OS Imagecmdnim.cat/usr/sbin/rmcosiSwitch Thin Server to New Common OS Imagecmdnim.cat/usr/sbin/swtsDebug Boot Thin Servercmdnim.cat/usr/sbin/dbtsUpdateHmcInfoDummyChange/Show HMC Informationecho $(dspmsg pm_ext.cat -s 1 16 'PM Service is not supported inside WPAR')UpdateHmcInfoDummyChange/Show HMC Informationecho $(dspmsg pm_ext.cat -s 1 22 'PM Service is not supported inside P8')UpdateHmcInfo_idChange/Show HMC Informationpm_ext.cat/var/perf/pm/bin/config_pm_ext.sh -H yx() { PMCONF=/var/perf/pm/config/pmconf if [[ -f ${PMCONF} ]] then Hmc_Name_PM=`/usr/bin/grep Hmc_Name_PM ${PMCONF} | cut -d ':' -f 2-10 | sed 's/:/#!:/g'` Hmc_User_PM=`/usr/bin/grep 'Hmc_User_PM' ${PMCONF} | cut -d ':' -f 2-10 | sed 's/:/#!:/g'` fi Hmc_User_PM=pmaixusr echo "#Hmc_Name_PM:Hmc_User_PM" echo "${Hmc_Name_PM}:${Hmc_User_PM}" } yxCrossLparInfo_idChange/Show Cross Lpar Intervalpm_ext.cat/var/perf/pm/bin/config_pm_ext.sh -C /var/perf/pm/bin/config_pm_ext.sh -c /usr/bin/X11/xinstallm -ez &/usr/bin/X11/xinstallm &Set Up for Adding Concurrent-Use and Use-Once Licensessmit.catlicense_passwd () { # Set variables for message numbers. These must match the values # in the include file cmdassist_msg.h which is generated from the # cmdassist.msg file. # MF_CMDASSIST=cmdassist.cat # Message file ASSIST_ERR_SET=1 # Message set number ASSIST_INSTL_NETLS_I=4 # Installing netls (information) ASSIST_INSTL_NETLS_E=5 # Install error, netls package ASSIST_INSTL_FAIL_I=9 # Install failure, possible causes ASSIST_CONFIG_NETLS_I=21 # Configuring netls (information) ASSIST_CONFIG_NETLS_E=22 # Error trying to config netls ASSIST_START_NETLS_I=23 # Starting netls (information) ASSIST_START_NETLS_E=24 # Unable to start netls # If /etc/ncs/glb.e file exists (indicates user has previously # configured iFOR/LS), set flag so configuration will not be redone. # if [[ -f /etc/ncs/glb.e ]] then config=0 else config=1 fi # Install iFOR/LS server if it is not already installed. # lslpp -l bos.ifor_ls.server 2>/dev/null 1>/dev/null if [[ $? != 0 ]] then # Display installing message and install the iFOR/LS package. dspmsg -s $ASSIST_ERR_SET $MF_CMDASSIST $ASSIST_INSTL_NETLS_I 'install_assist: Please wait. The bos.ifor_ls.server package will be installed. ' /usr/lib/assist/install_pkg bos.ifor_ls.server if [[ $? != 0 ]] then # Display specific install error message for iFOR/LS. dspmsg -s $ASSIST_ERR_SET $MF_CMDASSIST $ASSIST_INSTL_NETLS_E '0851-001 install_assist: Concurrent-use and use-once licenses cannot be added to the system until the bos.ifor_ls.server package is installed. An attempt to install this package failed. ' # Display information about possible causes for install error. dspmsg -s $ASSIST_ERR_SET $MF_CMDASSIST $ASSIST_INSTL_FAIL_I 'The installation failure may have been caused by one of the following: - The input device/directory is not correct. The device may be changed through the Set Installation Device menu. - The input device does not contain a valid installation medium. - There is a valid installation medium, but it does not contain the necessary packages. If you are able to correct this problem, you may wish to try this function again. ' exit 1 fi fi # Configure the iFOR/LS server if needed. # if (( config == 1 )) then # Configure this system to serve license passwords to itself. dspmsg -s $ASSIST_ERR_SET $MF_CMDASSIST $ASSIST_CONFIG_NETLS_I ' install_assist: No prior configuration of NCS was found for this system. Attempting to configure NCS for use of this system as an iFOR/LS license server. ' /usr/lib/netls/conf/auto_config if [[ $? != 0 ]] then # Display error indicating we could not configure iFOR/LS. dspmsg -s $ASSIST_ERR_SET $MF_CMDASSIST $ASSIST_CONFIG_NETLS_E '0851-014 install_assist: An error occurred while attempting to configure this system as a standalone iFOR/LS license server. Consult the iFOR/LS product documentation for more specific information about any errors displayed by the configuration procedure. ' exit 1 fi else # Start the license server with prior NCS configuration. dspmsg -s $ASSIST_ERR_SET $MF_CMDASSIST $ASSIST_START_NETLS_I ' install_assist: An existing configuration of NCS was detected for this system. Attempting to start the iFOR/LS license server with the current configuration. ' /usr/lib/netls/bin/srv_start ps -ef >/tmp/.assist.$$ grep netlsd /tmp/.assist.$$ 2>/dev/null 1>/dev/null rc=$? rm /tmp/.assist.$$ 2>/dev/null 1>/dev/null if [[ $rc != 0 ]] then # Display error that we could not start the license server. dspmsg -s $ASSIST_ERR_SET $MF_CMDASSIST $ASSIST_START_NETLS_E ' 0851-015 install_assist: Unable to start the iFOR/LS license server. Consult the iFOR/LS product documentation for more specific information. ' exit 1 fi fi exit 0 } license_passwd Tasks Completed - Exit to AIX Loginsmit.cat/usr/lib/assist/exit_assistantx() { passwd root if [ $? -ne 0 ] then dspmsg -s 52 smit.cat 49 'Press Enter to continue. ' read fi } x/usr/bin/X11/xprintm &cmd_add_storageAdd/Show Disks for System Storage (rootvg)smit.catextendvg rootvgvgid=`getlvodm -v rootvg` pp_size=`lqueryvg -g $vgid -s | awk '{printf "%d",(2^\$1)/1048576}'` free_space=`expr $(lqueryvg -g $vgid -F) \* $pp_size` space_alloc=`expr $(lsvg rootvg | sed -n "s/.*USED PPs:[ ]*\([0-9]*\).*/\1/p") \* $pp_size` disk_rootvg=`getlvodm -w $vgid | awk '{printf"%s,",\$2}'` disk_rootvg=`echo $disk_rootvg | sed 's/,$//'` echo "#free_space:space_alloc:disk_rootvg" echo "$free_space:$space_alloc:$disk_rootvg" cmd_add_pageAdd/Show Paging Spacesmit.catx() { if [ `lscons` = '/dev/lft0' -a $LANG = 'Ja_JP' -o $LANG = 'ja_JP' ];then LANG=C /usr/lib/assist/set_pgspace $1 else /usr/lib/assist/set_pgspace $1 fi } x vgid=`getlvodm -v rootvg` mem_size=`expr $(bootinfo -r) / 1024` disk_rootvg=`getlvodm -w $vgid | awk '{printf"%s,",\$2}'` disk_rootvg=`echo $disk_rootvg | sed 's/,$//'` space_avail=`expr $(lqueryvg -g $vgid -F) \* $(lqueryvg -g $vgid -s | awk '{printf "%d",(2^\$1)/1048576}')` recom_page=`/usr/lib/assist/calc_pgspace recommended_ps` curr_page=`lsps -s | awk ' NR>1 { print substr($1,1,length($1)-2) }'` new_page=`/usr/lib/assist/calc_pgspace default_ps` # print results echo "#mem_size:disk_rootvg:space_avail:recom_page:curr_page:new_page" echo "$mem_size:$disk_rootvg:$space_avail:$recom_page:$curr_page:$new_page" cmd_select_devSet Installation Devicesmit.catreplace() { # Set flag for install device line found to false. install_dev=0 # Read from the /var/adm/sw/__assistinfo file a line at a time. while read line do # If a line is found that starts with INSTALL_DEVICE if [[ $line = INSTALL_DEVICE* ]] then # Write the new install device information to a temp file. echo INSTALL_DEVICE=$1 >> /tmp/_assist$$ # Set flag for install device line found to true. install_dev=1 else # Otherwise, write the line read to the temp file. echo $line >> /tmp/_assist$$ fi done < /var/adm/sw/__assistinfo # If a line for install device was not found in /var/adm/sw/__assistinfo if [ $install_dev = 0 ] then # Write the new install device information to the temp file. echo INSTALL_DEVICE=$1 >> /tmp/_assist$$ fi # Replace the old /var/adm/sw/__assistinfo with the temp file. mv /tmp/_assist$$ /var/adm/sw/__assistinfo } replace default() { value=`sed -n 's?.*INSTALL_DEVICE=[ ]*\(.*\)?\1?p'>> Choice []: ' read answer if [ $answer"x" = 1"x" ]; then return 1 elif [ $answer"x" = 2"x" ]; then return 2 fi done } tsysuiinterfaceSelect System User Interfacedtsmit.cat/usr/dt/bin/dtconfig _yp.mkmasterConfigure this Host as a NIS Master Serversmit.cat/usr/sbin/mkmaster_yp.mkslaveConfigure this Host as a NIS Slave Serversmit.cat/usr/sbin/mkslave/usr/bin/ypservers -m -c_yp.chmasterChange / Show Characteristics of Master Serversmit.cat/usr/sbin/chmaster/usr/sbin/lsmaster-c_yp.chslaveChange / Show Characteristics of Slave Serversmit.cat/usr/sbin/chslave_yp.transmapsTransfer Maps to Slave Serverssmit.cat/usr/sbin/yppush_yp.getmapsRetrieve Maps from Master Server for this Slavesmit.cat/usr/sbin/ypxfr_yp.mkmapsBuild / Rebuild NIS Maps for this Master Serversmit.catcd /var/yp ; make Start the Server Daemon, ypservsmit.catstartsrc -s ypservStart the yppasswdd Daemonsmit.catstartsrc -s yppasswddStart the ypupdated Daemonsmit.catstartsrc -s ypupdatedStop the Server Daemon, ypservsmit.catstopsrc -s ypservStop the yppasswdd Daemonsmit.catstopsrc -s yppasswddStop the ypupdated Daemonsmit.catstopsrc -s ypupdated_yp.rmypservRemove NIS Server Configuration from this Hostsmit.cat/usr/sbin/rmyp -sGetting Startedcluster.catmain() { dspmsg -s 57 cluster.cat 2 " PowerHA SystemMirror provides high availability by monitoring and responding to failures of specific resources. These resources are combined into groups which comprise all the resources associated with a specific application. PowerHA SystemMirror manages a resource group as a unit - if one or more resources in the group fails, PowerHA SystemMirror recovers them or moves the entire group / application to a backup node. Configuring PowerHA SystemMirror consists of defining the set of nodes and networks where PowerHA SystemMirror will run, defining the resources and resource groups PowerHA SystemMirror is to monitor and recover, verifying the configuration and correcting any problems, then synchronizing the configuration to all nodes in the cluster. Once configured, you will start cluster services to have PowerHA SystemMirror begin managing and recovering the resources. The most commonly used options for configuring PowerHA SystemMirror are found under the top level menus in SMIT. For example, options for configuring and managing the cluster, nodes, and networks (also known as the 'topology' components of the cluster) are found under the 'Cluster Nodes and Networks' SMIT path. Options for configuring and managing applications, resources and resource groups are found under the 'Cluster Applications and Resources' SMIT path. Advanced or custom configuration options are found under the 'Custom Cluster Configuration' SMIT path. 'System Management Tools (C_SPOC)' provides tools for configuring, changing and managing the cluster, including starting and stopping PowerHA SystemMirror. 'Problem Determination Tools' provides tools for diagnosing and correcting any problems. " } mainDiscover Configurationcluster.catmain() { /usr/es/sbin/cluster/diag/clver -Nv dspmsg -s 37 cluster.cat 16 "Discovering Volume Group Configuration " /usr/es/sbin/cluster/utilities/clharvest_vg -w } main_cm_add_communication.interfaces.discovery.dialogAdd Discovered Network Interfaces to the Configurationcluster.cat/usr/es/sbin/cluster/utilities/claddnodecluster_hlp.catVerify and Synchronize Cluster Configurationcluster.cat/usr/es/sbin/cluster/utilities/clmgr sync cluster FIX=Interactivecluster_hlp.cat_clm.claddnode.standardSetup Cluster, Nodes and Networks (Typical)cluster.catmain() { cluster_name=$1 node_list="$2" /usr/es/sbin/cluster/utilities/clodmget -f name,multi_site_lc -n HACMPcluster | IFS=: read cname ctype if [[ -z $cname ]] then # # There is no cluster configured - the cmd_to_discover # below cooked up the local node name as one of the nodes # to add, here we tack the same onto the node list # localnode=$(hostname) node_list="$localnode $node_list" /usr/es/sbin/cluster/utilities/clmgr add cluster $cluster_name NODES="$node_list" else # There is a cluster configured - to invoke the "modify" # commands we need to figure out what has changed name_arg="" [[ $cluster_name != $cname ]] && name_arg="NAME=$cluster_name" nodes_arg="" [[ $(echo $node_list | sort -u) != $(/usr/es/sbin/cluster/utilities/cllsclstr -cwng | tail -1 | cut -f5 -d: | sort -u) ]] && nodes_arg="NODES=$node_list" [[ -n "$cname_arg$nodes_arg$type_arg" ]] && /usr/es/sbin/cluster/utilities/clmgr modify cluster $name_arg $nodes_arg fi } main main() { /usr/es/sbin/cluster/utilities/cllsclstr -cwng 2>&1 if [ $? -ne 0 ]; then # # There is no cluster configured - generate a default # cluster name and send the local hostname as one of # the nodes to add # localnode=$(hostname) print "#cname:configurednodes" clname=${localnode%%.*} print "$clname"_cluster:"$localnode" fi exit 0 } maincluster_hlp.cat_cm_show_clusterShow Cluster Definitioncluster.catcmd_to_exec() { dspmsg -s 63 cluster.cat 19 "The cluster has already been defined in AIX and basic elements can no longer be changed unless you remove the cluster first. Use the Custom configuration SMIT options to add and remove nodes. The basic cluster configuration is as follows: " /usr/es/sbin/cluster/utilities/cltopinfo } cmd_to_exec main() { print "#cname" /usr/es/sbin/cluster/utilities/clodmget -f name -n HACMPcluster exit 0 } maincluster_hlp.cat_cm_show_clusterShow Cluster Configuration Errorcluster.catcmd_to_exec() { dspmsg -s 56 cluster_hlp.cat 53 "An error occured while checking the configuration. There appears to be a cluster defined to AIX (CAA) but no corresponding SystemMirror cluster definition. The existing AIX cluster definition will need to be removed before the SystemMirror cluster can be configured again. " echo "" dspmsg -s 56 cluster_hlp.cat 54 "Please report this error and the following information to IBM support." echo " " lscluster -c echo " " lssrc -ls cthags exit 1 } cmd_to_execcluster_hlp.cat_clm.repos_ipaddrDefine Repository and Cluster IP Addresscluster.catmain() { # : Can define the repository disk, and the cluster heartbeat IP address # print $* | read cluster_name repos_disk cl_ipaddr # : Remove parentheses around PVID : And define repository # repos_disk=${repos_disk%\)} repos_disk=${repos_disk#\(} /usr/es/sbin/cluster/utilities/clmgr add repository $repos_disk DISABLE_VALIDATION=true rc=$? (( $rc != 0 )) && return $rc # : Define cluster heartbeat IP address # if [[ -n $cl_ipaddr ]] then # : Handle 'Default' as the cluster heatbeat IP address # Default=$(dspmsg -s 1 cluster.cat 860 "Default") if [[ $cl_ipaddr == $Default ]] then dspmsg -s 99 cluster.cat 99 "Default Multicast IP address will be used for cluster $cluster_name\n and will be assigned during Synchronization" $cluster_name cl_ipaddr="" fi fi if [[ -n $cl_ipaddr ]] then /usr/es/sbin/cluster/utilities/clmgr modify cluster CLUSTER_IP=$cl_ipaddr rc=$? (( $rc != 0 )) && return $rc fi # : If we got here, let the user know what to do next # dspmsg -s 63 cluster.cat 17 "Initial site configuration has been saved. You can now go on to complete the rest of the configuration, including adding backup repository disks (recommended), custom event notifications, resource groups and applications, etc. When you have entered all the basic information you can then use Verification and Synchronization to verify the configuration and distribute it to all cluster nodes. " return 0 } main main() { # : Extract cluster name, repository disk PVID, and any heart beat IP address # cname=$(/usr/es/sbin/cluster/utilities/clodmget -f name -n HACMPcluster) repos=$(/usr/es/sbin/cluster/utilities/clodmget -f repository -n HACMPsircol) ip_address=$(/usr/es/sbin/cluster/utilities/clodmget -f ip_address -n HACMPsircol) if [[ -z $ip_address ]] then ip_address=$(dspmsg -s 1 cluster.cat 860 "Default") fi print -- '#cname:repos:ip' print -- ${cname}:${repos}:${ip_address} return 0 } maincluster_hlp.cat_clm.repos_ipaddr_existsDefine Repository and Cluster IP Addresscluster.catmain() { # : Show the current configuration # dspmsg -s 64 cluster.cat 99 Current cluster configuration follows print "" /usr/es/sbin/cluster/utilities/cltopinfo return 0 } mainmain() { # : Extract cluster name, repository disk PVID, and any heart beat IP address # cname=$(/usr/es/sbin/cluster/utilities/clodmget -f name -n HACMPcluster) repos=$(/usr/es/sbin/cluster/utilities/clodmget -f repository -n HACMPsircol) ip_address=$(/usr/es/sbin/cluster/utilities/clodmget -f ip_address -n HACMPsircol) if [[ -z $ip_address ]] then Default=$(dspmsg -s 1 cluster.cat 860 "Default") ip_address=$Default fi hbc=$(/usr/es/sbin/cluster/utilities/clodmget -f heartbeattype -n HACMPcluster) if [[ $hbc == U* ]] then hbc=$(dspmsg -s 64 cluster.cat 4 "Unicast") elif [[ $hbc == M* || $hbc == C* ]] then hbc=$(dspmsg -s 64 cluster.cat 5 "Multicast") else hbc='' fi print -- '#cname:repos:ip:hbc' print -- ${cname}:${repos}:${ip_address}:${hbc} } maincluster_hlp.cat_clm.repos_ipaddr_nonodesDefine Repository and Cluster IP Addresscluster.catmain() { dspmsg -s 58 cluster.cat 35 "No nodes are currently defined for the cluster. Define at least one node, and ideally all nodes, prior to defining the repository disk and cluster IP address. It is important that all nodes in the cluster have access to the repository disk and can be reached via the cluster IP address, therefore you should define the nodes in the cluster first. " } maincluster.catLearn more about repository disk and cluster IP addresscluster.catmain() { dspmsg -s 58 cluster.cat 40 " Cluster Aware AIX uses a central repository disk to store its configuration. This disk must be shared by all nodes. When sites with linked clusters are defined a unique repository disk must be specified for each site. The disk specified does not have to share the same hdisk name on each node, but you should verify that it is a disk with a common PVID defined on each node according to lspv output. Specify the hdisk name of the disk on the node where you are configuring the cluster. You can change the repository disk later if needed. The cluster IP address is a multicast IP address that is used for internal cluster communication and monitoring. This multicast IP address will be generated automatically if one is not provided. If you do provide one it must be in the multicast address range 224.0.0.0 - 239.255.255.255. If you have IPv6 addresses configured, CAA will also use IPv6 multicast. The IPv6 multicast address cannot be specified directly: it is derived by OR'ing the standard prefix of 0xFF05 with the (hex converted) IPv4 multicast. Example: Assume IPv4 address is 228.8.16.129 or 0xE4081081 Transformation by OR'ing bits (0xFF05:: | 0xE4081081) The resulting IPv6 multicast address will be 0xFF05::E408:1081 The cluster IP address can not be changed later without recreating the CAA cluster." } maincluster.cat_clm.cllscfPowerHA SystemMirror Configurationcluster.cat/usr/es/sbin/cluster/utilities/cltopinfo_cm_delete_an_hacmp_cluster_delete.dialogRemove the Cluster Definitioncluster.catcmd_to_exec() { node=${1} if [[ $node != "ALL" ]]; then node=$(/usr/es/sbin/cluster/utilities/get_local_nodename) fi NODES= if [[ -n $node ]]; then NODES="NODES=$node" fi /usr/es/sbin/cluster/utilities/clmgr -f delete cluster $NODES } cmd_to_exec main() { /usr/es/sbin/cluster/utilities/cllsclstr -cwng if [ $? -ne 0 ]; then print "#cname:configurednodes" fi exit 0 } maincm_add_snap.dialog.optCreate a Snapshot of the Cluster Configurationcluster.cat/usr/es/sbin/cluster/utilities/clmgr add snapshotcm_show_snap.dialog.optChange/Show a Cluster Snapshot of the Cluster Configurationcluster.cat/usr/es/sbin/cluster/utilities/clmgr modify snapshot/usr/es/sbin/cluster/utilities/clsnapshot -s -n_rawnamecm_rm_snap.dialog.optRemove a Cluster Snapshot of the Cluster Configurationcluster.cat/usr/es/sbin/cluster/utilities/clmgr -f delete snapshotcm_compare_snapshot.optCompare Cluster Snapshots and Configurationcluster.catcmd_to_exec() { s1=$1 s2=$2 /usr/es/sbin/cluster/utilities/clmgr compare snapshot "$s1,$s2" } cmd_to_exec $*cm_apply_snap.dialog.optRestore the Cluster Snapshotcluster.cat/usr/es/sbin/cluster/utilities/clmgr manage snapshot restore/usr/es/sbin/cluster/utilities/clsnapshot -s -n_rawname_clsnapshot_custom_dialog_addAdd a Custom Snapshot Methodcluster.cat/usr/es/sbin/cluster/utilities/claddcustom -t snapshotcluster_hlp.cat_clsnapshot_custom_dialog_chaChange/Show a Custom Snapshot Methodcluster.cat/usr/es/sbin/cluster/utilities/clchcustom -t snapshot/usr/es/sbin/cluster/utilities/cllscustom -c -t snapshot-n _rawnamecluster_hlp.cat_clsnapshot_custom_dialog_remRemove a Custom Snapshot Methodcluster.cat/usr/es/sbin/cluster/utilities/clrmcustom -t snapshot -n/usr/es/sbin/cluster/utilities/cllscustom -c -t snapshot-n _rawnamecluster_hlp.cat_clm.cllsnodeShow Cluster Node Attributescluster.cat/usr/es/sbin/cluster/utilities/cltopinfo -n_clm.cllsnode.nameShow Cluster Node Attributescluster.cat/usr/es/sbin/cluster/utilities/cltopinfo -n_cm_add_node_to_linked_cluster_dialogAdd a Node to a Linked Clustercluster.catmain() { print $* | read node_name comm_path site_name # : Site name will always be present, though node : name and comm_path may not be. # if [[ -z $site_name ]] then # : One or both of node_name or comm_path was not provided # if [[ -z $comm_path ]] then # : Neither node name nor comm_path was provided. : Cannot work with this. # dspmsg -s 64 cluster.cat 22 "Either node name or communication path must be supplied\n" return 1 else # : One of node_name or comm_path was provided, but not both. : The second parameter must be the site name. # site_name=$comm_path comm_path= if [[ $node_name == @(COMMPATH=*) ]] then # : Not given a node name, but given a communication path : Generate the node name from the lowest order qualifier : of the hostname associated with the communication path # comm_path=$node_name node_name=${comm_path##*=} node_name=$(LC_ALL=C host $node_name | cut -f1 -d' ') if [[ -n $node_name ]] then # : If resolvable, get lowest qualifier # node_name=${node_name%%.*} fi if [[ -z $node_name ]] then # : Could not figure out a suitable node name from : the communication path # dspmsg -s 64 cluster.cat 21 "A node name could not be determined from the supplied communication path.\nEither supply a node name, or correct the specification of the communcation path." return 1 fi else # : Given a node name, but not given a communication path : See if we can get a host name from /etc/cluster/rhosts # LC_ALL=C host $node_name | read host_name skip host_ip rest if [[ -n $host_name && -n $host_ip && -s /etc/cluster/rhosts ]] then comm_path=$(egrep "$host_name|$host_ip" /etc/cluster/rhosts) fi fi # : Any further errors caught by clmgr below # fi fi if [[ -n $comm_path ]] then # : If the communication path has been given as a numeric IP address, : turn it into a host name. CAA requires host names. # path_name=${comm_path##*=} if [[ $path_name == @(+([0-9.])|+([0-9:])) ]] then LC_ALL=C host $path_name | read path_name rest fi comm_path="COMMPATH=$path_name" fi # : The careful reader will note that not all possible erroneous : input has been caught so far. clmgr will catch the rest. # /usr/es/sbin/cluster/utilities/clmgr -f add node $node_name $comm_path $site_name } main_cm_add_node_to_stretched_cluster_dialogAdd a Node to a Stretched Clustercluster.catmain() { print $* | read node_name comm_path site_name # : Site name will always be present, though node : name and comm_path may not be. # if [[ -z $site_name ]] then # : One or both of node_name or comm_path was not provided # if [[ -z $comm_path ]] then # : Neither node name nor comm_path was provided. : Cannot work with this. # dspmsg -s 64 cluster.cat 22 "Either node name or communication path must be supplied\n" return 1 else # : One of node_name or comm_path was provided, but not both. : The second parameter must be the site name. # site_name=$comm_path comm_path= if [[ $node_name == @(COMMPATH=*) ]] then # : Not given a node name, but given a communication path : Generate the node name from the lowest order qualifier : of the hostname associated with the communication path # comm_path=$node_name node_name=${comm_path##*=} node_name=$(LC_ALL=C host $node_name | cut -f1 -d' ') if [[ -n $node_name ]] then # : If resolvable, get lowest qualifier # node_name=${node_name%%.*} fi if [[ -z $node_name ]] then # : Could not figure out a suitable node name from : the communication path # dspmsg -s 64 cluster.cat 21 "A node name could not be determined from the supplied communication path.\nEither supply a node name, or correct the specification of the communcation path." return 1 fi else # : Given a node name, but not given a communication path : See if we can get a host name from /etc/cluster/rhosts # LC_ALL=C host $node_name | read host_name skip host_ip rest if [[ -n $host_name && -n $host_ip && -s /etc/cluster/rhosts ]] then comm_path=$(egrep "$host_name|$host_ip" /etc/cluster/rhosts) fi fi # : Any further errors caught by clmgr below # fi fi if [[ -n $comm_path ]] then # : If the communication path has been given as a numeric IP address, : turn it into a host name. CAA requires host names. # path_name=${comm_path##*=} if [[ $path_name == @(+([0-9.])|+([0-9:])) ]] then LC_ALL=C host $path_name | read path_name rest fi comm_path="COMMPATH=$path_name" fi # : The careful reader will note that not all possible erroneous : input has been caught so far. clmgr will catch the rest. # /usr/es/sbin/cluster/utilities/clmgr -f add node $node_name $comm_path $site_name } main_cm_add_a_node_to_the_hacmp_cluster_dialogAdd a Nodecluster.catmain() { print $* | read node_name comm_path if [[ -z $comm_path ]] then # : Only one parameter was supplied # if [[ $node_name == @(COMMPATH=*) ]] then # : Not given a node name, but given a communication path : Generate the node name from the lowest order qualifier : of the hostname associated with the communication path # comm_path=$node_name node_name=${comm_path##*=} node_name=$(LC_ALL=C host $node_name | cut -f1 -d' ') if [[ -n $node_name ]] then # : If resolvable, get lowest qualifier # node_name=${node_name%%.*} fi if [[ -z $node_name ]] then # : Could not figure out a suitable node name from : the communication path # dspmsg -s 64 cluster.cat 21 "A node name could not be determined from the supplied communication path.\nEither supply a node name, or correct the specification of the communcation path." return 1 fi else # : Given a node name, but not given a communication path : See if we can get a host name from /etc/cluster/rhosts # LC_ALL=C host $node_name | read host_name skip host_ip rest if [[ -n $host_name && -n $host_ip && -s /etc/cluster/rhosts ]] then comm_path=$(egrep "$host_name|$host_ip" /etc/cluster/rhosts) fi fi # : Any further errors caught by clmgr below # fi if [[ -n $comm_path ]] then # : If the communication path has been given as a numeric IP address, : turn it into a host name. CAA requires host names. # path_name=${comm_path##*=} if [[ $path_name == @(+([0-9.])|+([0-9:])) ]] then LC_ALL=C host $path_name | read path_name rest comm_path="COMMPATH=$path_name" fi fi # : The careful reader will note that not all possible erroneous : input has been caught so far. clmgr will catch the rest. # /usr/es/sbin/cluster/utilities/clmgr -f add node $node_name $comm_path } main_cm_change_show_a_node_in_the_hacmp_cluster.dialogChange/Show a Nodecluster.catcmd_to_exec() { NODE=${1} NEWNODE=${2#-n} COMM_PATH=${3#-p} ENABLE_LIVEUPDATE=${4#-l} if [[ -n $NEWNODE ]]; then NEWNODE="NEWNAME=$NEWNODE" fi if [[ -n $COMM_PATH ]]; then COMM_PATH="COMMPATH=$COMM_PATH" fi if [[ -n $ENABLE_LIVEUPDATE ]]; then ENABLE_LIVEUPDATE="ENABLE_LIVE_UPDATE=$ENABLE_LIVEUPDATE" fi /usr/es/sbin/cluster/utilities/clmgr modify node $NODE $NEWNODE $COMM_PATH $ENABLE_LIVEUPDATE } cmd_to_execdisc() { /usr/es/sbin/cluster/utilities/clmgr -ca COMMPATH,ENABLE_LIVE_UPDATE query node $1 | sed 's/^# /#/' } disc_rawname_cm_delete_a_node_in_the_hacmp_cluster.dialogRemove Nodescluster.catcmd_to_exec() { NODES="$1" NODES=$(echo $NODES | sed 's/ /,/g') /usr/es/sbin/cluster/utilities/clmgr -f delete node $NODES } cmd_to_exec_cm_add_a_persistent_node_ip_label_address_dialogAdd a Persistent Node IP Label/Addresscluster.catcmd_to_exec() { NODE=$1 NETWORK=$2 LABEL=$3 PREFIXLENGTH=$4 /usr/es/sbin/cluster/utilities/clmgr add persistent_ip $LABEL NETWORK=$NETWORK NETMASK=$PREFIXLENGTH NODE=$NODE } cmd_to_exececho '#NODENAME '_rawname_cm_change_show_a_persistent_node_ip_label_address_dialogChange/Show a Persistent Node IP Label/Addresscluster.catfunction cmd_to_exec { PATH=/usr/es/sbin/cluster/utilities:$PATH typeset NODE=$1 typeset PIP=$2 shift 2 # Sanity check the input if [[ -z $(clodmget -q "ip_label=$PIP" HACMPadapter) ]] then dspmsg -s 26 scripts.cat 28 '%s does not exist\n' "$PIP" exit 1 fi clmgr modify persistent_ip $PIP $* return $? } cmd_to_exec/usr/es/sbin/cluster/utilities/cl_harvestIP_scripts-u _rawname_cm_delete_service_ip.dialogRemove a Persistent Node IP Label/Addresscluster.cat/usr/es/sbin/cluster/utilities/clrmnode _cm_add_a_network_to_the_hacmp_cluster_dialog.IPWITHALIASINGAdd a Networkcluster.catmain() { NETWORK=$1 TYPE=$2 NETMASK=$3 PUBLIC=$4 THRESHOLD=$5 PERIOD=$6 MASKARG= # See if the netmask value looks like an IPV6 prefix length if [[ -n $NETMASK && $NETMASK == +([[:digit:]]) ]]; then MASKARG="PREFIX=$NETMASK" # See if the netmask value looks like an IPV4 netmask elif [[ -n $NETMASK && $NETMASK == *+([[:digit:]]).+([[:digit:]])* ]]; then MASKARG="NETMASK=$NETMASK" fi /usr/es/sbin/cluster/utilities/clmgr add network $NETWORK TYPE=$TYPE $MASKARG PUBLIC=$PUBLIC UNSTABLE_THRESHOLD=$THRESHOLD UNSTABLE_PERIOD=$PERIOD } mainmain() { echo "#NETNAME:NETWORK:NETMASK:THRESHOLD:PERIOD" /usr/es/sbin/cluster/utilities/claddnode -g $1 2>/dev/null | read NETNAME # and now try to find out the most frequently used netmask in the # ip harvesting storage file prev="" mostcommon="" countmostcommon=-1 /usr/es/sbin/cluster/utilities/cl_harvestIP_scripts -s $1 | while read netmask; do if [[ $prev = "" ]]; then prev=$netmask count=1 continue fi if [[ $prev != $netmask ]]; then if [[ $count > $countmostcommon ]]; then mostcommon=$prev countmostcommon=$count fi count=0 prev=$netmask fi count=$((count+1)) done if [[ $mostcommon = "" ]]; then mostcommon="255.255.255.0" fi # if there are any other networks defined, use the threshold # and period from the last one, otherwise use defaults (as # found in cluster.h) DEF_THRESHOLD=$(/usr/es/sbin/cluster/utilities/clodmget -f unstable_threshold -n HACMPnetwork | tail -1) [[ -z $DEF_THRESHOLD ]] && DEF_THRESHOLD=3 DEF_PERIOD=$(/usr/es/sbin/cluster/utilities/clodmget -f unstable_period -n HACMPnetwork | tail -1) [[ -z $DEF_PERIOD ]] && DEF_PERIOD=60 print "$NETNAME:$1:$mostcommon:$DEF_THRESHOLD:$DEF_PERIOD" exit 0 } main_rawname_cm_change_show_a_networkdialog.IPWITHALIASINGChange/Show a Networkcluster.catmain() { if (( $# == 7 )); then NETWORK=$1 NEW_NETWORK=$2 TYPE=$3 NETMASK=$4 PUBLIC=$5 THRESHOLD=$6 PERIOD=$7 else NETWORK=$1 TYPE=$2 NETMASK=$3 PUBLIC=$4 THRESHOLD=$5 PERIOD=$6 fi # adjust inputs if a new name is provided if [[ $NEW_NETWORK == "-n" ]]; then NEWNAME= else NEW_NETWORK=${NEW_NETWORK#-n} NEWNAME="NEWNAME=$NEW_NETWORK" fi /usr/es/sbin/cluster/utilities/clmgr modify network $NETWORK $NEWNAME TYPE=$TYPE NETMASK=$NETMASK PUBLIC=$PUBLIC UNSTABLE_THRESHOLD=$THRESHOLD UNSTABLE_PERIOD=$PERIOD } main/usr/es/sbin/cluster/utilities/cl_harvestIP_scripts -c_rawname_cm_delete_a_network_from_the_hacmp_cluster_dialogcluster.cat/usr/es/sbin/cluster/utilities/clmodnetwork -d /usr/es/sbin/cluster/utilities/cl_harvestIP_scripts -c_rawname_cm_add_communication.predefined.dialog.interfacesAdd a Network Interfacecluster.cat/usr/es/sbin/cluster/utilities/clmgr add interface cmd_to_discover() { HEADER=`odmget -q name=$1 HACMPnetwork | grep "=" | cut -d '"' -f 1 | awk '{ printf "%s:", $1 }'` FOOTER=`odmget -q name=$1 HACMPnetwork | sed 's/ //g' | grep "="` echo "#$HEADER" for LINE in $FOOTER do ATTR=`echo $LINE | cut -d '=' -f 1` VALUE=`echo $LINE | cut -d '=' -f 2 | sed 's/"//g'` if [[ "$ATTR" == "alias_hb_addr" ]] then if [[ -n "$VALUE" ]] then NUM_OF_CHARS=${#VALUE} INDEX=1 while [[ $INDEX -le $NUM_OF_CHARS ]] do CHAR_VAL=`expr substr "$VALUE" $INDEX 1` if [[ $CHAR_VAL == : ]] then printf "#!$CHAR_VAL" else printf "$CHAR_VAL" fi (( INDEX = $INDEX + 1 )) done fi printf ":" else printf "$VALUE:" fi done } cmd_to_discover_rawname_cm_change_show_communication.dialog.interfaceChange/Show a Network Interfacecluster.catcmd_to_exec() { if (( $# == 5 )); then NODE=$1 INTERFACE_NAME=$2 INTERFACE=$3 TYPE=$4 NETWORK=$5 else NODE=$1 INTERFACE=$2 TYPE=$3 NETWORK=$4 fi /usr/es/sbin/cluster/utilities/clmgr modify interface $INTERFACE NETWORK=$NETWORK } cmd_to_exec/usr/es/sbin/cluster/utilities/cl_harvestIP_scripts-u _rawname_cm_delete_communication_interfaces_devices.dialogRemove a Network Interfacecluster.cat/usr/es/sbin/cluster/utilities/clmgr -f delete interfacecl_reset_iface.optionUpdate Network Interface with Operating System Settingscluster.cat/usr/es/sbin/cluster/utilities/clresetiface_clm.cllsnwShow Information for All Networkscluster.cat/usr/es/sbin/cluster/utilities/cltopinfo -w_clm.cllsnw.nameShow Information for Selected Networkcluster.cat/usr/es/sbin/cluster/utilities/cltopinfo -w_clm.cllsifShow Information for All Network Interfacescluster.cat/usr/es/sbin/cluster/utilities/cltopinfo -i_clm.cllsif.nameShow Information for Selected Network Interfacecluster.cat/usr/es/sbin/cluster/utilities/cltopinfo -i_claddserv.extended.dialogAdd Application Controller Scriptscluster.cat/usr/es/sbin/cluster/utilities/claddserv_clchserv.extended.dialogChange/Show Application Controller Scriptscluster.cat/usr/es/sbin/cluster/utilities/clchserv/usr/es/sbin/cluster/utilities/cllsserv -chsm-n _rawname_clchserv.extended.dialog.custom1Change/Show Application Controller Scriptscluster.cat/usr/es/sbin/cluster/utilities/clchserv/usr/es/sbin/cluster/utilities/cllsserv -chsm-n _rawname_clm.clrmservRemove Application Controller Scriptscluster.cat/usr/es/sbin/cluster/utilities/clrmserv Learn more about Application Controllerscluster.catmain() { dspmsg -s 59 cluster.cat 16 " PowerHA SystemMirror provides high availability for applications by detecting and recovering from failures of resources on which an application depends, such as disks that host the volume groups and file systems for an application, and network adapters that host application IP addresses. In order to define an application to the cluster, you create "Application Controller" scripts that are used to start and stop the application. From the "Add Application Controller Scripts" menu, you give the Application Controller itself a name and specify the path to the start and stop scripts that control the application, then add this Application Controller to a resource group. SystemMirror will start and stop the application by calling the scripts you provide. If you use a Configuration Assistant, SystemMirror provides the scripts for you. It is important that the start and stop scripts you specify for the Application Controller are available in the same path on all nodes that can host the resource group (according to the resource group definition), and that the scripts are executable on those nodes. " } maincladd_process_appmon.optionAdd Process Application Monitorcluster.cat/usr/es/sbin/cluster/utilities/clmgr add application_monitor cmd_to_discover () { if [[ $(/usr/es/sbin/cluster/utilities/cllsserv -c | wc -l) -eq 1 ]] then /usr/es/sbin/cluster/utilities/cllsserv -chs else echo "#Name:Start_script:Stop_script" fi } cmd_to_discovercluster_hlp.catclch_process_appmon.optionChange/Show Process Application Monitorcluster.cat/usr/es/sbin/cluster/utilities/clmgr modify application_monitor/usr/es/sbin/cluster/utilities/cllsappmon -ch -t process _rawnamecluster_hlp.catcm_remove_appmonRemove a Process Application Monitorcluster.cat/usr/es/sbin/cluster/utilities/clrmappmoncluster_hlp.catcladd_custom_appmon.optionAdd Custom Application Monitorcluster.cat/usr/es/sbin/cluster/utilities/clmgr add application_monitor cmd_to_discover () { if [[ $(/usr/es/sbin/cluster/utilities/cllsserv -c | wc -l) -eq 1 ]] then /usr/es/sbin/cluster/utilities/cllsserv -chs else echo "#Name:Start_script:Stop_script" fi } cmd_to_discovercluster_hlp.catclch_custom_appmon.optionChange/Show Custom Application Monitorcluster.cat/usr/es/sbin/cluster/utilities/clmgr modify application_monitor/usr/es/sbin/cluster/utilities/cllsappmon -ch -t user _rawnamecluster_hlp.catclch_custom_appmon.option.custom1Change/Show Custom Application Monitorcluster.cat/usr/es/sbin/cluster/utilities/clmgr modify application_monitor/usr/es/sbin/cluster/utilities/cllsappmon -ch -t user _rawnamecluster_hlp.catcm_remove_appmonRemove a Custom Application Monitorcluster.cat/usr/es/sbin/cluster/utilities/clrmappmoncluster_hlp.catcm_cfg_add_hmc_optAdd HMC Definitioncluster.cat/usr/es/sbin/cluster/utilities/clmgr add hmccluster_hlp.catcm_cfg_add_hmc_opt.restAdd HMC Definitioncluster.cat/usr/es/sbin/cluster/utilities/clmgr add hmccluster_hlp.catcm_cfg_ch_hmc_optChange/Show HMC Definitioncluster.cat/usr/es/sbin/cluster/utilities/clmgr modify hmc/usr/es/sbin/cluster/utilities/clmgr -c query hmc_hmcnamecluster_hlp.catcm_cfg_rm_hmc_optRemove HMC Definitioncluster.cat/usr/es/sbin/cluster/utilities/clmgr -f remove hmccluster_hlp.catcm_cfg_hmcs_node_optChange/Show HMC List for a Nodecluster.cat/usr/es/sbin/cluster/utilities/clmgr modify node/usr/es/sbin/cluster/utilities/clmgr -c -a NAME,HMCS query node_nodenamecluster_hlp.catcm_cfg_hmcs_site_optChange/Show HMC List for a Sitecluster.cat/usr/es/sbin/cluster/utilities/clmgr modify site/usr/es/sbin/cluster/utilities/clmgr -c -a NAME,HMCS query site_sitenamecluster_hlp.catcm_cfg_def_hmc_tun_optChange/Show Default HMC Tunablescluster.cat/usr/es/sbin/cluster/utilities/clmgr manage cluster hmcdisc () { /usr/es/sbin/cluster/utilities/clmgr -c query \ cluster hmc | sed 's/^# /#/' } disccluster_hlp.catcm_cfg_def_hmcs_optChange/Show Default HMC Listcluster.cat/usr/es/sbin/cluster/utilities/clmgr manage cluster hmc/usr/es/sbin/cluster/utilities/clmgr -c query cluster hmccluster_hlp.catcm_cfg_hmc_pass_optChange/Show HMC Credentialscluster.cat/usr/es/sbin/cluster/utilities/clmgr modify hmc/usr/es/sbin/cluster/utilities/clmgr -c query hmc_hmcnamecluster_hlp.catChange/Show HMC Credentialscluster.catdspmsg -s 59 cluster_hlp.cat 59 "User Name and Password options are applicable only when HMC connection type is set to REST API based connection."cluster_hlp.catcm_cfg_add_hrp_optAdd Hardware Resource Provisioning to an Application Controllercluster.cat/usr/es/sbin/cluster/utilities/clmgr add codcluster_hlp.catcm_cfg_add_hrp_optAdd Hardware Resource Provisioning to an Application Controllercluster.catx() { /usr/es/sbin/cluster/utilities/clmgr manage \ cluster roha AGREE_TO_COD_COSTS='1' /usr/es/sbin/cluster/utilities/clmgr add cod $* } xcluster_hlp.catcm_cfg_get_hrp_optChange/Show Hardware Resource Provisioning of an Application Controllercluster.cat/usr/es/sbin/cluster/utilities/clmgr modify cod/usr/es/sbin/cluster/utilities/clmgr -c query cod_controllercluster_hlp.catcm_cfg_get_hrp_optChange/Show Hardware Resource Provisioning of an Application Controllercluster.catx() { /usr/es/sbin/cluster/utilities/clmgr manage \ cluster roha AGREE_TO_COD_COSTS='1' /usr/es/sbin/cluster/utilities/clmgr modify cod $* } x/usr/es/sbin/cluster/utilities/clmgr -c query cod_controllercluster_hlp.catcm_cfg_rm_hrp_optRemove Hardware Resource Provisioning from an Application Controllercluster.cat/usr/es/sbin/cluster/utilities/clmgr -f delete codcluster_hlp.catcm_cfg_def_cl_tun_optChange/Show Default Cluster Tunablescluster.cat/usr/es/sbin/cluster/utilities/clmgr manage cluster rohax() { YES=`/usr/bin/dspmsg -s 1 cluster.cat 822 'Yes,No' \ | /usr/bin/cut -d , -f 1` NO=`/usr/bin/dspmsg -s 1 cluster.cat 822 'Yes,No' \ | /usr/bin/cut -d , -f 2` LC_ALL=C /usr/es/sbin/cluster/utilities/clmgr -c \ query cluster roha | /usr/bin/sed \ -e 's/^# /#/' \ -e "s/false/$NO/g" -e "s/true/$YES/g" } xcluster_hlp.catcm_cfg_sec_lpar_pol_optChange/Show Secondary LPARs Policycluster.cat/usr/es/sbin/cluster/utilities/clmgr manage cluster rohax() { YES=`/usr/bin/dspmsg -s 1 cluster.cat 822 'Yes,No' \ | /usr/bin/cut -d , -f 1` NO=`/usr/bin/dspmsg -s 1 cluster.cat 822 'Yes,No' \ | /usr/bin/cut -d , -f 2` LC_ALL=C /usr/es/sbin/cluster/utilities/clmgr -c \ query cluster roha | /usr/bin/sed \ -e 's/^# /#/' \ -e "s/false/$NO/g" -e "s/true/$YES/g" } xcluster_hlp.catShow Cluster Applicationscluster.cat/usr/es/sbin/cluster/utilities/cldisp_cm_add_a_service_ip_label_address.dialog.multiple.nositesAdd a Service IP Label/Addresscluster.catcmd_to_exec() { typeset IP=$1 typeset MASK="" NW="" if [[ $2 == *NETWORK=* ]]; then NW=${2#*=} # No NETMASK/PREFIX was specified else MASK=${2#*=} NW=${3#*=} fi typeset HAUTILS="/usr/es/sbin/cluster/utilities" if [[ -n $MASK ]]; then typeset AF=$($HAUTILS/cllsif -J \| -Sn $IP 2>/dev/null | cut -d\| -f 15) if [[ -z $AF || $AF != AF_INET* ]]; then typeset NAME="" IS="" ADDR="" REM="" /usr/bin/host $IP | read NAME IS ADDR REM AF="AF_INET6" if [[ $NAME == +([0-9])\.+([0-9])\.+([0-9])\.+([0-9]) || $ADDR == +([0-9])\.+([0-9])\.+([0-9])\.+([0-9]) ]] then AF="AF_INET" fi fi typeset MASK_TYPE="NETMASK" # For IPv4 [[ $AF == "AF_INET6" ]] && MASK_TYPE="PREFIX" # For IPv6 $HAUTILS/clmgr add service_ip $IP $MASK_TYPE=$MASK NETWORK=$NW else $HAUTILS/clmgr add service_ip $IP NETWORK=$NW fi return $? } cmd_to_exec_cm_change_service_ip.dialogChange/Show a Service IP Label/Addresscluster.catcmd_to_exec() { # smit adds spaces between opt args - get rid of them and parse input echo $* | sed 's/ //g' | IFS=: read junk OLD_NAME NEW_NAME NEW_PREFIX_LEN NEW_NETWORK NEW_GROUP # sanity check the input if [[ -z $(/usr/es/sbin/cluster/utilities/clodmget -q"ip_label=$OLD_NAME" HACMPadapter) ]] then dspmsg -s 27 scripts.cat 28 "$OLD_NAME does not exist " $OLD_NAME exit 1 fi OLD_NETWORK=$(/usr/es/sbin/cluster/utilities/clodmget -q"ip_label=$OLD_NAME" -f network -n HACMPadapter) OLD_NIMNAME=$(/usr/es/sbin/cluster/utilities/clodmget -q"name=$OLD_NETWORK" -f nimname -n HACMPnetwork) if [[ -z $NEW_NAME ]]; then NEW_NAME=$OLD_NAME fi if [[ -z $OLD_NETWORK ]]; then NEW_NETWORK=$OLD_NETWORK fi NEW_NIMNAME=$(/usr/es/sbin/cluster/utilities/clodmget -q"name = $OLD_NETWORK" -f nimname -n HACMPnetwork) /usr/es/sbin/cluster/utilities/clchnode -T service -a $OLD_NAME:$NEW_NAME:$NEW_NIMNAME:$NEW_NETWORK::service:::$NEW_PREFIX_LEN: if [[ $? != 0 ]]; then exit -1 fi # if group name changes, remove then re-add OLD_GROUP=$(/usr/es/sbin/cluster/utilities/clodmget -q "name=SERVICE_LABEL and value=$NEW_NAME" -f group -n HACMPresource) if [[ "$OLD_GROUP" != "$NEW_GROUP" ]]; then /usr/es/sbin/cluster/utilities/clchres -d -g $OLD_GROUP "SERVICE_LABEL=$NEW_NAME" /usr/es/sbin/cluster/utilities/clchres -a -g $NEW_GROUP "SERVICE_LABEL=$NEW_NAME" fi } cmd_to_execmain() { HEADER=$(/usr/es/sbin/cluster/utilities/cl_harvestIP_scripts -u $1 | head -1) print $HEADER":rgname" OLD_GROUP=$(/usr/es/sbin/cluster/utilities/clodmget -q "value=$1" -f group -n HACMPresource) DATA=$(/usr/es/sbin/cluster/utilities/cl_harvestIP_scripts -u $1 | tail -1) print $DATA":"$OLD_GROUP } main_rawname_cm_change_service_ip.dialog.sitesChange/Show a Service IP Label/Addresscluster.catcmd_to_exec() { # smit adds spaces between opt args - get rid of them and parse input echo $* | sed 's/ //g' | IFS=: read junk OLD_NAME NEW_NAME NEW_PREFIX_LEN NEW_NETWORK NEW_GROUP SITE_NAME # sanity check the input if [[ -z $(/usr/es/sbin/cluster/utilities/clodmget -q"ip_label=$OLD_NAME" HACMPadapter) ]] then dspmsg -s 27 scripts.cat 28 "$OLD_NAME does not exist " $OLD_NAME exit 1 fi if [[ -z $NEW_NAME ]]; then NEW_NAME=$OLD_NAME fi if [[ -z $NEW_NETWORK ]]; then NEW_NETWORK=$OLD_NETWORK fi # if old label was in a resource group, delete it from the group # before changing the service label OLD_GROUP=$(/usr/es/sbin/cluster/utilities/clodmget -q "name=SERVICE_LABEL and value=$NEW_NAME" -f group -n HACMPresource) if [[ -n "$OLD_GROUP" && "$OLD_GROUP" != "$NEW_GROUP" ]]; then /usr/es/sbin/cluster/utilities/clchres -d -g $OLD_GROUP "SERVICE_LABEL=$NEW_NAME" fi # now modify the label /usr/es/sbin/cluster/utilities/clmgr modify service_ip $OLD_NAME NAME=$NEW_NAME NETWORK=$NEW_NETWORK PREFIX=$NEW_PREFIX_LEN SITE=$SITE_NAME if [[ $? != 0 ]]; then exit -1 fi # now add it to resource group if [[ -n "$NEW_GROUP" && "$OLD_GROUP" != "$NEW_GROUP" ]]; then /usr/es/sbin/cluster/utilities/clchres -a -g $NEW_GROUP "SERVICE_LABEL=$NEW_NAME" fi } cmd_to_execmain() { HEADER=$(/usr/es/sbin/cluster/utilities/cl_harvestIP_scripts -u $1 | head -1) print $HEADER":rgname:sitename" OLD_GROUP=$(/usr/es/sbin/cluster/utilities/clodmget -q "value=$1" -f group -n HACMPresource) OLD_SITE=$(/usr/es/sbin/cluster/utilities/clodmget -q "ip_label=$1" -f sitename -n HACMPadapter) DATA=$(/usr/es/sbin/cluster/utilities/cl_harvestIP_scripts -u $1 | tail -1) print $DATA":"$OLD_GROUP":"$OLD_SITE } main_rawname_cm_delete_service_ip.dialogRemove Service IP Label(s)/Address(es)cluster.cat/usr/es/sbin/cluster/utilities/clrmnode _cm_change_show_service_ip_distribution_preferenceConfigure Service IP Labels/Address Distribution Preferencecluster.cat/usr/es/sbin/cluster/utilities/clmodnetwork -mcmd_to_discover() { # output a header of our making echo "#netname:sldp:srvlb" # find the setting from the adapter odm MA=$(odmget -q"network = $1 AND function != boot" HACMPadapter | grep "max_aliases" | awk '{print $3}' | sort -n|tail -1) #Find the adapter with this setting to display #To avoid inconsistency of displaying quotes around default ip_label #and no quotes for the ip_label chosen from a selector screen IPL=$(/usr/es/sbin/cluster/utilities/clodmget -n -q "max_aliases =$MA and network = $1" -f ip_label HACMPadapter) # decode the setting case $MA in 0 | 2 ) echo "$1:rdp_anti_collocation:" ;; 1027 ) echo "$1:sldp_anti_collocation_and_first:$IPL" ;; 1 ) echo "$1:rdp_collocation:" ;; 771 ) echo "$1:sldp_collocation_and_first:$IPL" ;; 1795 ) echo "$1:sldp_firstalias_none:" ;; 259 ) echo "$1:sldp_collocation_with_persistent:" ;; 1283 ) echo "$1:sldp_collocation_with_persistent_and_first:$IPL" ;; 515 ) echo "$1:sldp_anti_collocation_with_persistent:" ;; 1539 ) echo "$1:sldp_anti_collocation_with_persistent_and_first:$IPL" ;; * ) echo "$1:sldp_none" ;; esac } cmd_to_discover $*_rawnamecluster_hlp.cat Learn more about Service Labelscluster.catmain() { dspmsg -s 40 cluster.cat 169 " PowerHA SystemMirror provides high availability for applications by detecting and recovering from failures of resources the application depends on like disks and network adapters, as well as the application itself. The service IP is the address a client outside the cluster would use to access the application running on the cluster nodes. PowerHA SystemMirror keeps this address highly available by moving it between network interfaces as those interfaces fail. " } main_claddtape.dialogAdd a Tape Resourcecluster.cat/usr/es/sbin/cluster/utilities/claddtape_clchtape.dialogChange Tape Resourcecluster.cat/usr/es/sbin/cluster/utilities/clchtape/usr/es/sbin/cluster/utilities/cllstape -c -h-n _rawname_clm.clrmtapeRemove a Tape Resourcecluster.cat/usr/es/sbin/cluster/utilities/clrmtape_cm_add_custom_resource_group_dialog.nositesAdd a Resource Groupcluster.cat/usr/es/sbin/cluster/utilities/claddgrp _clm.cm_chg_cus_grp.nositesChange/Show Nodes and Policies for a Resource Groupcluster.cat/usr/es/sbin/cluster/utilities/clchgrpcmd_to_discover () { args=$*; grp_out=`/usr/es/sbin/cluster/utilities/clgetgrp -c $args` if [ $? -ne 0 ] then exit 1; fi grp_head=`/usr/es/sbin/cluster/utilities/clgetgrp -c $args | grep '#'` grp_data=`/usr/es/sbin/cluster/utilities/clgetgrp -c $args | grep -v '#'` time=`/usr/es/sbin/cluster/utilities/clchmsgtimer | grep -v '#'` time1=`echo $time|cut -f1 -d :` time2=`echo $time|cut -f2 -d :` time=`expr $time1 + $time2` if [ $time -eq 0 ] then time=180 fi echo $grp_head:time echo $grp_data:$time Seconds } cmd_to_discover-g _rawnamecluster_hlp.cat_clm.cm_cfg_res.customE1Change/Show All Resources and Attributes for a Custom Resource Groupcluster.cat/usr/es/sbin/cluster/utilities/clmgr modify resource_group cmd_to_discover () { /usr/es/sbin/cluster/utilities/clgetgrp -fstartup $* | read STPOLICY /usr/es/sbin/cluster/utilities/clgetgrp -ffallover $* | read FOPOLICY /usr/es/sbin/cluster/utilities/clgetgrp -ffallback $* | read FBPOLICY if ! /usr/bin/lslpp -L cluster.es.genxd.cmds > /dev/null 2>&1 then /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep "#" | read HEAD /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" | read DATA echo "$HEAD:STARTUP:FALLOVER:FALLBACK" echo "$DATA:$STPOLICY:$FOPOLICY:$FBPOLICY" else /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s ds8k_gm $* | read D8SKRES /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s xiv_rm $* | read XIVRES /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s ds8k_inband_mm $* | read DS8KMMRES /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep "#" | sed "s/:GENXD_REP_RESOURCE:/:/" | read HEAD MIRROR_GRP=$(/usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" |cut -f36 -d:) if [[ -n $MIRROR_GRP ]] then /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" | sed "s/:$MIRROR_GRP:/:/" | read DATA else /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" |awk 'BEGIN{FS=OFS=":"}{$36="++"}{print}'|sed 's/:++:/:/'| read DATA fi echo "$HEAD:STARTUP:FALLOVER:FALLBACK:GENXD_REP_RESOURCE:GENXD_REP_RESOURCE_XIV:DS8K_MM_RESOURCES" echo "$DATA:$STPOLICY:$FOPOLICY:$FBPOLICY:$D8SKRES:$XIVRES:$DS8KMMRES" fi } cmd_to_discover-g _rawname_clm.cm_cfg_res.customE2Change/Show All Resources and Attributes for a Custom Resource Groupcluster.cat/usr/es/sbin/cluster/utilities/clmgr modify resource_group cmd_to_discover () { /usr/es/sbin/cluster/utilities/clgetgrp -fstartup $* | read STPOLICY /usr/es/sbin/cluster/utilities/clgetgrp -ffallover $* | read FOPOLICY /usr/es/sbin/cluster/utilities/clgetgrp -ffallback $* | read FBPOLICY if ! /usr/bin/lslpp -L cluster.es.genxd.cmds > /dev/null 2>&1 then /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep "#" | read HEAD /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" | read DATA echo "$HEAD:STARTUP:FALLOVER:FALLBACK" echo "$DATA:$STPOLICY:$FOPOLICY:$FBPOLICY" else /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s ds8k_gm $* | read D8SKRES /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s xiv_rm $* | read XIVRES /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s ds8k_inband_mm $* | read DS8KMMRES /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep "#" | sed "s/:GENXD_REP_RESOURCE:/:/" | read HEAD MIRROR_GRP=$(/usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" |cut -f36 -d:) if [[ -n $MIRROR_GRP ]] then /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" | sed "s/:$MIRROR_GRP:/:/" | read DATA else /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" |awk 'BEGIN{FS=OFS=":"}{$36="++"}{print}'|sed 's/:++:/:/'| read DATA fi echo "$HEAD:STARTUP:FALLOVER:FALLBACK:GENXD_REP_RESOURCE:GENXD_REP_RESOURCE_XIV:DS8K_MM_RESOURCES" echo "$DATA:$STPOLICY:$FOPOLICY:$FBPOLICY:$D8SKRES:$XIVRES:$DS8KMMRES" fi } cmd_to_discover-g _rawname_clm.cm_cfg_res.customE3Change/Show All Resources and Attributes for a Resource Groupcluster.cat/usr/es/sbin/cluster/utilities/clmgr modify resource_group cmd_to_discover () { /usr/es/sbin/cluster/utilities/clgetgrp -fstartup $* | read STPOLICY /usr/es/sbin/cluster/utilities/clgetgrp -ffallover $* | read FOPOLICY /usr/es/sbin/cluster/utilities/clgetgrp -ffallback $* | read FBPOLICY if ! /usr/bin/lslpp -L cluster.es.genxd.cmds > /dev/null 2>&1 then /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep "#" | read HEAD /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" | read DATA echo "$HEAD:STARTUP:FALLOVER:FALLBACK" echo "$DATA:$STPOLICY:$FOPOLICY:$FBPOLICY" else /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s ds8k_gm $* | read D8SKRES /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s xiv_rm $* | read XIVRES /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s ds8k_inband_mm $* | read DS8KMMRES /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep "#" | sed "s/:GENXD_REP_RESOURCE:/:/" | read HEAD MIRROR_GRP=$(/usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" |cut -f36 -d:) if [[ -n $MIRROR_GRP ]] then /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" | sed "s/:$MIRROR_GRP:/:/" | read DATA else /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" |awk 'BEGIN{FS=OFS=":"}{$36="++"}{print}'|sed 's/:++:/:/'| read DATA fi echo "$HEAD:STARTUP:FALLOVER:FALLBACK:GENXD_REP_RESOURCE:GENXD_REP_RESOURCE_XIV:DS8K_MM_RESOURCES" echo "$DATA:$STPOLICY:$FOPOLICY:$FBPOLICY:$D8SKRES:$XIVRES:$DS8KMMRES" fi } cmd_to_discover-g _rawname_clm.cm_cfg_res.customE4Change/Show All Resources and Attributes for a Resource Groupcluster.cat/usr/es/sbin/cluster/utilities/clmgr modify resource_group cmd_to_discover () { /usr/es/sbin/cluster/utilities/clgetgrp -fstartup $* | read STPOLICY /usr/es/sbin/cluster/utilities/clgetgrp -ffallover $* | read FOPOLICY /usr/es/sbin/cluster/utilities/clgetgrp -ffallback $* | read FBPOLICY if ! /usr/bin/lslpp -L cluster.es.genxd.cmds > /dev/null 2>&1 then /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep "#" | read HEAD /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" | read DATA echo "$HEAD:STARTUP:FALLOVER:FALLBACK" echo "$DATA:$STPOLICY:$FOPOLICY:$FBPOLICY" else /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s ds8k_gm $* | read D8SKRES /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s xiv_rm $* | read XIVRES /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s ds8k_inband_mm $* | read DS8KMMRES /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep "#" | sed "s/:GENXD_REP_RESOURCE:/:/" | read HEAD MIRROR_GRP=$(/usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" |cut -f36 -d:) if [[ -n $MIRROR_GRP ]] then /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" | sed "s/:$MIRROR_GRP:/:/" | read DATA else /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" |awk 'BEGIN{FS=OFS=":"}{$36="++"}{print}'|sed 's/:++:/:/'| read DATA fi echo "$HEAD:STARTUP:FALLOVER:FALLBACK:GENXD_REP_RESOURCE:GENXD_REP_RESOURCE_XIV:DS8K_MM_RESOURCES" echo "$DATA:$STPOLICY:$FOPOLICY:$FBPOLICY:$D8SKRES:$XIVRES:$DS8KMMRES" fi } cmd_to_discover-g _rawname_clm.cm_cfg_res.customE5Change/Show All Resources and Attributes for a Resource Groupcluster.cat/usr/es/sbin/cluster/utilities/clmgr modify resource_group cmd_to_discover () { /usr/es/sbin/cluster/utilities/clgetgrp -fstartup $* | read STPOLICY /usr/es/sbin/cluster/utilities/clgetgrp -ffallover $* | read FOPOLICY /usr/es/sbin/cluster/utilities/clgetgrp -ffallback $* | read FBPOLICY if ! /usr/bin/lslpp -L cluster.es.genxd.cmds > /dev/null 2>&1 then /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep "#" | read HEAD /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" | read DATA echo "$HEAD:STARTUP:FALLOVER:FALLBACK" echo "$DATA:$STPOLICY:$FOPOLICY:$FBPOLICY" else /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s ds8k_gm $* | read D8SKRES /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s xiv_rm $* | read XIVRES /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s ds8k_inband_mm $* | read DS8KMMRES /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep "#" | sed "s/:GENXD_REP_RESOURCE:/:/" | read HEAD MIRROR_GRP=$(/usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" |cut -f36 -d:) if [[ -n $MIRROR_GRP ]] then /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" | sed "s/:$MIRROR_GRP:/:/" | read DATA else /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" |awk 'BEGIN{FS=OFS=":"}{$36="++"}{print}'|sed 's/:++:/:/'| read DATA fi echo "$HEAD:STARTUP:FALLOVER:FALLBACK:GENXD_REP_RESOURCE:GENXD_REP_RESOURCE_XIV:DS8K_MM_RESOURCES" echo "$DATA:$STPOLICY:$FOPOLICY:$FBPOLICY:$D8SKRES:$XIVRES:$DS8KMMRES" fi } cmd_to_discover-g _rawname_clm.cm_cfg_res.customEDP1Change/Show All Resources and Attributes for a Resource Groupcluster.cat /usr/es/sbin/cluster/utilities/clmgr modify resource_group cmd_to_discover () { /usr/es/sbin/cluster/utilities/clgetgrp -fstartup $* | read STPOLICY /usr/es/sbin/cluster/utilities/clgetgrp -ffallover $* | read FOPOLICY /usr/es/sbin/cluster/utilities/clgetgrp -ffallback $* | read FBPOLICY if ! /usr/bin/lslpp -L cluster.es.genxd.cmds > /dev/null 2>&1 then /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep "#" | read HEAD /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" | read DATA echo "$HEAD:STARTUP:FALLOVER:FALLBACK" echo "$DATA:$STPOLICY:$FOPOLICY:$FBPOLICY" else /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s ds8k_gm $* | read D8SKRES /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s xiv_rm $* | read XIVRES /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s ds8k_inband_mm $* | read DS8KMMRES /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep "#" | sed "s/:GENXD_REP_RESOURCE:/:/" | read HEAD MIRROR_GRP=$(/usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" |cut -f36 -d:) if [[ -n $MIRROR_GRP ]] then /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" | sed "s/:$MIRROR_GRP:/:/" | read DATA else /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" |awk 'BEGIN{FS=OFS=":"}{$36="++"}{print}'|sed 's/:++:/:/'| read DATA fi echo "$HEAD:STARTUP:FALLOVER:FALLBACK:GENXD_REP_RESOURCE:GENXD_REP_RESOURCE_XIV:DS8K_MM_RESOURCES" echo "$DATA:$STPOLICY:$FOPOLICY:$FBPOLICY:$D8SKRES:$XIVRES:$DS8KMMRES" fi } cmd_to_discover-g _rawname_clm.cm_cfg_res.customEDP2Change/Show All Resources and Attributes for a Resource Groupcluster.cat/usr/es/sbin/cluster/utilities/clmgr modify resource_group cmd_to_discover () { /usr/es/sbin/cluster/utilities/clgetgrp -fstartup $* | read STPOLICY /usr/es/sbin/cluster/utilities/clgetgrp -ffallover $* | read FOPOLICY /usr/es/sbin/cluster/utilities/clgetgrp -ffallback $* | read FBPOLICY if ! /usr/bin/lslpp -L cluster.es.genxd.cmds > /dev/null 2>&1 then /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep "#" | read HEAD /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" | read DATA echo "$HEAD:STARTUP:FALLOVER:FALLBACK" echo "$DATA:$STPOLICY:$FOPOLICY:$FBPOLICY" else /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s ds8k_gm $* | read D8SKRES /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s xiv_rm $* | read XIVRES /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s ds8k_inband_mm $* | read DS8KMMRES /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep "#" | sed "s/:GENXD_REP_RESOURCE:/:/" | read HEAD MIRROR_GRP=$(/usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" |cut -f36 -d:) if [[ -n $MIRROR_GRP ]] then /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" | sed "s/:$MIRROR_GRP:/:/" | read DATA else /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" |awk 'BEGIN{FS=OFS=":"}{$36="++"}{print}'|sed 's/:++:/:/'| read DATA fi echo "$HEAD:STARTUP:FALLOVER:FALLBACK:GENXD_REP_RESOURCE:GENXD_REP_RESOURCE_XIV:DS8K_MM_RESOURCES" echo "$DATA:$STPOLICY:$FOPOLICY:$FBPOLICY:$D8SKRES:$XIVRES:$DS8KMMRES" fi } cmd_to_discover-g _rawname_clm.cm_cfg_res.customEDP3Change/Show All Resources and Attributes for a Resource Groupcluster.cat/usr/es/sbin/cluster/utilities/clmgr modify resource_group cmd_to_discover () { /usr/es/sbin/cluster/utilities/clgetgrp -fstartup $* | read STPOLICY /usr/es/sbin/cluster/utilities/clgetgrp -ffallover $* | read FOPOLICY /usr/es/sbin/cluster/utilities/clgetgrp -ffallback $* | read FBPOLICY if ! /usr/bin/lslpp -L cluster.es.genxd.cmds > /dev/null 2>&1 then /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep "#" | read HEAD /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" | read DATA echo "$HEAD:STARTUP:FALLOVER:FALLBACK" echo "$DATA:$STPOLICY:$FOPOLICY:$FBPOLICY" else /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s ds8k_gm $* | read D8SKRES /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s xiv_rm $* | read XIVRES /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s ds8k_inband_mm $* | read DS8KMMRES /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep "#" | sed "s/:GENXD_REP_RESOURCE:/:/" | read HEAD MIRROR_GRP=$(/usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" |cut -f36 -d:) if [[ -n $MIRROR_GRP ]] then /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" | sed "s/:$MIRROR_GRP:/:/" | read DATA else /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" |awk 'BEGIN{FS=OFS=":"}{$36="++"}{print}'|sed 's/:++:/:/'| read DATA fi echo "$HEAD:STARTUP:FALLOVER:FALLBACK:GENXD_REP_RESOURCE:GENXD_REP_RESOURCE_XIV:DS8K_MM_RESOURCES" echo "$DATA:$STPOLICY:$FOPOLICY:$FBPOLICY:$D8SKRES:$XIVRES:$DS8KMMRES" fi } cmd_to_discover-g _rawname_clm.cm_cfg_res.customEDP4Change/Show All Resources and Attributes for a Resource Groupcluster.cat/usr/es/sbin/cluster/utilities/clmgr modify resource_group cmd_to_discover () { /usr/es/sbin/cluster/utilities/clgetgrp -fstartup $* | read STPOLICY /usr/es/sbin/cluster/utilities/clgetgrp -ffallover $* | read FOPOLICY /usr/es/sbin/cluster/utilities/clgetgrp -ffallback $* | read FBPOLICY if ! /usr/bin/lslpp -L cluster.es.genxd.cmds > /dev/null 2>&1 then /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep "#" | read HEAD /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" | read DATA echo "$HEAD:STARTUP:FALLOVER:FALLBACK" echo "$DATA:$STPOLICY:$FOPOLICY:$FBPOLICY" else /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s ds8k_gm $* | read D8SKRES /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s xiv_rm $* | read XIVRES /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s ds8k_inband_mm $* | read DS8KMMRES /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep "#" | sed "s/:GENXD_REP_RESOURCE:/:/" | read HEAD MIRROR_GRP=$(/usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" |cut -f36 -d:) if [[ -n $MIRROR_GRP ]] then /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" | sed "s/:$MIRROR_GRP:/:/" | read DATA else /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" |awk 'BEGIN{FS=OFS=":"}{$36="++"}{print}'|sed 's/:++:/:/'| read DATA fi echo "$HEAD:STARTUP:FALLOVER:FALLBACK:GENXD_REP_RESOURCE:GENXD_REP_RESOURCE_XIV:DS8K_MM_RESOURCES" echo "$DATA:$STPOLICY:$FOPOLICY:$FBPOLICY:$D8SKRES:$XIVRES:$DS8KMMRES" fi } cmd_to_discover-g _rawname_clm.cm_cfg_res.customEDP5Change/Show All Resources and Attributes for a Resource Groupcluster.cat/usr/es/sbin/cluster/utilities/clmgr modify resource_group cmd_to_discover () { /usr/es/sbin/cluster/utilities/clgetgrp -fstartup $* | read STPOLICY /usr/es/sbin/cluster/utilities/clgetgrp -ffallover $* | read FOPOLICY /usr/es/sbin/cluster/utilities/clgetgrp -ffallback $* | read FBPOLICY if ! /usr/bin/lslpp -L cluster.es.genxd.cmds > /dev/null 2>&1 then /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep "#" | read HEAD /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" | read DATA echo "$HEAD:STARTUP:FALLOVER:FALLBACK" echo "$DATA:$STPOLICY:$FOPOLICY:$FBPOLICY" else /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s ds8k_gm $* | read D8SKRES /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s xiv_rm $* | read XIVRES /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s ds8k_inband_mm $* | read DS8KMMRES /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep "#" | sed "s/:GENXD_REP_RESOURCE:/:/" | read HEAD MIRROR_GRP=$(/usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" |cut -f36 -d:) if [[ -n $MIRROR_GRP ]] then /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" | sed "s/:$MIRROR_GRP:/:/" | read DATA else /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" |awk 'BEGIN{FS=OFS=":"}{$36="++"}{print}'|sed 's/:++:/:/'| read DATA fi echo "$HEAD:STARTUP:FALLOVER:FALLBACK:GENXD_REP_RESOURCE:GENXD_REP_RESOURCE_XIV:DS8K_MM_RESOURCES" echo "$DATA:$STPOLICY:$FOPOLICY:$FBPOLICY:$D8SKRES:$XIVRES:$DS8KMMRES" fi } cmd_to_discover-g _rawname_clm.cm_del_grpRemove a Resource Groupcluster.cat/usr/es/sbin/cluster/utilities/clrmgrpcluster_hlp.cat_cm_rg_dependencies.add.dialogAdd Parent/Child Dependency between Resource Groupscluster.cat/usr/es/sbin/cluster/utilities/clrgdependency -t'PARENT_CHILD' -acluster_hlp.cat_cm_rg_dependencies.ch.dialogChange/Show Parent/Child Dependency between Resource Groupscluster.cat/usr/es/sbin/cluster/utilities/clrgdependency -t'PARENT_CHILD' -ucluster_hlp.cat_cm_rg_dependencies.rm.dialogRemove Parent/Child Dependency between Resource Groupscluster.cat/usr/es/sbin/cluster/utilities/clrgdependency -t'PARENT_CHILD' -dcluster_hlp.cat_cm_rg_dependencies.display.dialog.parentDisplay All Resource Group Dependencies per Parentcluster.cat/usr/es/sbin/cluster/utilities/clrgdependency -t'PARENT_CHILD' -spcluster_hlp.cat_cm_rg_dependencies.display.dialog.childDisplay All Resource Group Dependencies per Childcluster.cat/usr/es/sbin/cluster/utilities/clrgdependency -t'PARENT_CHILD' -sccluster_hlp.cat_cm_rg_dependencies_startafter.add.dialogAdd Start After Resource Group Dependencycluster.cat/usr/es/sbin/cluster/utilities/clrgdependency -t'START_AFTER' -acluster_hlp.cat_cm_rg_dependencies_startafter.ch.dialogChange/Show Start After Resource Group Dependencycluster.cat/usr/es/sbin/cluster/utilities/clrgdependency -t'START_AFTER' -ucluster_hlp.cat_cm_rg_dependencies_startafter.rm.dialogRemove Start After Resource Group Dependencycluster.cat/usr/es/sbin/cluster/utilities/clrgdependency -t'START_AFTER' -dcluster_hlp.cat_cm_rg_dependencies_startafter.display.dialog.sourceDisplay All Start After Resource Group Dependencies per Sourcecluster.cat/usr/es/sbin/cluster/utilities/clrgdependency -t'START_AFTER' -spcluster_hlp.cat_cm_rg_dependencies_startafter.display.dialog.targetDisplay All Start After Resource Group Dependencies per Targetcluster.cat/usr/es/sbin/cluster/utilities/clrgdependency -t'START_AFTER' -sccluster_hlp.cat_cm_rg_dependencies_stopafter.add.dialogAdd Stop After Resource Group Dependencycluster.cat/usr/es/sbin/cluster/utilities/clrgdependency -t'STOP_AFTER' -acluster_hlp.cat_cm_rg_dependencies_stopafter.ch.dialogChange/Show Stop After Resource Group Dependencycluster.cat/usr/es/sbin/cluster/utilities/clrgdependency -t'STOP_AFTER' -ucluster_hlp.cat_cm_rg_dependencies_stopafter.rm.dialogRemove Stop After Resource Group Dependencycluster.cat/usr/es/sbin/cluster/utilities/clrgdependency -t'STOP_AFTER' -dcluster_hlp.cat_cm_rg_dependencies_stopafter.display.dialog.sourceDisplay All Resource Group Dependencies per Sourcecluster.cat/usr/es/sbin/cluster/utilities/clrgdependency -t'STOP_AFTER' -spcluster_hlp.cat_cm_rg_dependencies_stopafter.display.dialog.targetDisplay All Resource Group Dependencies per Targetcluster.cat/usr/es/sbin/cluster/utilities/clrgdependency -t'STOP_AFTER' -sccluster_hlp.cat_cm_rg_osn_dependencies.add.dialogAdd Online on the same node Dependency between Resource Groupscluster.cat/usr/es/sbin/cluster/utilities/clrgdependency -t'NODECOLLOCATION' -acluster_hlp.cat_cm_rg_odn_dependencies.ch.dialogConfigure Online on different nodes Dependencycluster.cat/usr/es/sbin/cluster/utilities/clrgdependency -t'ANTICOLLOCATION' -u/usr/es/sbin/cluster/utilities/clrgdependency -t'ANTICOLLOCATION' -slcluster_hlp.cat_cm_rg_odn_dependencies.rm.dialogRemove Online on the Different node Dependency between Resource Groupscluster.cat/usr/es/sbin/cluster/utilities/clrgdependency -t'ANTICOLLOCATION' -u -hp'' -ip'' -lp'' cluster_hlp.cat_cm_rg_osn_dependencies.ch.dialogChange/Show Online on the same node Dependency between Resource Groupscluster.cat/usr/es/sbin/cluster/utilities/clrgdependency -t'NODECOLLOCATION' -ucluster_hlp.cat_cm_rg_osn_dependencies.rm.dialogRemove Online on the same node Dependency between Resource Groupscluster.cat/usr/es/sbin/cluster/utilities/clrgdependency -t'NODECOLLOCATION' -dcluster_hlp.cat_cm_rg_odn_dependencies.add.dialogConfigure Online on different nodes Dependencycluster.cat/usr/es/sbin/cluster/utilities/clrgdependency -t'ANTICOLLOCATION' -ucluster_hlp.cat_clm.cm_process_ordChange/Show Resource Group Processing Ordercluster.cat/usr/es/sbin/cluster/utilities/clrgorder -c/usr/es/sbin/cluster/utilities/clrgorder -scluster_hlp.cat_cm_cfg_wlm_runtimeConfigure PowerHA Workload Manager Parameterscluster.cat/usr/es/sbin/cluster/utilities/clwlmruntime -a/usr/es/sbin/cluster/utilities/clwlmruntime -lcluster_hlp.catcm_timer_add.dialog_opt.dailyConfigure Daily Fallback Timer Policycluster.cat/usr/es/sbin/cluster/utilities/cltimerpolicy -a add -r dailycluster_hlp.catcm_timer_add.dialog_opt.monthlyConfigure Monthly Fallback Timer Policycluster.cat/usr/es/sbin/cluster/utilities/cltimerpolicy -a add -r monthlycluster_hlp.catcm_timer_add.dialog_opt.onceConfigure Specific Date Fallback Timer Policycluster.cat/usr/es/sbin/cluster/utilities/cltimerpolicy -a add -r oncecluster_hlp.catcm_timer_add.dialog_opt.weeklyConfigure Weekly Fallback Timer Policycluster.cat/usr/es/sbin/cluster/utilities/cltimerpolicy -a add -r weeklycluster_hlp.catcm_timer_add.dialog_opt.yearlyConfigure Yearly Fallback Timer Policycluster.cat/usr/es/sbin/cluster/utilities/cltimerpolicy -a add -r yearlycluster_hlp.catcm_timer_update.dialog_opt.dailyChange/Show Daily Fallback Timer Policycluster.cat/usr/es/sbin/cluster/utilities/cltimerpolicy -a update -r daily/usr/es/sbin/cluster/utilities/cltimerpolicy -a list -f smit -n_rawnamecluster_hlp.catcm_timer_update.dialog_opt.monthlyChange/Show Monthly Fallback Timer Policycluster.cat/usr/es/sbin/cluster/utilities/cltimerpolicy -a update -r monthly/usr/es/sbin/cluster/utilities/cltimerpolicy -a list -f smit -n_rawnamecluster_hlp.catcm_timer_update.dialog_opt.onceChange/Show Specific Date Fallback Timer Policycluster.cat/usr/es/sbin/cluster/utilities/cltimerpolicy -a update -r once/usr/es/sbin/cluster/utilities/cltimerpolicy -a list -f smit -n_rawnamecluster_hlp.catcm_timer_update.dialog_opt.weeklyChange/Show Weekly Fallback Timer Policycluster.cat/usr/es/sbin/cluster/utilities/cltimerpolicy -a update -r weekly/usr/es/sbin/cluster/utilities/cltimerpolicy -a list -f smit -n_rawnamecluster_hlp.catcm_timer_update.dialog_opt.yearlyChange/Show Yearly Fallback Timer Policycluster.cat/usr/es/sbin/cluster/utilities/cltimerpolicy -a update -r yearly/usr/es/sbin/cluster/utilities/cltimerpolicy -a list -f smit -n_rawnamecluster_hlp.catcm_timer_remove.dialog_optRemove Fallback Timer Policycluster.cat/usr/es/sbin/cluster/utilities/cltimerpolicy -a remove cluster_hlp.catcm_settling_timer_menu.optConfigure Settling Time for Resource Groupscluster.cat/usr/es/sbin/cluster/utilities/clsettlingtime /usr/es/sbin/cluster/utilities/clsettlingtime list cluster_hlp.cat_cllsres.dialog/usr/es/sbin/cluster/utilities/clshowres_clshowres.dialog/usr/es/sbin/cluster/utilities/clshowres Learn more about Resource Groupscluster.catmain() { dspmsg -s 40 cluster.cat 168 " PowerHA SystemMirror provides high availability for applications by detecting and recovering from failures of resources the application depends on - like disks and network adapters - as well as the application itself. These resources are managed as a group so that the entire application can be recovered as a unit. First step is to create the group and define the basic attributes like the nodes that can host it, and how you want it to behave at startup and when a failure occurs. Once you have defined the basics you can begin to add resources - service IPs, applications and storage - into the group. " } main_clverify.dialogVerify PowerHA SystemMirror Configurationcluster.catmain() { /usr/es/sbin/cluster/diag/clconfig -v -O $* } mainecho \#VALUE;odmget -q'type=verify' HACMPdaemons|grep 'value = '|awk -F\" '{print $2} '|sed 's/^ *//'cluster_hlp.cat_clverify_custom_dialog_addAdd a Custom Verification Methodcluster.cat/usr/es/sbin/cluster/utilities/claddcustom -t verifycluster_hlp.cat_clverify_custom_dialog_chaChange/Show a Custom Verification Methodcluster.cat/usr/es/sbin/cluster/utilities/clchcustom -t verify/usr/es/sbin/cluster/utilities/cllscustom -c -t verify-n _rawnamecluster_hlp.cat_clverify_custom_dialog_remRemove a Custom Verification Methodcluster.cat/usr/es/sbin/cluster/utilities/clrmcustom -t verify -n/usr/es/sbin/cluster/utilities/cllscustom -c -t verify-n _rawnamecluster_hlp.catclautover.dialogAutomatic Cluster Configuration Monitoringcluster.catcmd_to_exec() { DEFAULT=$(dspmsg -s 1 cluster.cat 860 Default) if [[ "-n$DEFAULT" = "$2" ]]; then /usr/es/sbin/cluster/utilities/clautoconfigmonitor "$1" "$3" "$4" else /usr/es/sbin/cluster/utilities/clautoconfigmonitor "$@" fi return $? } cmd_to_execcmd_to_discover() { noautoverification=`odmget HACMPcluster|egrep -w noautoverification|cut -d' ' -f3` if [[ $noautoverification = 0 ]]; then clverdebug=`dspmsg -s 1 smit.cat 51 'yes,no'| cut -f1 -d','` else clverdebug=`dspmsg -s 1 smit.cat 51 'yes,no'| cut -f2 -d','` fi if [[ $noautoverification != 1 ]]; then noautoverification=`dspmsg -s 1 cluster.cat 862 Enabled,Disabled | awk -F',' '{ print $1 }'` clvernodename=`odmget HACMPcluster|egrep -w clvernodename|cut -d\" -f2` if [[ -z $clvernodename ]]; then clvernodename=$(dspmsg -s 1 cluster.cat 860 Default) fi else noautoverification=`dspmsg -s 1 cluster.cat 862 Enabled,Disabled | awk -F',' '{ print $2 }'` clvernodename=`odmget HACMPcluster|egrep -w clvernodename|cut -d\" -f2` fi clverhour=`odmget HACMPcluster|egrep -w clverhour|cut -d' ' -f3` if [[ $clverhour -lt 10 ]]; then clverhour=0${clverhour} fi echo "#noautoverification:clvernodename:clverhour:clverdebug" echo $noautoverification:$clvernodename:$clverhour:$clverdebug } cmd_to_discover cluster_hlp.cat_cm_view_current_state_menu_dmnView Current State/usr/es/sbin/cluster/utilities/cldumpcm_clsnap_dialog.optCollect Cluster log files for Problem Reportingcluster.cat/usr/es/sbin/cluster/utilities/clsnap cluster_hlp.cat_clm.clrecoverRecover From Script Failurecluster.cat/usr/es/sbin/cluster/utilities/clruncmdcluster_hlp.catscsi_pr.rg.errorRecover Resource Group From SCSI Persistent Reserve Errorcluster.cat/usr/es/sbin/cluster/events/utils/cl_scsipr_recover_rgcluster_hlp.catcm_copy_acd_2dcd.dialog.optRestore System Default Configuration from Active Configurationcluster.catmain() { date | read a b c d junk d=$(echo $d | sed s/:/./g) NAME="Restored_From_ACD.$b.$c.$d" /usr/es/sbin/cluster/utilities/cl_dcd_acd -d'Restored_from_ACD' -n"$NAME" } maincluster_hlp.catRelease Lock Set By Dynamic Reconfigurationcluster.cat/usr/es/sbin/cluster/utilities/cldare -ucluster_hlp.cat_hacmp_testtool_auto_extendedExecute Automated Test Procedure (extended)cluster.cat/usr/es/sbin/cluster/cl_testtool/cl_testtool_autocluster_hlp.cat_hacmp_testtool_customExecute Custom Test Procedurecluster.cat/usr/es/sbin/cluster/cl_testtool/cl_testtoolcluster_hlp.catcl_dare_compare.dialog.optCompare Active and Default Configurationscluster.cat/usr/es/sbin/cluster/utilities/clsnapshot -p,_cm_open_a_smit_session_dialogcspoc.cat/usr/es/sbin/cluster/utilities/clrexec -p/usr/es/sbin/cluster/sbin/cl_errnot -lcluster_hlp.cat/usr/es/sbin/cluster/sbin/cl_errnot -acluster_hlp.cat/usr/es/sbin/cluster/sbin/cl_errnot -dcluster_hlp.cat_cm.add_notifymethAdd a Notify Methodcluster.cat/usr/es/sbin/cluster/utilities/clacdNM -MA/usr/es/sbin/cluster/utilities/cldiscNM defaults_cm.change_notifymethChange/Show a Notify Methodcluster.cat/usr/es/sbin/cluster/utilities/clacdNM -MM/usr/es/sbin/cluster/utilities/cldiscNM_rawname_cm.del_notifymethRemove a Notify Methodcluster.cat/usr/es/sbin/cluster/utilities/clacdNM -MDerr_emulate.dialog.optEmulate Error Log Entrycluster.cat/usr/es/sbin/cluster/utilities/err_convert/usr/es/sbin/cluster/utilities/en_name_methodelabel enamestop_rsctStop RSCT Servicescluster.cat/usr/es/sbin/cluster/utilities/cl_terminate_rsctctod () { /usr/es/sbin/cluster/utilities/get_local_nodename | read nodename echo "#nodename" echo "$nodename" } ctodcm_trc_enable.Enable AIX Tracing for Cluster Resourcescluster.cat/usr/es/sbin/cluster/utilities/clstartAIXtrccm_trc_enable.aix6Enable AIX Tracing for Cluster Resourcescluster.cat/usr/es/sbin/cluster/utilities/clstartAIXtrccm_trc_disableDisable AIX Tracing for Cluster Resourcescluster.cat/usr/es/sbin/cluster/utilities/clstopAIXtrcList Command Groups for AIX Tracing for Cluster Resourcescluster.cat/usr/es/sbin/cluster/utilities/cllsAIXtrcgrp -lcm_trc_addAdd a Command Group for AIX Tracing for Cluster Resourcescluster.cat/usr/es/sbin/cluster/utilities/claddAIXtrcgrpmain() { cmdgrpID=$1 if [[ -n $cmdgrpID ]] then cmdgrpdesc=`/usr/es/sbin/cluster/utilities/cllsAIXtrcgrp -g $cmdgrpID -d` cmdgrpeventgroup=`/usr/es/sbin/cluster/utilities/cllsAIXtrcgrp -g $cmdgrpID -J` cmdgrpeventID=`/usr/es/sbin/cluster/utilities/cllsAIXtrcgrp -g $cmdgrpID -j` cmdgrpset=`/usr/es/sbin/cluster/utilities/cllsAIXtrcgrp -g $cmdgrpID -C` cmdgrprestore=`/usr/es/sbin/cluster/utilities/cllsAIXtrcgrp -g $cmdgrpID -c` fi echo "#cmdgrpdesc:cmdgrpeventgroup:cmdgrpeventID:cmdgrpset:cmdgrprestore" echo "$cmdgrpdesc:$cmdgrpeventgroup:$cmdgrpeventID:$cmdgrpset:$cmdgrprestore" } main_rawnamecm_trc_changeChange / Show a Command Group for AIX Tracing for Cluster Resourcescluster.cat/usr/es/sbin/cluster/utilities/clchAIXtrcgrpmain() { cmdgrpID=$1 cmdgrpdesc=`/usr/es/sbin/cluster/utilities/cllsAIXtrcgrp -g $cmdgrpID -d` cmdgrpeventgroup=`/usr/es/sbin/cluster/utilities/cllsAIXtrcgrp -g $cmdgrpID -J` cmdgrpeventID=`/usr/es/sbin/cluster/utilities/cllsAIXtrcgrp -g $cmdgrpID -j` cmdgrpset=`/usr/es/sbin/cluster/utilities/cllsAIXtrcgrp -g $cmdgrpID -C` cmdgrprestore=`/usr/es/sbin/cluster/utilities/cllsAIXtrcgrp -g $cmdgrpID -c` echo "#cmdgrpID:cmdgrpdesc:cmdgrpeventgroup:cmdgrpeventID:cmdgrpset:cmdgrprestore" echo "$cmdgrpID:$cmdgrpdesc:$cmdgrpeventgroup:$cmdgrpeventID:$cmdgrpset:$cmdgrprestore" } main_rawnamecm_trc_removeRemove Command Groups for AIX Tracing for Cluster Resourcescluster.cat/usr/es/sbin/cluster/utilities/clrmAIXtrcgrp_clm_replace_reposSelect a new Cluster repository diskcluster.catmain() { cluster_name=$1 repos_disk=$(echo $2 | sed 's/[()]//g') /usr/es/sbin/cluster/utilities/clmgr replace repository $repos_disk } main main() { cname_repos_ip=$(/usr/es/sbin/cluster/utilities/cllsclstr -cwng | awk -F: '(NR== 2) {print $2":"$6}') if [ $? -eq 0 ]; then cname=$(echo $cname_repos_ip | cut -d: -f1) repos=$(echo $cname_repos_ip | cut -d: -f2) print "#cname:repos" print "$cname":"$repos" fi exit 0 } maincluster_hlp.cat_cm_ver_and_sync.dialog.PowerHA SystemMirror Verification and Synchronizationcluster.catcmd_to_exec() { METHOD=$1 CUSTOM_CHECKS=$2 CORRECTIVE_ACTIONS=$3 FORCE_SYNC=$4 VERIFY_CHANGES_ONLY=$5 LOGGING_LEVEL=$6 DETAILED_CHECKS=$7 IGNORE_SYNC_ERRORS=$8 [[ "$VERIFY_CHANGES_ONLY" = "yes" ]] && FLAG_MODIFIED="-V modified" [[ "$LOGGING_LEVEL" = "verbose" ]] && FLAG_LOGGING="-b" [[ "$CORRECTIVE_ACTIONS" != "no" ]] && FLAG_CORRECT="-C $CORRECTIVE_ACTIONS" [[ "$FORCE_SYNC" = "yes" ]] && FLAG_FORCE="-i" [[ $DETAILED_CHECKS = "yes" ]] && FLAG_DETAILED="-H" [[ "$IGNORE_SYNC_ERRORS" = "yes" ]] && F_FLAG="-f" [[ "$METHOD" = "synchronize" ]] && { /usr/es/sbin/cluster/utilities/cldare "-rt -v" $F_FLAG; exit $?; } [[ "$METHOD" = "both" ]] && { /usr/es/sbin/cluster/utilities/cldare "-rt" $FLAG_FORCE $FLAG_LOGGING $FLAG_MODIFIED $FLAG_CORRECT $FLAG_DETAILED $F_FLAG; exit $?; } [[ "$METHOD" = "verify" ]] && { /usr/es/sbin/cluster/diag/clver "-rt" $FLAG_LOGGING $FLAG_MODIFIED $FLAG_CORRECT $FLAG_DETAILED; exit $?; } } cmd_to_execcluster_hlp.cat_cm_ver_and_sync.dialog.localPowerHA SystemMirror Verification and Synchronization (Active Cluster Nodes Exist)cluster.cat/usr/es/sbin/cluster/utilities/clmgr sync clustercluster_hlp.catPowerHA SystemMirror Verification and Synchronization (Active Cluster)cluster.catprint 'Cluster Services are UP but not on a local node, run the verification from an active node'_cm_add_change_show_an_hacmp_cluster.dialogAdd/Change/Show a Clustercluster.cat/usr/es/sbin/cluster/utilities/claddclstr main() { /usr/es/sbin/cluster/utilities/cllsclstr -cwng if [ $? -ne 0 ]; then print "#cname:configurednodes" fi exit 0 } maincluster_hlp.cat_cm_add_change_show_an_hacmp_cluster.dialog_existsAdd/Change/Show a Clustercluster.cat/usr/es/sbin/cluster/utilities/cltopinfo main() { /usr/es/sbin/cluster/utilities/cllsclstr -cwng if [ $? -ne 0 ]; then print "#cname:configurednodes" fi exit 0 } maincluster_hlp.catcl_cm_cluster_service_settings.optionsCluster Startup Settingscluster.cat/usr/es/sbin/cluster/utilities/cl_auto_versync_options -s/usr/es/sbin/cluster/utilities/cl_auto_versync_options -_ -dcluster_hlp.catcm_chng_tunables.dialog.optCluster heartbeat settingscluster.catcmd_to_exec() { NFDT=$1 FDT=$2 FGT=$3 LFDT=$4 LPCY=$5 RPSM=$6 CFGT=$7 DREN=$8 /usr/es/sbin/cluster/utilities/clmgr modify cluster NETWORK_FAILURE_DETECTION_TIME=$NFDT HEARTBEAT_FREQUENCY=$FDT GRACE_PERIOD=$FGT HEARTBEAT_FREQUENCY_DURING_LPM=$LFDT LPM_POLICY=$LPCY CAA_REPOS_MODE=$RPSM CAA_CONFIG_TIMEOUT=$CFGT CAA_AUTO_START_DR=$DREN } cmd_to_exec main() { /usr/es/sbin/cluster/utilities/clodmget -n -f network_fdt,node_timeout,node_down_delay,lpm_node_timeout,lpm_policy,repos_mode,config_timeout,dr_enabled HACMPcluster | IFS=: read nwfdt nodefdt nodefgt nodelfdt nodelpcy rps_mode cnfg_timeout dr_en [[ -z $nodelpcy ]] && nodelpcy=manage if [[ $rps_mode == 0 ]] then rps_mode=assert else rps_mode=event fi if [[ $dr_en == 0 ]] then dr_en=disabled else dr_en=enabled fi print "#nwfdt:nodefdt:nodefgt:nodelfdt:nodelpcy:rps_mode:cnfg_timeout:dr_en" print "$nwfdt":"$nodefdt":"$nodefgt":"$nodelfdt":$nodelpcy:$rps_mode:$cnfg_timeout:$dr_en } maincluster_hlp.catcm_reset_cluster_tunables.dialog.optReset Cluster Tunablescluster.cat/usr/es/sbin/cluster/utilities/clsnapshot -tcluster_hlp.cat_cldisktype_custom_dialog_addAdd Custom Disk Methodscluster.cat/usr/es/sbin/cluster/utilities/clcustomdisk -a_cldisktype_custom_dialog_chaChange/Show Custom Disk Methodscluster.cat/usr/es/sbin/cluster/utilities/clcustomdisk -c/usr/es/sbin/cluster/utilities/clcustomdisk -s-t _rawname_cldisktype_custom_dialog_remRemove Custom Disk Methodscluster.cat/usr/es/sbin/cluster/utilities/clcustomdisk -rcm_dialog_opt_add_custom_volume_methodsAdd Custom Volume Group Methodscluster.cat/usr/es/sbin/cluster/utilities/clcustomvolume -adisc_proc() { echo '#shared_volumes_method:hdisks_method:vol_online_method:vol_offline_method:vol_status_method' echo 'PVID:LSPV:VARYONVG:VARYOFFVG:LSACTIVEVG:' } disc_proc cluster_hlp.catcm_dialog_opt_change_custom_volume_methodsChange/Show Custom Volume Group Methodscluster.cat/usr/es/sbin/cluster/utilities/clcustomvolume -c/usr/es/sbin/cluster/utilities/clcustomvolume-s _rawnamecluster_hlp.catcm_dialog_opt_delete_custom_volume_methodsRemove Custom Volume Group Methodscluster.cat/usr/es/sbin/cluster/utilities/clcustomvolume -rcm_dialog_opt_add_custom_filesystem_methodsAdd Custom File System Methodscluster.cat/usr/es/sbin/cluster/utilities/clcustomfilesystem -adisc_proc() { echo '#hosting_vgs_method:fs_online_method:fs_offline_method:fs_status_method' echo 'ODM:MOUNT:UNMOUNT:LSACTIVEFS:' } disc_proc cluster_hlp.catcm_dialog_opt_change_custom_filesystem_methodsChange/Show Custom File System Methodscluster.cat/usr/es/sbin/cluster/utilities/clcustomfilesystem -c/usr/es/sbin/cluster/utilities/clcustomfilesystem-s _rawnamecluster_hlp.catcm_dialog_opt_delete_custom_filesystem_methodsRemove Custom File System Methodscluster.cat/usr/es/sbin/cluster/utilities/clcustomfilesystem -rcm_cfg_udres_type_add.dialogue.optionAdd a User Defined Resource Typecluster.cat/usr/es/sbin/cluster/utilities/cludrestype -a cluster_hlp.catcm_cfg_udres_type_change_dialogue.optionChange/Show a User Defined Resource Typecluster.cat x() { udrtname=$(echo $* | awk '{ print $1 }') shift old_process_order=$(/usr/es/sbin/cluster/utilities/cludrestype -clh $udrtname | awk ' FS=":" { print $2 } ' ) /usr/es/sbin/cluster/utilities/cludrestype -u $udrtname -w $old_process_order $@ } x/usr/es/sbin/cluster/utilities/cludrestype -cl -n _rawnamecluster_hlp.cat_clm.cm_rm_udres_type.dialogueRemove a User Defined Resource Typecluster.cat/usr/es/sbin/cluster/utilities/cludrestype -d cluster_hlp.catcm_cfg_udres_add.dialogue.optionAdd a User Defined Resourcecluster.catrun_cmd() { args=$(echo $* | tr -d [\'\"] ) /usr/es/sbin/cluster/utilities/cludres -a $args } run_cmdcluster_hlp.catcm_cfg_udres_change_dialogue.optionChange/Show User Defined Resourcecluster.catrun_cmd() { args=$(echo $* | tr -d [\'\"] ) /usr/es/sbin/cluster/utilities/cludres -u $args } run_cmd/usr/es/sbin/cluster/utilities/cludres -cl -n _rawnamecluster_hlp.cat_clm.cm_rm_udres.dialogueRemove a User Defined Resourcecluster.cat/usr/es/sbin/cluster/utilities/cludres -d cluster_hlp.catcm_cludres_chmonitor.dialog.optionChange/Show User Defined Resource Monitorcluster.cat/usr/es/sbin/cluster/utilities/clmgr modify application_monitor/usr/es/sbin/cluster/utilities/cllsappmon -a -ch -t user _rawnamecluster_hlp.catcm_cludrestype_importxml.optionImport User Defined Resource Types and Resources Definition from XML filecluster.cat/usr/es/sbin/cluster/utilities/cl_udresconfig cluster_hlp.cat_cm_change_show_resource_action_dialog.optCustomize Resource Recoverycluster.catmain() { name=$(echo $1 | awk -F= '{print $2}') RESOURCE_TO_MONITOR=$(ODMDIR=/etc/objrepos /usr/es/sbin/cluster/utilities/clodmget -q "monitor = $name and name = "RESOURCE_TO_MONITOR"" -n -f value HACMPmonitor) MONITOR_METHOD=$(ODMDIR=/etc/objrepos /usr/es/sbin/cluster/utilities/clodmget -q "monitor = $name and name = "MONITOR_METHOD"" -n -f value HACMPmonitor) INVOCATION=$(ODMDIR=/etc/objrepos /usr/es/sbin/cluster/utilities/clodmget -q "monitor = $name and name = "INVOCATION"" -n -f value HACMPmonitor) /usr/es/sbin/cluster/utilities/clchappmon $1 $2 $3 $4 RESOURCE_TO_MONITOR=$RESOURCE_TO_MONITOR MONITOR_METHOD=$MONITOR_METHOD INVOCATION=$INVOCATION } main $*main() { if [[ -n $(ODMDIR=/etc/objrepos odmget -q monitor=HAMON_${1} HACMPmonitor) ]]; then /usr/es/sbin/cluster/utilities/cllsappmon -ach HAMON_${1} else /usr/es/sbin/cluster/utilities/cllsappmon -ach ${1} fi } main $*_rawnamecluster_hlp.cat_cm_change_show_resource_gp_action_dialog.optCustomize Inter-Site Resource Group Recoverycluster.cat/usr/es/sbin/cluster/utilities/clchappmonmain() { print "#FAILURE_ACTION:NOTIFY_METHOD" odmget -q "monitor=CROSS_SITE_RG_MOVE AND name=NOTIFY_METHOD" HACMPmonitor | grep -w value | sed -e 's/"//g' | sed -e 's/ //g' | IFS="=" read unneeded METHOD odmget -q "monitor=CROSS_SITE_RG_MOVE AND name=FAILURE_ACTION" HACMPmonitor | grep -w value | sed -e 's/"//g' | sed -e 's/ //g' | IFS="=" read unneeded ACTION if [[ "$ACTION" == "notify" ]] ; then printf "notify:" else printf "fallover:" fi printf "$METHOD " } maincluster_hlp.cat_cladd_event.dialogAdd a Custom Cluster Eventcluster.cat/usr/es/sbin/cluster/utilities/claddcustom -t eventcluster_hlp.cat_clcs_event.dialogChange/Show a Custom Cluster Eventcluster.cat/usr/es/sbin/cluster/utilities/clchcustom -t event/usr/es/sbin/cluster/utilities/cllscustom -c -t event-n _rawname_clrm_event.dialogRemove a Custom Cluster Eventcluster.cat/usr/es/sbin/cluster/utilities/clrmcustom_clcsclev.dialogChange/Show Cluster Eventscluster.cat/usr/es/sbin/cluster/utilities/clcheventcmd_to_discover() { /usr/es/sbin/cluster/utilities/clodmget -q"name = $1" -f name,cmd,notify,pre,post,recv,count,desc,error_on_fail -n HACMPevent | IFS=: read name cmd notify pre post recv count desc error_on_fail echo "#name:cmd:notify:pre:post:recv:count:desc:error_on_fail" echo "$name:$cmd:$notify:$pre:$post:$recv:$count:$desc:$error_on_fail" } cmd_to_discover_rawname_clude_custom_dialog_addAdd a Custom User-Defined Eventcluster.cat/usr/es/sbin/cluster/utilities/clcustomude -a_clude_custom_dialog_chaChange/Show a Custom User-Defined Eventcluster.cat/usr/es/sbin/cluster/utilities/clcustomude -c/usr/es/sbin/cluster/utilities/clcustomude -s -t _rawname_clude_custom_dialog_remRemove a Custom User-Defined Eventcluster.cat/usr/es/sbin/cluster/utilities/clcustomude -rdefine_node_port.cmdoptConfigure Node/TTY pairscluster.cat/usr/es/sbin/cluster/utilities/clmkpgport/usr/es/sbin/cluster/utilities/cllspgport -s_rawnamecluster_hlp.cat_remove_node_port.cmdoptmain() { /usr/es/sbin/cluster/utilities/clodmdelete -o HACMPport -q"node=$1" >> /dev/null } main_cladd_pager_notify.dialogAdd a Custom Remote Notification Methodcluster.cat/usr/es/sbin/cluster/utilities/clmkpgr/usr/es/sbin/cluster/utilities/cllspgr -pcluster_hlp.cat_clch_pager_notify.dialogChange/Show a Custom Remote Notification Methodcluster.cat/usr/es/sbin/cluster/utilities/clchpgr/usr/es/sbin/cluster/utilities/cllspgr -s -m_rawnamecluster_hlp.cat_cldel_pager_notify.dialogRemove a Custom Remote Notification Methodcluster.cat/usr/es/sbin/cluster/utilities/clrmpgr -mcluster_hlp.cat_cltest_pager_notify.dialogSend a Test Remote Messagecluster.cat/usr/es/sbin/cluster/utilities/clissuepage/bin/echo '#METHOD '_rawnamecluster_hlp.catcm_time_before_warning_cmd_optChange/Show Time Until Warningcluster.cat/usr/es/sbin/cluster/utilities/clchmsgtimermain () { HEAD=`/usr/es/sbin/cluster/utilities/clchmsgtimer | grep '#'` DATA=`/usr/es/sbin/cluster/utilities/clchmsgtimer | grep -v '#' ` event_duration=`echo $DATA|cut -f1 -d :` group_duration=`echo $DATA|cut -f2 -d :` if [ $event_duration -eq 0 ] then event_duration=180 group_duration=180 fi time=`expr $event_duration + $group_duration` min=`expr $time / 60` sec=`expr $time % 60` echo $HEAD:time echo $event_duration:$group_duration:$min `dspmsg -s 26 cluster.cat 26 "minutes and"` $sec `dspmsg -s 26 cluster.cat 27 "seconds"` } maincm_time_before_warning_cmd_optChange/Show Time Until Warningcluster.cat/usr/es/sbin/cluster/utilities/clchmsgtimermain () { HEAD=`/usr/es/sbin/cluster/utilities/clchmsgtimer | grep '#'` DATA=`/usr/es/sbin/cluster/utilities/clchmsgtimer | grep -v '#' ` event_duration=`echo $DATA|cut -f1 -d :` group_duration=`echo $DATA|cut -f2 -d :` if [ $event_duration -eq 0 ] then event_duration=180 group_duration=180 fi time=`expr $event_duration + $group_duration` min=`expr $time / 60` sec=`expr $time % 60` echo $HEAD:time echo $event_duration:$group_duration:$min `dspmsg -s 26 cluster.cat 26 "minutes and"` $sec `dspmsg -s 26 cluster.cat 27 "seconds"` } main_cm_change_show_sys_event_optChange/Show Event Responsecluster.catmain() { CLASS="HACMPeventmgr:" NAME="name=$1" ACTION="action=$2" ACTIVE="active=$3" printf "%s %s %s %s " $CLASS $NAME $ACTION $ACTIVE | ODMDIR=/etc/objrepos /usr/es/sbin/cluster/utilities/clodmchange -o HACMPeventmgr -q "$NAME" } main/usr/es/sbin/cluster/utilities/cllssyseventseventcluster_hlp.catcm_learn_about_cluster_events_dialog.optLearn more about cluster eventscluster_hlp.catfunction print_all_for { typeset field=$1 echo "" # the description, cause, actions and topics can all have multiple # values: these are in the form of a space separated list of doubles # of set number, msg number for double in $(clodmget -q"name = $event" -f $field -n HACMPevent) do setno=${double%%*,} msgno=${double##*,} echo "$(dspcat $catalog $setno $msgno) " done } function cmd_to_exec { # add path to clodmget PATH=$PATH:/usr/es/sbin/cluster/utilities # make sure we get messages export LC__FASTMSG=false export event=$* # print the standard parts: first is Event name and synopsis echo "$(dspcat events.cat 104 4) $event " catalog=$(clodmget -q"name = $event" -f catalog -n HACMPevent) setno=$(clodmget -q"name = $event" -f setno -n HACMPevent) msgno=$(clodmget -q"name = $event" -f msgno -n HACMPevent) echo "$(dspcat events.cat 104 5) $(dspcat $catalog $setno $msgno) " # Description dspcat events.cat 104 6 print_all_for description # Category dspcat events.cat 104 10 case $(clodmget -q"name = $event" -f category HACMPevent) in 0) dspcat events.cat 104 11 ;; 1) dspcat events.cat 104 12 ;; 2) dspcat events.cat 104 13 ;; 3) dspcat events.cat 104 14 ;; 4) dspcat events.cat 104 15 ;; esac # Probable cause dspcat events.cat 104 7 print_all_for probable_cause # Recommended actions dspcat events.cat 104 9 print_all_for rec_actions # Related topics dspcat events.cat 104 8 print_all_for related_topics } cmd_to_execcm_add_repository_disk.dialog.optAdd a Repository Diskcluster.cat function main { PATH=$PATH:/usr/es/sbin/cluster/utilities typeset repositories=$(echo "$*" | sed 's/[()]//g') clmgr add repository $repositories DISABLE_VALIDATION=true } maincluster_hlp.catRemove a Repository diskcluster.catmain() { dspmsg -s 56 cluster_hlp.cat 27 "No backup repository disks are currently defined. You can add a backup repository disk using the Add a Repository Disk SMIT option. " } maincluster_hlp.catcm_rem_repository_disk.dialog.optRemove a Repository diskcluster.cat/usr/es/sbin/cluster/utilities/clmgr -f delete repositorycluster_hlp.catShow Repository Diskscluster.cat function main { echo /usr/es/sbin/cluster/utilities/clmgr view report repository echo /usr/es/sbin/cluster/utilities/clmgr -v query repository } maincluster_hlp.catSplit and Merge Management Policycluster.catdspmsg -s 56 cluster_hlp.cat 69 "Split and Merge policies apply to Site events with current AIX Level. You must first configure a Stretched or Linked cluster with sites before configuring Split and Merge policies."cluster_hlp.catSplit and Merge Management Policycluster.catdspmsg -s 56 cluster_hlp.cat 65 "Split and Merge policies apply to PowerHA SystemMirror events. You must first configure a PowerHA SystemMirror cluster before configuring Split and Merge policies."cluster_hlp.catcm_cluster_sm_policy_none_optSplit and Merge Management Policycluster.cat/usr/es/sbin/cluster/utilities/cl_sm /usr/es/sbin/cluster/utilities/cl_sm -q Nonecluster_hlp.catcm_cluster_sm_policy_tiebreaker_disk_hdr_optDisk Tie Breaker Configurationcluster.cat/usr/es/sbin/cluster/utilities/cl_sm -s 'TieBreaker' -m 'TieBreaker'/usr/es/sbin/cluster/utilities/cl_sm -q disk_tiebreakercluster_hlp.catcm_cluster_sm_policy_tiebreaker_nfs_hdr_optNFS Tie Breaker Configurationcluster.cat/usr/es/sbin/cluster/utilities/cl_sm -s 'NFS' -m 'NFS'/usr/es/sbin/cluster/utilities/cl_sm -q nfs_tiebreakercluster_hlp.catcm_cluster_sm_policy_sel_manual_optSplit and Merge Management Policycluster.cat/usr/es/sbin/cluster/utilities/cl_sm -s 'Manual' -m 'Manual'/usr/es/sbin/cluster/utilities/cl_sm -q Manualcluster_hlp.catcm_cluster_sm_policy_lnk_manual_optSplit and Merge Management Policycluster.cat/usr/es/sbin/cluster/utilities/cl_sm -s 'Manual' -m 'Manual'/usr/es/sbin/cluster/utilities/cl_sm -q Manualcluster_hlp.catcm_cluster_sm_policy_cloud_optSplit and Merge Management Policycluster.cat/usr/es/sbin/cluster/utilities/cl_sm /usr/es/sbin/cluster/utilities/cl_sm -q Cloudcluster_hlp.catcm_cluster_quarintine_disk_optDisk Fencingcluster.cat/usr/es/sbin/cluster/utilities/cl_sm/usr/es/sbin/cluster/utilities/cl_sm -q scsicluster_hlp.catcm_cluster_quarintine_anhp_optActive Node Halt down Policycluster.cat/usr/es/sbin/cluster/utilities/cl_sm/usr/es/sbin/cluster/utilities/cl_sm -q anhpcluster_hlp.cat_clm.repos_ipaddr_hbcDefine Repository and Cluster IP Addresscluster.catmain() { cluster_name=$1 heart_beat_type=$2 repos_disk=$3 cl_ipaddr=$4 # : Remove parentheses around PVID # repos_disk=${repos_disk%\)} repos_disk=${repos_disk#\(} # see if repos is already defined repos=$(/usr/es/sbin/cluster/utilities/clodmget -q "name = ${cluster_name}_sircol" -f repository -n HACMPsircol) if [[ -z "$repos" ]] then /usr/es/sbin/cluster/utilities/clmgr add repository $repos_disk DISABLE_VALIDATION=true else /usr/es/sbin/cluster/utilities/clmgr replace repository $repos_disk fi [[ $? != 0 ]] && return 1 # : Unicast vs Mulicast # unicast=$(dspmsg -s 64 cluster.cat 4 Unicast) # : Until clmgr modify cluster learns to handle heart beat type # if [[ $heart_beat_type == $unicast ]] then heart_beat_type='U' else if [[ -n $cl_ipaddr ]] then heart_beat_type='C' else heart_beat_type='M' fi fi Class="HACMPcluster:" hbt="heartbeattype=${heart_beat_type}" handle="handle=0" printf "%s %s %s " $Class $handle $hbt | /usr/es/sbin/cluster/utilities/clodmchange -o HACMPcluster if [[ $heart_beat_type == 'U' ]] then if [[ -n $cl_ipaddr ]] then # : If both unicast was selected, and an IP address provided, : the user is confused. Unicast takes precidence. # dspmsg -s 64 cluster.cat 1 "A cluster IP address for heart beat is not used with unicast heart beating. The entered cluster IP address is ignored. " fi else if [[ -z $cl_ipaddr ]] then dspmsg -s 64 cluster.cat 8 "Default Multicast IP address will be assigned during synchronization " else # : If given a multicast IP address for multicast heart beat, : set it up here # if ! /usr/es/sbin/cluster/utilities/clmgr modify cluster CLUSTER_IP=$cl_ipaddr then return 1 fi fi fi # : If we got here, let the user know what to do next # dspmsg -s 63 cluster.cat 17 "Initial site configuration has been saved. You can now go on to complete the rest of the configuration, including adding backup repository disks (recommended), custom event notifications, resource groups and applications, etc. When you have entered all the basic information you can then use Verification and Synchronization to verify the configuration and distribute it to all cluster nodes. " return 0 } mainmain() { cname=$(/usr/es/sbin/cluster/utilities/clodmget -f name -n HACMPcluster) repos=$(/usr/es/sbin/cluster/utilities/clodmget -f repository -n HACMPsircol) ip_address=$(/usr/es/sbin/cluster/utilities/clodmget -f ip_address -n HACMPsircol) hbc=$(/usr/es/sbin/cluster/utilities/clodmget -f heartbeattype -n HACMPcluster) if [[ $hbc == U* ]] then hbc=$(dspmsg -s 64 cluster.cat 4 Unicast) elif [[ $hbc == M* || $hbc == C* ]] then hbc=$(dspmsg -s 64 cluster.cat 5 Multicast) else hbc='' fi print -- '#cname:repos:ip:hbc' print -- ${cname}:${repos}:${ip}:${hbc} } maincluster_hlp.catDisplay any needed Manual Responsecluster.cat/usr/es/sbin/cluster/utilities/cl_smm_checkcluster_hlp.catcl_smm_response_optProvide a Manual Responsecluster.catmain() { response=$1 continue=$(dspmsg -s 58 cluster.cat 77 'Continue ') if ! /usr/es/sbin/cluster/utilities/cl_smm_check -q then return 1 fi if [[ $response == $continue ]] then # : This node is part of the chosen surviving site # dspmsg -s 58 cluster.cat 79 "You have chosen for this side of the partitioned cluster to continue. You must now specify, on a node on the other side of the partitioned cluster, that it recover for PowerHA SystemMirror to completely recover from the split or merge. " /usr/es/sbin/cluster/utilities/cl_sm_continue # you win some else # : This node is not part of the chosen surviving site # dspmsg -s 58 cluster.cat 80 "You have chosen for this side of the partitioned cluster to recover. You must now specify, on a node on the other side of the partitioned cluster, that it continue for PowerHA SystemMirror to completely recover from the split or merge. " /usr/es/sbin/cluster/utilities/cl_sm_recover # you lose some fi } maincluster_hlp.catStart CAA on Merged Nodecluster.catmain() { node=$(/usr/es/sbin/cluster/utilities/get_local_nodename) /usr/es/sbin/cluster/utilities/clmgr modify node $node ENABLE_CAA_AFTER_MERGE='true' return $? } maincluster_hlp.cat_clm.repos_ipaddr_exists_hbcDefine Repository and Cluster IP Addresscluster.catmain() { print $* | read cluster_name heart_beat_type cl_ipaddr # : Unicast vs Mulicast # unicast=$(dspmsg -s 64 cluster.cat 4 Unicast) multicast=$(dspmsg -s 64 cluster.cat 5 Multicast) # : Until clmgr modify cluster learns to handle heart beat type # if [[ $heart_beat_type == $unicast ]] then heart_beat_type='U' new_type=$unicast else if [[ $cl_ipaddr == $(dspmsg -s 1 cluster.cat 860 "Default") ]] then cl_ipaddr="" fi if [[ -n $cl_ipaddr ]] then heart_beat_type='C' new_type=$(dspmsg -s 64 cluster.cat 10 "Multicast with IP address %s" $cl_ipaddr) else heart_beat_type='M' new_type=$(dspmsg -s 64 cluster.cat 5 "Multicast") fi fi # : The only thing the user is allowed to change at this point : is the heart beat type. # current_type=$(/usr/es/sbin/cluster/utilities/clodmget -f heartbeattype -n HACMPcluster) if [[ $current_type == U* && $heart_beat_type == U ]] || [[ $current_type != U* && $heart_beat_type != U ]] then dspmsg -s 64 cluster.cat 11 "Cluster configuration is unchanged" return 0 fi # : The heart beat has been changed in the cluster. Update the : HACMPcluster ODM class to reflect this. # Class="HACMPcluster:" hbt="heartbeattype=${heart_beat_type}" handle="handle=0" printf "%s %s %s " $Class $handle $hbt | /usr/es/sbin/cluster/utilities/clodmchange -o HACMPcluster # : If we got here, let the user know what to do next # dspmsg -s 64 cluster.cat 12 "Cluster heartbeat mechanism has been changed to ${new_type}. Use the Verification and Synchronization operation to make this change effective. " "$new_type" if [[ $heart_beat_type == "M" ]] then print "" dspmsg -s 64 cluster.cat 18 "Default Multicast IP address will be used for cluster $cluster_name and will be assigned during Synchronizationn " $cluster_name fi # : And show the current configuration # print "" dspmsg -s 64 cluster.cat 15 "Current cluster configuration follows " print "" /usr/es/sbin/cluster/utilities/cltopinfo return 0 } mainmain() { # : Extract cluster name, repository disk PVID, any heart beat IP address : and heart beat type # cname=$(/usr/es/sbin/cluster/utilities/clodmget -f name -n HACMPcluster) repos=$(/usr/es/sbin/cluster/utilities/clodmget -f repository -n HACMPsircol) ip_address=$(/usr/es/sbin/cluster/utilities/clodmget -f ip_address -n HACMPsircol) hbc=$(/usr/es/sbin/cluster/utilities/clodmget -f heartbeattype -n HACMPcluster) if [[ $hbc == U* ]] then hbc=$(dspmsg -s 64 cluster.cat 4 Unicast) else hbc=$(dspmsg -s 64 cluster.cat 5 Multicast) if [[ -z $ip_address ]] then ip_address=$(dspmsg -s 1 cluster.cat 860 "Default") fi fi print -- '#cname:repos:ip:hbc' print -- ${cname}:${repos}:${ip_address}:${hbc} } maincluster_hlp.catchange_show_gs.alterChange/Show Group Services Log File Sizecluster.cat/usr/sbin/rsct/bin/cthagstunemain() { HAGSTUNE=$(/usr/sbin/rsct/bin/cthagstune | head -1 | cut -d' ' -f2) echo "#gsLogLength" echo $HAGSTUNE } main cluster_hlp.catconfig_pha_loglen.optChange/Show PowerHA Log File Sizecluster.cat/usr/es/sbin/cluster/utilities/cllogmain() { echo "#logName:logLength" print "$1:$(/usr/es/sbin/cluster/utilities/cllog -q $1)" } main _rawnamecluster_hlp.catcm_cfg_add_nova_optAdd NovaLink Definitioncluster.cat/usr/es/sbin/cluster/utilities/clmgr add novacluster_hlp.catcm_cfg_ch_nova_optChange/Show NovaLink Definitioncluster.cat/usr/es/sbin/cluster/utilities/clmgr modify nova/usr/es/sbin/cluster/utilities/clmgr -c query nova_novanamecluster_hlp.catcm_cfg_rm_nova_optRemove NovaLink Definitioncluster.cat/usr/es/sbin/cluster/utilities/clmgr -f remove novacluster_hlp.catcm_cfg_def_nova_tun_optChange/Show Default NovaLink Tunablescluster.cat/usr/es/sbin/cluster/utilities/clmgr manage cluster novadisc () { /usr/es/sbin/cluster/utilities/clmgr -c query \ cluster nova | sed 's/^# /#/' } disccluster_hlp.catcm_cfg_add_powervs_site_dialogAdd Cloud Instancecluster.catcluster_hlp.catcm_cfg_add_powervs_site_dialogAdd Cloud Instancecluster.catcluster_hlp.catcm_cfg_ch_powervs_optChange/Show Cloud Instancecluster.cat/usr/es/sbin/cluster/utilities/cllspowervs -cH -s _rawnamecluster_hlp.catcm_cfg_ch_powervs_optChange/Show Cloud Instancecluster.cat_rawnamecluster_hlp.catRemove Cloud Instancecluster.catcluster_hlp.catcluster.cat/usr/es/sbin/cluster/utilities/clmgr add backup_profile cluster_hlp.catcluster.cat/usr/es/sbin/cluster/utilities/clmgr add backup_profile main() { storage=$1 /usr/es/sbin/cluster/utilities/clmgr -c query storage_system $storage BACKUP=1 } main_rawnamecluster_hlp.catcluster.cat/usr/es/sbin/cluster/utilities/clmgr modify backup_profile cluster_hlp.catcluster.catcluster_hlp.catcluster.catcluster_hlp.catcm_cfg_ch_stg_svc_optcluster.cat/usr/es/sbin/cluster/utilities/clmgr modify storage_system cm_cfg_rm_stg_optcluster.cat/usr/es/sbin/cluster/utilities/clmgr -f remove storage_system/usr/es/sbin/cluster/utilities/cldiscOPT -_ startcm_lst_bak_optList Cloud Backupscluster.cat/usr/es/sbin/cluster/utilities/clmgr query backup_files/usr/es/sbin/cluster/utilities/cldiscOPT -_ startcm_crt_bak_optCreate Cloud Backupcluster.cat/usr/es/sbin/cluster/utilities/clmgr add backup /usr/es/sbin/cluster/utilities/cldiscOPT -_ stopShow Cluster Servicescluster.catcl__clm.clstart.nor.nfsStart Cluster Servicescluster.catcl__clm.clstart.nor.nonfsStart Cluster Services/usr/es/sbin/cluster/utilities/cldiscOPT -_ startnode_name group_namecl__clm.clstart.mig.nonfsStart Cluster Services/usr/es/sbin/cluster/utilities/cldiscOPT -_ startnode_name group_namecl__clm.clstopStop Cluster Services/usr/es/sbin/cluster/utilities/cldiscOPT -_ stopnode_name group_namecl_resgrp_start.dialog_non_concurrent.opt.divergenceShow Cluster Services/usr/es/sbin/cluster/utilities/clshowsrv -v cmd_to_discover() { NODE_NAME=$1 NODE_NAME=`echo "$NODE_NAME" | awk '{ print $1 }' | sed 's/*//'` GROUP_NAME=$2 echo $GROUP_NAME | read GROUP_NAME P1 P2 P3 P4 P5 echo "#node_name:group_name" echo "$NODE_NAME:$GROUP_NAME" } cmd_to_discovernode_name group_name/usr/es/sbin/cluster/utilities/clRGinfo -m cmd_to_discover() { NODE_NAME=$1 NODE_NAME=`echo "$NODE_NAME" | awk '{ print $1 }' | sed 's/*//'` GROUP_NAME=$2 echo $GROUP_NAME | read GROUP_NAME P1 P2 P3 P4 P5 echo "#node_name:group_name" echo "$NODE_NAME:$GROUP_NAME" } cmd_to_discovernode_name group_nameBring a Resource Group Onlinecspoc.cat cmd_to_discover() { NODE_NAME=$1 NODE_NAME=`echo "$NODE_NAME" | awk '{ print $1 }' | sed 's/*//'` GROUP_NAME=$2 echo $GROUP_NAME | read GROUP_NAME P1 P2 P3 P4 P5 echo "#node_name:group_name" echo "$NODE_NAME:$GROUP_NAME" } cmd_to_discovernode_name group_nameBring a Resource Group Onlinecspoc.cat/usr/es/sbin/cluster/utilities/clRGmove -s 'false' cmd_to_discover() { NODE_NAME=$1 NODE_NAME=`echo "$NODE_NAME" | awk '{ print $1 }' | sed 's/*//'` GROUP_NAME=$2 echo $GROUP_NAME | read GROUP_NAME P1 P2 P3 P4 P5 echo "#node_name:group_name" echo "$NODE_NAME:$GROUP_NAME" } cmd_to_discovernode_name group_nameBring a Resource Group Onlinecspoc.cat/usr/es/sbin/cluster/utilities/clRGmove -s 'true' cmd_to_discover() { NODE_NAME=$1 NODE_NAME=`echo "$NODE_NAME" | awk '{ print $1 }' | sed 's/*//'` GROUP_NAME=$2 echo $GROUP_NAME | read GROUP_NAME P1 P2 P3 P4 P5 echo "#node_name:group_name" echo "$NODE_NAME:$GROUP_NAME" } cmd_to_discovernode_name group_nameBring a Resource Group Onlinecspoc.cat/usr/es/sbin/cluster/utilities/clRGmove -s 'true' cmd_to_discover() { NODE_NAME=$1 NODE_NAME=`echo "$NODE_NAME" | awk '{ print $1 }' | sed 's/*//'` GROUP_NAME=$2 echo $GROUP_NAME | read GROUP_NAME P1 P2 P3 P4 P5 echo "#node_name:group_name" echo "$NODE_NAME:$GROUP_NAME" } cmd_to_discovernode_name group_nameBring a Resource Group Onlinecspoc.cat cmd_to_discover() { NODE_NAME=$1 NODE_NAME=`echo "$NODE_NAME" | awk '{ print $1 }' | sed 's/*//'` GROUP_NAME=$2 echo $GROUP_NAME | read GROUP_NAME P1 P2 P3 P4 P5 echo "#node_name:group_name" echo "$NODE_NAME:$GROUP_NAME" } cmd_to_discovernode_name group_namecl_resgrp_start.dialog_concurrent.optBring a Resource Group Onlinecspoc.cat/usr/es/sbin/cluster/utilities/clRGmove -s 'true' cmd_to_discover() { NODE_NAME=$1 NODE_NAME=`echo "$NODE_NAME" | awk '{ print $1 }' | sed 's/*//'` GROUP_NAME=$2 echo $GROUP_NAME | read GROUP_NAME P1 P2 P3 P4 P5 echo "#node_name:group_name" echo "$NODE_NAME:$GROUP_NAME" } cmd_to_discovernode_name group_namecl_resgrp_move.dialog.optMove Resource Group(s) to Another Nodecluster.cat cmd_to_discover() { NODE_NAME=$1 NODE_NAME=`echo "$NODE_NAME" | awk '{ print $1 }' | sed 's/*//'` GROUP_NAME=$2 echo $GROUP_NAME | read GROUP_NAME P1 P2 P3 P4 P5 echo "#node_name:group_name" echo "$NODE_NAME:$GROUP_NAME" } cmd_to_discover node_name group_namecspoc.cat/usr/es/sbin/cluster/utilities/clRGmove -s 'true' cluster_hlp.catcluster.catcluster_hlp.catcluster.catcluster.catcluster.catcm_suspend_appmoncluster.catmain() { dspmsg -s 37 cluster.cat 2000 "Network Interfaces " |read STRING1 dspmsg -s 37 cluster.cat 2100 "RS-232 Devices " |read STRING2 dspmsg -s 37 cluster.cat 2200 "Target-Mode SCSI Devices " |read STRING3 dspmsg -s 37 cluster.cat 2300 "Target-Mode SSA Devices " |read STRING4 dspmsg -s 37 cluster.cat 2400 "X.25 Communication Interfaces " |read STRING5 dspmsg -s 37 cluster.cat 2500 "SNA Communication Links " |read STRING6 dspmsg -s 37 cluster.cat 2600 "Physical Disk Devices " |read STRING7 if [ "$1" = "$STRING1" ]; then PATH=mktcpip fi if [ "$1" = "$STRING2" ]; then PATH=tty fi if [ "$1" = "$STRING3" ]; then PATH=scsia fi if [ "$1" = "$STRING4" ]; then PATH=ssaa fi if [ "$1" = "$STRING5" ]; then PATH=commodev fi if [ "$1" = "$STRING6" ]; then PATH=sna fi if [ "$1" = "$STRING7" ]; then PATH=vg fi echo "#SMITPATH $PATH" exit 0 } main_rawnameResume Application Monitoring/usr/es/sbin/cluster/events/utils/cl_RMupdate resume_appmonApplication Availability AnalysisSwap Network Adaptercl_pcihp.optPCI Hot Plug Replace Network Adapter/usr/es/sbin/cluster/utilities/clchpcihpifAdd a Volume to a Volume Group/usr/es/sbin/cluster/utilities/clrexec -pcl__cmdlvmreducevgdcspoc.catcl__cmdlvmimportvgdcspoc.cat/usr/es/sbin/cluster/sbin/cl_lsvg -lcl__cmdlvmlsvg2cspoc.cat/usr/es/sbin/cluster/cspoc/cl_ls_shared_vgscl_updatevg.dialogcspoc.cat_CSPOC_CALLED_FROM_SMIT=true /usr/es/sbin/cluster/sbin/cl_updatevg -cspoccl__cmdlvmextendvgdAdd a Volume to a Volume Groupcspoc.cat_CSPOC_CALLED_FROM_SMIT=true /usr/es/sbin/cluster/sbin/cl_extendvg -cspoccl__cmdlvmreducevgdRemove a Volume from a Volume Groupcspoc.cat_CSPOC_CALLED_FROM_SMIT=true /usr/es/sbin/cluster/sbin/cl_reducevg -cspoccspoc.catmain() { print -- $* | read vg_parm nodelist_parm rest _CSPOC_CALLED_FROM_SMIT=true /usr/es/sbin/cluster/sbin/cl_importvg -cspoc $nodelist_parm $vg_parm $rest } maincl__cmdlvmmirrorvgdMirror a Volume Groupcspoc.catUnmirror a Volume Groupcspoc.catcspoc.catcspoc.catcl__cmdlvmmklvdAdd a Logical Volumecspoc.catcl__cmdlvmrenamelvdRename a Logical Volumecspoc.cat_CSPOC_CALLED_FROM_SMIT=true _CSPOC_MODE=both /usr/es/sbin/cluster/sbin/cl_chlvcl__cmdlvmextendlvdIncrease the Size of a Logical Volumecspoc.cat_CSPOC_CALLED_FROM_SMIT=true _CSPOC_MODE=both /usr/es/sbin/cluster/sbin/cl_extendlvcl__cmdlvmmklvcopydAdd a Copy to a Logical Volumecspoc.cat_CSPOC_CALLED_FROM_SMIT=true _CSPOC_MODE=both /usr/es/sbin/cluster/sbin/cl_mklvcopycl__cmdlvmrmlvcopydcspoc.cat_CSPOC_CALLED_FROM_SMIT=true _CSPOC_MODE=both /usr/es/sbin/cluster/sbin/cl_rmlvcopycl__cmdlvmconlsvgcspoc.cat/usr/es/sbin/cluster/cspoc/cl_ls_shared_vgs -c $*cl__cmdlvmextendconvgdAdd a Volume to a Concurrent Volume Groupcspoc.catmain() { export _CSPOC_MODE=concurrent /usr/es/sbin/cluster/cspoc/smitlvm -12 $* } maincl__cmdlvmreduceconvgdRemove a Volume to a Concurrent Volume Groupcspoc.catmain() { export _CSPOC_MODE=concurrent /usr/es/sbin/cluster/cspoc/smitlvm -13 $* } mainImport a Concurrent Volume Groupcspoc.catcspoc.catmain() { export _CSPOC_MODE=concurrent /usr/es/sbin/cluster/cspoc/smitlvm -15 $* } mainUnmirror a Concurrent Volume Groupcspoc.catmain() { export _CSPOC_MODE=concurrent /usr/es/sbin/cluster/cspoc/smitlvm -16 $* } maincspoc.catcl__cmdlvmlsconlvdList All Concurrent Logical Volumes by Volume Groupcspoc.catcl__cmdlvmmklvdAdd a Concurrent Logical Volumecspoc.catAdd a Copy to a Concurrent Logical Volumecspoc.cat_rawnamecl__cmdlvmrmconlvcopydcspoc.cat cmd_to_discover() { NODE_NAME=$2 NODE_NAME=`echo "$NODE_NAME" | awk '{ print $1 }'` echo $1 | read GROUP_NAME P1 P2 P3 P4 P5 echo "#node_name:group_name" echo $NODE_NAME:$GROUP_NAME } cmd_to_discovergroup_name node_namecl__cmdlvmextendlvdcspoc.cat cmd_to_discover() { NODE_NAME=$2 NODE_NAME=`echo "$NODE_NAME" | awk '{ print $1 }'` echo $1 | read GROUP_NAME P1 P2 P3 P4 P5 echo "#node_name:group_name" echo $NODE_NAME:$GROUP_NAME } cmd_to_discovergroup_name node_name_CSPOC_CALLED_FROM_SMIT=true /usr/es/sbin/cluster/sbin/cl_mkvg -f -n -Scl__cmdlvmrmlvdcl__cmdlvmlsconlvcdcspoc.cat/usr/es/sbin/cluster/utilities/clRGmove -s 'false' Bring a Resource Group Offlinecspoc.cat/usr/es/sbin/cluster/utilities/clRGmove -s 'true' cspoc.cat_CSPOC_CALLED_FROM_SMIT=true /usr/es/sbin/cluster/sbin/cl_mkvg -f -n -SCreate a Big Volume Groupcluster.catCreate a Volume Groupcspoc.catcl__createvg.dialogCreate a Legacy Volume Groupcspoc.cat_CSPOC_CALLED_FROM_SMIT=true /usr/es/sbin/cluster/sbin/cl_mkvg -f -n -Icl_lslvoptscspoc.catcl__cmdlvmrmlvdRemove a Logical Volumecspoc.catcl__con_createvg.dialogScan the C-SPOC System Log File/usr/es/sbin/cluster/utilities/cllog -a cspoc.logcl__createfs.dialogWatch the C-SPOC System Log File/usr/es/sbin/cluster/utilities/cllog -w cspoc.logcluster_hlp.catcl__con_createvgS.dialogCreate a Concurrent Volume Groupcspoc.catcluster_hlp.catCreate a Concurrent Volume Groupcspoc.catcluster_hlp.catCreate a Concurrent Volume Groupcspoc.cat_CSPOC_CALLED_FROM_SMIT=true /usr/es/sbin/cluster/sbin/cl_mkvg -f -n -Ccluster_hlp.catcl__con_createvg.dialogCreate a Concurrent Volume Groupcspoc.catcluster_hlp.catcl__createfs.dialogAdd a Standard Journaled File Systemcspoc.cat_CSPOC_CALLED_FROM_SMIT=true /usr/es/sbin/cluster/sbin/cl_crfscluster_hlp.catcspoc.catcl__createfs_lf.dialogAdd a Large File Enabled Journaled File Systemecspoc.catAdd a Standard Journaled File Systemcspoc.catexport _CSPOC_CALLED_FROM_SMIT=true; /usr/es/sbin/cluster/sbin/cl_crlvfsAdd a Compressed Journaled File Systemcspoc.catAdd a Large File Enabled Journaled File Systemcspoc.catexport _CSPOC_CALLED_FROM_SMIT=true; /usr/es/sbin/cluster/sbin/cl_crlvfsmain() { /usr/es/sbin/cluster/cspoc/clchshjfs2 $* } mainFS_name VG_name RG_name Nodelistcspoc.cat/usr/es/sbin/cluster/sbin/cl_rmdisk cl__cmdlvmconvertsonvgdcspoc.cat/usr/es/sbin/cluster/sbin/cl_chvg -cspoc -fcluster_hlp.catcl__createjfs2.dialogList All File Systems on the Clustercspoc.catcluster_hlp.catcl_jrmfsCmdOptRemove a Journaled File System from the Clustercspoc.cat/usr/es/sbin/cluster/cspoc/smitlvm -9main() { /usr/es/sbin/cluster/cspoc/clchshjfs2 $* } mainFS_name VG_name RG_name Nodelistcl_jchfsCmdOptcspoc.catcl_dpls_cfg.dialogList All File Systemscspoc.catcspoc.catcspoc.catcl_jchfs2CmdOptcspoc.catcl_jrmfs2CmdOptRemove a File Systemcspoc.cat/usr/es/sbin/cluster/cspoc/smitlvm -9cl_dpls_cfg.dialogcspoc.catcspoc.catDisplay Data Path Device Adapter Statuscspoc.cat/usr/es/sbin/cluster/sbin/cl_lsadapterstatusDefine and Configure all Data Path Devicescspoc.cat/usr/es/sbin/cluster/sbin/cl_vpalldefcfgcl_dpls_cfg.dialogAdd Paths to Available Data Path Devicescspoc.cat/usr/es/sbin/cluster/sbin/cl_addpathscl_dpconfdef.dialogConfigure a Defined Data Path Devicecspoc.cat/usr/es/sbin/cluster/sbin/cl_vpcfgcl_dprmvp.dialogRemove a Data Path Devicecspoc.cat/usr/es/sbin/cluster/sbin/cl_vprmdevcl_dphd2vp.dialogcspoc.catcl_dphd2vp.dialogcspoc.catcl__createvpathvgS.dialogCreate a Volume Group with Data Path Devicescspoc.cat_CSPOC_CALLED_FROM_SMIT=true /usr/es/sbin/cluster/sbin/cl_mkvg4vp -n -f -Scl__createvpathvg.dialogCreate a Volume Group with Data Path Devicescspoc.cat_CSPOC_CALLED_FROM_SMIT=true /usr/es/sbin/cluster/sbin/cl_mkvg4vp -n -f -Bcl__createvpathvg.dialogCreate a Volume Group with Data Path Devicescspoc.cat_CSPOC_CALLED_FROM_SMIT=true /usr/es/sbin/cluster/sbin/cl_mkvg4vp -n -fcspoc.catcspoc.catcspoc.catcspoc.catCreate a Concurrent Volume Group with Data Path Devicescspoc.catShow Event Summaries/usr/es/sbin/cluster/utilities/clevsummarySave Event Summaries to a file/usr/es/sbin/cluster/utilities/clevsummary -f_clusterlog_redir_chaClear Event Summary Historycluster.cat/usr/es/sbin/cluster/utilities/cllog-d _rawnamecluster_hlp.cat_cm.scan_scripts_logcspoc.catcluster_hlp.cat_clm.cm_run_timecspoc.cat/usr/es/sbin/cluster/utilities/cllog -w hacmp.out/usr/es/sbin/cluster/utilities/cllsparam -c-n _rawnamecluster_hlp.cat_clm.clchsecuritycspoc.cat/usr/es/sbin/cluster/utilities/cllsclstr -wccluster_hlp.cat_cm_config_security.connectioncspoc.cat/usr/es/sbin/cluster/utilities/cllsclstr -wccluster_hlp.cat_clusterlog_redir_chaChange/Show a Cluster Log Directorycluster.cat/usr/es/sbin/cluster/utilities/cllog/usr/es/sbin/cluster/utilities/cllogcluster_hlp.cat_clusterlog_redirall_chacluster.cat/usr/es/sbin/cluster/utilities/cllog/usr/es/sbin/cluster/utilities/clkeygen -scluster_hlp.cat_clm.cm_run_timecluster.catcluster_hlp.cat_clm.clchsecurityChange / Show PowerHA SystemMirror Securitycluster.cat/usr/es/sbin/cluster/utilities/clchclstrcluster_hlp.cat/usr/es/sbin/cluster/utilities/clchclstrcluster_hlp.catConfigure Message Authentication Mode/usr/es/sbin/cluster/utilities/clchclstr/usr/es/sbin/cluster/utilities/clkeygen -s_raw_rgname _rawnamecluster_hlp.catGenerate/Distribute a Key/usr/es/sbin/cluster/utilities/clkeygencluster_hlp.cat/usr/es/sbin/cluster/utilities/clkeygencluster_hlp.cat/usr/es/sbin/cluster/utilities/clkeygen -kccluster_hlp.catcl_user_addAdd a User to the Clustercspoc.cat/usr/es/sbin/cluster/cspoc/fix_args nop cl_mkusercluster_hlp.catcl_user_changeChange User Attributes on the Clustercspoc.cat/usr/es/sbin/cluster/cspoc/fix_args nop cl_chusercluster_hlp.catcl_user_removeRemove a User from the Clustercspoc.cat/usr/es/sbin/cluster/cspoc/fix_args nop cl_rmusercluster_hlp.catList Users on the Clustercspoc.cat/usr/es/sbin/cluster/cspoc/fix_args lis cl_lsuser -c -a id home ALLcluster_hlp.catcl_lsgroup.dialogcspoc.cat/usr/es/sbin/cluster/cspoc/fix_args lis cl_lsgroup -c ALLcl_group_addAdd a Group to the Clustercspoc.catcluster_hlp.catcl_group_changecspoc.cat/usr/es/sbin/cluster/cspoc/fix_args nop cl_chgroupcl_rmgroup.dialogcspoc.cat/usr/es/sbin/cluster/cspoc/fix_args nop cl_rmgroupcmd_to_discover() { NAME=`odmget -q name=$1 HACMPfilecollection | grep 'name = '| cut -d\" -f2` DESCRIPTION=`odmget -q name=$1 HACMPfilecollection | grep 'description = '| cut -d\" -f2` PROP_SYNC=`odmget -q name=$1 HACMPfilecollection | grep 'prop_sync = '| cut -d' ' -f3` if [[ $PROP_SYNC = 0 ]]; then PROP_SYNC=no else PROP_SYNC=yes fi PROP_AUTO=`odmget -q name=$1 HACMPfilecollection | grep 'prop_auto = '| cut -d' ' -f3` if [[ $PROP_AUTO = 0 ]]; then PROP_AUTO=no else PROP_AUTO=yes fi echo "#OLDNAME:DESCRIPTION:PROP_SYNC:PROP_AUTO" echo $NAME:$DESCRIPTION:$PROP_SYNC:$PROP_AUTO } cmd_to_discover_rawnamecl_chpasswdcspoc.catCluster Disk Replacementcspoc.catcmd_to_discover() { PERIOD=`odmget -q 'name=file_collections_auto_prop' HACMPtimersvc | grep 'period =' | cut -d ' ' -f3` PERIOD=`expr $PERIOD / 60` echo "#PERIOD" echo $PERIOD } cmd_to_discovercspoc.cat/usr/es/sbin/cluster/utilities/clresetifacecmd_to_discover() { NAME=`odmget -q name=$1 HACMPfilecollection | grep 'name = '| cut -d\" -f2` DESCRIPTION=`odmget -q name=$1 HACMPfilecollection | grep 'description = '| cut -d\" -f2` PROP_SYNC=`odmget -q name=$1 HACMPfilecollection | grep 'prop_sync = '| cut -d' ' -f3` if [[ $PROP_SYNC = 0 ]]; then PROP_SYNC=no else PROP_SYNC=yes fi PROP_AUTO=`odmget -q name=$1 HACMPfilecollection | grep 'prop_auto = '| cut -d' ' -f3` if [[ $PROP_AUTO = 0 ]]; then PROP_AUTO=no else PROP_AUTO=yes fi echo "#OLDNAME:DESCRIPTION:PROP_SYNC:PROP_AUTO" echo $NAME:$DESCRIPTION:$PROP_SYNC:$PROP_AUTO } cmd_to_discover_rawnamecm_filecollection_addAdd a File Collectioncluster.cat/usr/es/sbin/cluster/utilities/clmgr add file_collection paramscm_filecollection_chChange/Show a File Collectioncluster.cat/usr/es/sbin/cluster/utilities/clmgr modify file_collection _rawnameRemove a File Collection/usr/es/sbin/cluster/utilities/cl_manageallowpasswd-Lcluster_hlp.catChange/Show Automatic Update Time/usr/es/sbin/cluster/utilities/clmgr modify cluster cluster_hlp.catAdd Files to a File Collection/usr/es/sbin/cluster/utilities/clmgr modify file_collection cluster_hlp.catx() { echo "#username:" /usr/bin/whoami } xcluster_hlp.catcm_filecollection_propPropagate Files in File Collectionscluster.cat/usr/es/sbin/cluster/utilities/cl_clstrmgr_debug_level -dcluster_hlp.catcl_manageuserscspoc.cat/usr/es/sbin/cluster/utilities/cl_manageallowpasswd -a/usr/es/sbin/cluster/utilities/cl_manageallowpasswd-Lcl__cmdchshconvgdList Users Allowed to Change Passwordcspoc.catvgstat() { /usr/es/sbin/cluster/sbin/cl_ls_vgstatus -cspoc "-n $1" $2 2>/dev/null } vgstatNodelist VG_nameModify System Password Utilitycspoc.catcluster_hlp.catcl_chuserpasswdChange Current Users Passwordcspoc.cat/usr/es/sbin/cluster/utilities/clpasswd/usr/es/sbin/cluster/utilities/cl_clstrmgr_debug_levelcl__cmdchshvgd_CSPOC_CALLED_FROM_SMIT=true /usr/es/sbin/cluster/sbin/cl_chvgcl__cmdchshconvgd/usr/es/sbin/cluster/sbin/cl_chvgcl__cmdlvmlslvShow Characteristics of a Logical Volume/usr/es/sbin/cluster/sbin/cl_lslvcmd_to_discover() { print -- $* | read VG_name rest # see if this vg already has a monitor entry MON=$(/usr/es/sbin/cluster/utilities/clodmget -q"name = RESOURCE_TO_MONITOR AND type = CRITICAL_VG AND value = $VG_name" -f monitor -n HACMPmonitor) if [[ -n $MON ]] then # Harvest the action and optional notofy method ACTION=$(/usr/es/sbin/cluster/utilities/clodmget -q"monitor = $MON AND name = FAILURE_ACTION AND type = CRITICAL_VG" -f value -n HACMPmonitor) NOTIFY=$(/usr/es/sbin/cluster/utilities/clodmget -q"monitor = $MON AND name = NOTIFY_METHOD AND type = CRITICAL_VG" -f value -n HACMPmonitor) else # Use defaults ACTION=halt NOTIFY= fi # all done echo "#ACTION:NOTIFY:VG" echo "$ACTION:$NOTIFY:$VG_name" } cmd_to_discover_rawname/usr/es/sbin/cluster/cspoc/cl_ls_shared_vgs -c -Ccl_rmfsCmdOptRemove a File Systemcspoc.catcspoc.catMark Volume group as non-Criticalcluster.catmain() { export ODMDIR=/etc/objrepos for VGNAME in $* do if ! /usr/es/sbin/cluster/utilities/clodmdelete -q "value = $VGNAME and name = CRITICAL_VG" -o HACMPresource then RGNAME=$(/usr/es/sbin/cluster/utilities/clodmget -q value=$VGNAME -f group -n HACMPresource) dspmsg -s 24 cspoc.cat 30 "cl_chvg: Marking volume group $VGNAME in resource group $RGNAME as non-CRITICAL failed " cl_chvg $VGNAME $RGNAME >& 2 return 1 fi done /usr/es/sbin/cluster/utilities/clodmdelete -q "monitor = HAMON_$VGNAME and type = CRITICAL_VG" -o HACMPmonitor Class=HACMPcluster: handle='handle=0' printf '%s %s ' $Class $handle | /usr/es/sbin/cluster/utilities/clodmchange -o HACMPcluster dspmsg -s 24 cspoc.cat 31 "cl_chvg: The HACMP configuration has been changed - Volume Group $VGNAME is no longer marked CRITICAL. The configuration must be synchronized to make this change effective across the cluster " cl_chvg 'CRITICAL Volume Group' $VGNAME } maincluster_hlp.catcspoc.catcl_chshmp.optShow all Critical Volume Groupscspoc.cat/usr/es/sbin/cluster/cspoc/cl_ls_shared_vgs -c -C -O/usr/es/sbin/cluster/sbin/cl_lsmpvgs -mMP_name VG_namecl_rmvg.dialogcspoc.cat_CSPOC_CALLED_FROM_SMIT=true /usr/es/sbin/cluster/sbin/cl_rmvg -cspoccl__cmdlvmextendvgdmpShow Cluster Release Levelcspoc.catcl_chshdiskdoptLearn more about available updates and fixesmain() { print $* | read Refnode Nodelist HDisk VGName _CSPOC_CALLED_FROM_SMIT=true /usr/es/sbin/cluster/sbin/cl_lspvdisk -cspoc -n${Nodelist} -R ${Refnode} ${VGName} ${HDisk} } mainRefNode Nodelist Hdisk VGNamecl_chshdiskmpdoptShow all Mirror Poolscspoc.cat/usr/es/sbin/cluster/sbin/cl_lsmpvgs -lmain() { print $* | read Refnode Nodelist HDisk VGName _CSPOC_CALLED_FROM_SMIT=true /usr/es/sbin/cluster/sbin/cl_lspvdisk -cspoc -n${Nodelist} -R ${Refnode} ${VGName} ${HDisk} } mainRefNode Nodelist Hdisk VGNamecl_chshmp.optcspoc.catmain() { # # First operand and value is always the mirror pool # Second is always the cspoc node list # MP_parm=$1 CS_parm="$2 $3" shift 3 /usr/es/sbin/cluster/sbin/cl_chshmp $CS_parm $MP_parm $* } main $*Add a Logical Volumecspoc.catAdd a Volume to a Volume Groupcspoc.cat_CSPOC_CALLED_FROM_SMIT=true /usr/es/sbin/cluster/sbin/cl_extendvg -cspoclvdisc () { Sched='p'; Perm='r'; BadBlk='n'; Verify='n'; MirrWC='n' case $1 in 1 ) Sched='s' ;; 4 ) Sched='ps' ;; 8 ) Sched='pr' ;; 5 ) Sched='st' ;; esac if (( $2 == 1 )) then Perm='w' fi if (( $3 == 1 )) then BadBlk='y' fi if (( $4 == 1 )) then Verify='y' fi case $5 in 1 ) MirrWC='y' ;; 4 ) MirrWC='p' ;; esac case $6 in 0 ) OverlapIO='n' ;; 1 ) OverlapIO='y' ;; esac echo '#::::::::::Sched:Permissions:BadBlk:Verify:MirrWC:OverlapIO' echo '::::::::::'$Sched':'$Perm':'$BadBlk':'$Verify':'$MirrWC':'$OverlapIO } lvdiscSched Permissions BadBlk Verify MirrWC OverlapIOcspoc.catmain() { print $* | read hdiskname rest _CSPOC_CALLED_FROM_SMIT=true /usr/es/sbin/cluster/sbin/cl_chpv $rest $hdiskname } mainmain() { print $* | read Refnode Nodelist HDisk VGName _CSPOC_CALLED_FROM_SMIT=true /usr/es/sbin/cluster/sbin/cl_lspvdisk -cspoc -n${Nodelist} -R ${Refnode} ${VGName} ${HDisk} } mainRefNode Nodelist Hdisk VGNamecl_chshdiskmpdoptcspoc.catcl_rendiskdoptRename a Physical Volumecspoc.catcl__cmdlvmmirrorvgdmpcspoc.cat/usr/es/sbin/cluster/cspoc/cllspvids -Acl__cmdlvmchlvmpChange a Logical Volume on the Clustercspoc.catcl__cmdlvmchlvcspoc.catcl_show_vgmpsdoptcspoc.cat/usr/es/sbin/cluster/sbin/cl_lsmpvgscspoc.cat_CSPOC_CALLED_FROM_SMIT=true _CSPOC_MODE=both /usr/es/sbin/cluster/sbin/cl_mklvcopyMirror a Volume Groupcspoc.catmain() { export _CSPOC_MODE=evaluate export _CSPOC_CALLED_FROM_SMIT=true /usr/es/sbin/cluster/sbin/cl_mirrorvg -cspoc $* } maincspoc.cat_CSPOC_CALLED_FROM_SMIT=true /usr/es/sbin/cluster/sbin/cl_chvgcl_mp_add_disksd_optAdd Disks to a Mirror Poolcspoc.catcl_mp_rm_disksd_optRemove Disks from Mirror Poolcspoc.catcspoc.catcspoc.catcl_ren_mpd_optRename a Mirror Poolcspoc.catcspoc.catcspoc.catcl_user_add_ldapShow LDAP Servercspoc.cat/usr/es/sbin/cluster/cspoc/cl_ldap_server_showlsuser -Dcluster_hlp.catcl_user_change_ldapDelete LDAP Servercspoc.cat/usr/es/sbin/cluster/cspoc/cl_ldap_server_dellsuser -R LDAP -c_rawnamecluster_hlp.catcspoc.cat/usr/es/sbin/cluster/cspoc/cl_ldap_client_configcluster_hlp.catShow LDAP Clientcspoc.cat/usr/es/sbin/cluster/cspoc/cl_ldap_client_showcluster_hlp.catcl_group_add_ldapDelete LDAP Clientcspoc.cat/usr/es/sbin/cluster/cspoc/cl_ldap_client_delcluster_hlp.catcl_user_add_ldapAdd a User to the LDAPcspoc.catmode=LDAP /usr/es/sbin/cluster/cspoc/fix_args nop cl_mkuserlsuser -D_rawnamecluster_hlp.catcl_user_change_ldapcspoc.catmode=LDAP /usr/es/sbin/cluster/cspoc/fix_args nop cl_chusercluster_hlp.catRemove a LDAP Usercspoc.catmode=LDAP /usr/es/sbin/cluster/cspoc/fix_args nop cl_rmusercluster_hlp.catcl_chpasswd_ldapList all LDAP Usercspoc.catcluster_hlp.catcl_group_add_ldapcspoc.catcluster_hlp.catcspoc.catlsgroup -R LDAP -ccluster_hlp.catRemove a LDAP Groupcspoc.catcluster_hlp.cat_cm_rg_oss_dependencies.add.dialogList all LDAP Groupscspoc.catcluster_hlp.catcl_chpasswd_ldapChange a LDAP User's Passwordcspoc.catcluster_hlp.catcl_efs_enable_keystore_optEnable EFS Keystorecspoc.cat/usr/es/sbin/cluster/cspoc/cl_enable_efscluster_hlp.catcl_ch_keystore_optChange/Show EFS Keystorecspoc.cat/usr/es/sbin/cluster/cspoc/cl_change_efs_clm.cm_chg_cus_grp.sitesDelete EFS Keystorecspoc.catcmd_to_discover () { args=$*; grp_out=`/usr/es/sbin/cluster/utilities/clgetgrp -c $args` if [ $? -ne 0 ] then exit 1; fi grp_head=`/usr/es/sbin/cluster/utilities/clgetgrp -c $args | grep '#'` grp_data=`/usr/es/sbin/cluster/utilities/clgetgrp -c $args | grep -v '#'` time=`/usr/es/sbin/cluster/utilities/clchmsgtimer | grep -v '#'` time1=`echo $time|cut -f1 -d :` time2=`echo $time|cut -f2 -d :` time=`expr $time1 + $time2` if [ $time -eq 0 ] then time=180 fi echo $grp_head:time echo $grp_data:$time Seconds } cmd_to_discover-g _rawnamecluster_hlp.cat_cm_rg_oss_dependencies.add.dialogAdd Online on the same site Dependency between Resource Groupscluster.catcluster.cat/usr/es/sbin/cluster/utilities/clrgdependency -t'SITECOLLOCATION' -ucluster.cat_cm_add_custom_resource_group_dialog.sitescluster.cat/usr/es/sbin/cluster/utilities/claddgrp cmd_to_discover () { type=$(/usr/es/sbin/cluster/utilities/clodmget -n -f multi_site_lc HACMPcluster) echo "#type" case $type in -1) dspmsg -s 3 command.cat 5 "Standard" ;; 0) dspmsg -s 3 command.cat 4 "Stretched" ;; 1) dspmsg -s 3 command.cat 3 "Linked" ;; esac } cmd_to_discovercluster_hlp.cat_clm.cm_chg_cus_grp.sitescluster.cat/usr/es/sbin/cluster/utilities/clchgrpcluster_hlp.catcluster.cat/usr/es/sbin/cluster/utilities/clmgr add service_ipcluster_hlp.cat_clm.cllssiteShow Site Topology Informationcluster.catcmd_to_discover () { /usr/es/sbin/cluster/utilities/clgetgrp -fstartup $* | read STPOLICY /usr/es/sbin/cluster/utilities/clgetgrp -ffallover $* | read FOPOLICY /usr/es/sbin/cluster/utilities/clgetgrp -ffallback $* | read FBPOLICY if ! /usr/bin/lslpp -L cluster.es.genxd.cmds > /dev/null 2>&1 then /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep "#" | read HEAD /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" | read DATA echo "$HEAD:STARTUP:FALLOVER:FALLBACK" echo "$DATA:$STPOLICY:$FOPOLICY:$FBPOLICY" else /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s ds8k_gm $* | read D8SKRES /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s xiv_rm $* | read XIVRES /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s ds8k_inband_mm $* | read DS8KMMRES /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep "#" | sed "s/:GENXD_REP_RESOURCE:/:/" | read HEAD MIRROR_GRP=$(/usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" |cut -f36 -d:) if [[ -n $MIRROR_GRP ]] then /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" | sed "s/:$MIRROR_GRP:/:/" | read DATA else /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" |awk 'BEGIN{FS=OFS=":"}{$36="++"}{print}'|sed 's/:++:/:/'| read DATA fi echo "$HEAD:STARTUP:FALLOVER:FALLBACK:GENXD_REP_RESOURCE:GENXD_REP_RESOURCE_XIV:DS8K_MM_RESOURCES" echo "$DATA:$STPOLICY:$FOPOLICY:$FBPOLICY:$D8SKRES:$XIVRES:$DS8KMMRES" fi } cmd_to_discover-g _rawname_clm.cllssite.nameShow Cluster Site Attributescluster.cat/usr/es/sbin/cluster/utilities/cltopinfo -ncmd_to_discover () { /usr/es/sbin/cluster/utilities/clgetgrp -fstartup $* | read STPOLICY /usr/es/sbin/cluster/utilities/clgetgrp -ffallover $* | read FOPOLICY /usr/es/sbin/cluster/utilities/clgetgrp -ffallback $* | read FBPOLICY if ! /usr/bin/lslpp -L cluster.es.genxd.cmds > /dev/null 2>&1 then /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep "#" | read HEAD /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" | read DATA echo "$HEAD:STARTUP:FALLOVER:FALLBACK" echo "$DATA:$STPOLICY:$FOPOLICY:$FBPOLICY" else /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s ds8k_gm $* | read D8SKRES /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s xiv_rm $* | read XIVRES /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s ds8k_inband_mm $* | read DS8KMMRES /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep "#" | sed "s/:GENXD_REP_RESOURCE:/:/" | read HEAD MIRROR_GRP=$(/usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" |cut -f36 -d:) if [[ -n $MIRROR_GRP ]] then /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" | sed "s/:$MIRROR_GRP:/:/" | read DATA else /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" |awk 'BEGIN{FS=OFS=":"}{$36="++"}{print}'|sed 's/:++:/:/'| read DATA fi echo "$HEAD:STARTUP:FALLOVER:FALLBACK:GENXD_REP_RESOURCE:GENXD_REP_RESOURCE_XIV:DS8K_MM_RESOURCES" echo "$DATA:$STPOLICY:$FOPOLICY:$FBPOLICY:$D8SKRES:$XIVRES:$DS8KMMRES" fi } cmd_to_discover-g _rawnameAdd a Sitecluster.cat/usr/es/sbin/cluster/utilities/clmgr -D add sitecmd_to_discover () { type=$(/usr/es/sbin/cluster/utilities/clodmget -n -f multi_site_lc HACMPcluster) echo "#type" case $type in -1) dspmsg -s 3 command.cat 5 "Standard" ;; 0) dspmsg -s 3 command.cat 4 "Stretched" ;; 1) dspmsg -s 3 command.cat 3 "Linked" ;; esac } cmd_to_discover-g _rawnameChange/Show a Sitecluster.cat/usr/es/sbin/cluster/utilities/clmgr modify site /usr/es/sbin/cluster/utilities/cllssite -cu siteRemove a Cluster Sitecluster.cat/usr/es/sbin/cluster/utilities/clmgr -f delete sitecmd_to_discover () { /usr/es/sbin/cluster/utilities/clgetgrp -fstartup $* | read STPOLICY /usr/es/sbin/cluster/utilities/clgetgrp -ffallover $* | read FOPOLICY /usr/es/sbin/cluster/utilities/clgetgrp -ffallback $* | read FBPOLICY if ! /usr/bin/lslpp -L cluster.es.genxd.cmds > /dev/null 2>&1 then /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep "#" | read HEAD /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" | read DATA echo "$HEAD:STARTUP:FALLOVER:FALLBACK" echo "$DATA:$STPOLICY:$FOPOLICY:$FBPOLICY" else /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s ds8k_gm $* | read D8SKRES /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s xiv_rm $* | read XIVRES /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s ds8k_inband_mm $* | read DS8KMMRES /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep "#" | sed "s/:GENXD_REP_RESOURCE:/:/" | read HEAD MIRROR_GRP=$(/usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" |cut -f36 -d:) if [[ -n $MIRROR_GRP ]] then /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" | sed "s/:$MIRROR_GRP:/:/" | read DATA else /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" |awk 'BEGIN{FS=OFS=":"}{$36="++"}{print}'|sed 's/:++:/:/'| read DATA fi echo "$HEAD:STARTUP:FALLOVER:FALLBACK:GENXD_REP_RESOURCE:GENXD_REP_RESOURCE_XIV:DS8K_MM_RESOURCES" echo "$DATA:$STPOLICY:$FOPOLICY:$FBPOLICY:$D8SKRES:$XIVRES:$DS8KMMRES" fi } cmd_to_discover-g _rawname_clm.cm_cfg_res.customSiteE1cluster.cat/usr/es/sbin/cluster/utilities/clmgr modify resource_group cmd_to_discover () { /usr/es/sbin/cluster/utilities/clgetgrp -fstartup $* | read STPOLICY /usr/es/sbin/cluster/utilities/clgetgrp -ffallover $* | read FOPOLICY /usr/es/sbin/cluster/utilities/clgetgrp -ffallback $* | read FBPOLICY if ! /usr/bin/lslpp -L cluster.es.genxd.cmds > /dev/null 2>&1 then /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep "#" | read HEAD /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" | read DATA echo "$HEAD:STARTUP:FALLOVER:FALLBACK" echo "$DATA:$STPOLICY:$FOPOLICY:$FBPOLICY" else /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s ds8k_gm $* | read D8SKRES /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s xiv_rm $* | read XIVRES /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s ds8k_inband_mm $* | read DS8KMMRES /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep "#" | sed "s/:GENXD_REP_RESOURCE:/:/" | read HEAD MIRROR_GRP=$(/usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" |cut -f36 -d:) if [[ -n $MIRROR_GRP ]] then /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" | sed "s/:$MIRROR_GRP:/:/" | read DATA else /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" |awk 'BEGIN{FS=OFS=":"}{$36="++"}{print}'|sed 's/:++:/:/'| read DATA fi echo "$HEAD:STARTUP:FALLOVER:FALLBACK:GENXD_REP_RESOURCE:GENXD_REP_RESOURCE_XIV:DS8K_MM_RESOURCES" echo "$DATA:$STPOLICY:$FOPOLICY:$FBPOLICY:$D8SKRES:$XIVRES:$DS8KMMRES" fi } cmd_to_discover-g _rawname_clm.cm_cfg_res.customSiteE2cluster.cat/usr/es/sbin/cluster/utilities/clmgr modify resource_group cmd_to_discover () { /usr/es/sbin/cluster/utilities/clgetgrp -fstartup $* | read STPOLICY /usr/es/sbin/cluster/utilities/clgetgrp -ffallover $* | read FOPOLICY /usr/es/sbin/cluster/utilities/clgetgrp -ffallback $* | read FBPOLICY if ! /usr/bin/lslpp -L cluster.es.genxd.cmds > /dev/null 2>&1 then /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep "#" | read HEAD /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" | read DATA echo "$HEAD:STARTUP:FALLOVER:FALLBACK" echo "$DATA:$STPOLICY:$FOPOLICY:$FBPOLICY" else /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s ds8k_gm $* | read D8SKRES /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s xiv_rm $* | read XIVRES /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s ds8k_inband_mm $* | read DS8KMMRES /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep "#" | sed "s/:GENXD_REP_RESOURCE:/:/" | read HEAD MIRROR_GRP=$(/usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" |cut -f36 -d:) if [[ -n $MIRROR_GRP ]] then /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" | sed "s/:$MIRROR_GRP:/:/" | read DATA else /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" |awk 'BEGIN{FS=OFS=":"}{$36="++"}{print}'|sed 's/:++:/:/'| read DATA fi echo "$HEAD:STARTUP:FALLOVER:FALLBACK:GENXD_REP_RESOURCE:GENXD_REP_RESOURCE_XIV:DS8K_MM_RESOURCES" echo "$DATA:$STPOLICY:$FOPOLICY:$FBPOLICY:$D8SKRES:$XIVRES:$DS8KMMRES" fi } cmd_to_discover-g _rawname_clm.cm_cfg_res.customSiteE3Change/Show All Resources and Attributes for a Resource Groupcluster.cat/usr/es/sbin/cluster/utilities/clmgr modify resource_group cmd_to_discover () { /usr/es/sbin/cluster/utilities/clgetgrp -fstartup $* | read STPOLICY /usr/es/sbin/cluster/utilities/clgetgrp -ffallover $* | read FOPOLICY /usr/es/sbin/cluster/utilities/clgetgrp -ffallback $* | read FBPOLICY if ! /usr/bin/lslpp -L cluster.es.genxd.cmds > /dev/null 2>&1 then /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep "#" | read HEAD /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" | read DATA echo "$HEAD:STARTUP:FALLOVER:FALLBACK" echo "$DATA:$STPOLICY:$FOPOLICY:$FBPOLICY" else /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s ds8k_gm $* | read D8SKRES /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s xiv_rm $* | read XIVRES /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s ds8k_inband_mm $* | read DS8KMMRES /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep "#" | sed "s/:GENXD_REP_RESOURCE:/:/" | read HEAD MIRROR_GRP=$(/usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" |cut -f36 -d:) if [[ -n $MIRROR_GRP ]] then /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" | sed "s/:$MIRROR_GRP:/:/" | read DATA else /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" |awk 'BEGIN{FS=OFS=":"}{$36="++"}{print}'|sed 's/:++:/:/'| read DATA fi echo "$HEAD:STARTUP:FALLOVER:FALLBACK:GENXD_REP_RESOURCE:GENXD_REP_RESOURCE_XIV:DS8K_MM_RESOURCES" echo "$DATA:$STPOLICY:$FOPOLICY:$FBPOLICY:$D8SKRES:$XIVRES:$DS8KMMRES" fi } cmd_to_discover-g _rawname_clm.cm_cfg_res.customSiteE4Change/Show All Resources and Attributes for a Resource Groupcluster.cat/usr/es/sbin/cluster/utilities/clmgr modify resource_group cmd_to_discover () { /usr/es/sbin/cluster/utilities/clgetgrp -fstartup $* | read STPOLICY /usr/es/sbin/cluster/utilities/clgetgrp -ffallover $* | read FOPOLICY /usr/es/sbin/cluster/utilities/clgetgrp -ffallback $* | read FBPOLICY if ! /usr/bin/lslpp -L cluster.es.genxd.cmds > /dev/null 2>&1 then /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep "#" | read HEAD /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" | read DATA echo "$HEAD:STARTUP:FALLOVER:FALLBACK" echo "$DATA:$STPOLICY:$FOPOLICY:$FBPOLICY" else /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s ds8k_gm $* | read D8SKRES /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s xiv_rm $* | read XIVRES /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s ds8k_inband_mm $* | read DS8KMMRES /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep "#" | sed "s/:GENXD_REP_RESOURCE:/:/" | read HEAD MIRROR_GRP=$(/usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" |cut -f36 -d:) if [[ -n $MIRROR_GRP ]] then /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" | sed "s/:$MIRROR_GRP:/:/" | read DATA else /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" |awk 'BEGIN{FS=OFS=":"}{$36="++"}{print}'|sed 's/:++:/:/'| read DATA fi echo "$HEAD:STARTUP:FALLOVER:FALLBACK:GENXD_REP_RESOURCE:GENXD_REP_RESOURCE_XIV:DS8K_MM_RESOURCES" echo "$DATA:$STPOLICY:$FOPOLICY:$FBPOLICY:$D8SKRES:$XIVRES:$DS8KMMRES" fi } cmd_to_discover-g _rawname_clm.cm_cfg_res.customSiteE5Change/Show All Resources and Attributes for a Resource Groupcluster.cat/usr/es/sbin/cluster/utilities/clmgr modify resource_group cmd_to_discover () { /usr/es/sbin/cluster/utilities/clgetgrp -fstartup $* | read STPOLICY /usr/es/sbin/cluster/utilities/clgetgrp -ffallover $* | read FOPOLICY /usr/es/sbin/cluster/utilities/clgetgrp -ffallback $* | read FBPOLICY if ! /usr/bin/lslpp -L cluster.es.genxd.cmds > /dev/null 2>&1 then /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep "#" | read HEAD /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" | read DATA echo "$HEAD:STARTUP:FALLOVER:FALLBACK" echo "$DATA:$STPOLICY:$FOPOLICY:$FBPOLICY" else /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s ds8k_gm $* | read D8SKRES /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s xiv_rm $* | read XIVRES /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s ds8k_inband_mm $* | read DS8KMMRES /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep "#" | sed "s/:GENXD_REP_RESOURCE:/:/" | read HEAD MIRROR_GRP=$(/usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" |cut -f36 -d:) if [[ -n $MIRROR_GRP ]] then /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" | sed "s/:$MIRROR_GRP:/:/" | read DATA else /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" |awk 'BEGIN{FS=OFS=":"}{$36="++"}{print}'|sed 's/:++:/:/'| read DATA fi echo "$HEAD:STARTUP:FALLOVER:FALLBACK:GENXD_REP_RESOURCE:GENXD_REP_RESOURCE_XIV:DS8K_MM_RESOURCES" echo "$DATA:$STPOLICY:$FOPOLICY:$FBPOLICY:$D8SKRES:$XIVRES:$DS8KMMRES" fi } cmd_to_discover-g _rawnamecluster.cat/usr/es/sbin/cluster/utilities/clmgr modify resource_group cluster_hlp.catcluster.cat/usr/es/sbin/cluster/utilities/clmgr modify resource_group cluster_hlp.catcluster.catcluster_hlp.catcluster.cat/usr/es/sbin/cluster/utilities/clmgr modify resource_group cluster.cat_clm.cm_cfg_res.customSiteEDP5cluster.cat/usr/es/sbin/cluster/utilities/clmgr modify resource_group cluster_hlp.cat_clm.claddnode.multisitecluster.catcluster_hlp.cat_clm.sites_repos_ipaddrcluster.catcluster_hlp.catcm_show_repos_disk.sitescluster.cat/usr/es/sbin/cluster/utilities/cltopinfocluster_hlp.cat_clm.repos_ipaddr_nonodescluster.catcluster.catCluster heartbeat settingscluster.catcmd_to_exec() { NFDT=$1 NFGT=$2 NLFDT=$3 NLPCY=$4 LFDT=$5 SHBC=$6 RPSM=$7 CFGT=$8 /usr/es/sbin/cluster/utilities/clmgr modify cluster HEARTBEAT_FREQUENCY=$NFDT GRACE_PERIOD=$NFGT HEARTBEAT_FREQUENCY_DURING_LPM=$NLFDT LPM_POLICY=$NLPCY SITE_HEARTBEAT_CYCLE=$SHBC SITE_GRACE_PERIOD=$LFDT CAA_REPOS_MODE=$RPSM CAA_CONFIG_TIMEOUT=$CFGT } cmd_to_exec main() { /usr/es/sbin/cluster/utilities/clodmget -n -f node_timeout,node_down_delay,lpm_node_timeout,lpm_policy,link_timeout,remote_HB_factor,repos_mode,config_timeout HACMPcluster | IFS=: read nodefdt nodefgt nodelfdt nodelpcy linkfdt linkfreq rps_mode cnfg_timeout [[ -z $nodelpcy ]] && nodelpcy=manage if [[ $rps_mode == 0 ]] then rps_mode=assert else rps_mode=event fi print "#nodefdt:nodefgt:nodelfdt:nodelpcy:linkfdt:linkfreq:rps_mode:cnfg_timeout" print "$nodefdt":"$nodefgt":"$nodelfdt":$nodelpcy:"$linkfdt":"$linkfreq":"$rps_mode":"$cnfg_timeout" } maincluster_hlp.catAdd a Repository Diskcluster.cat function main { typeset site=$1 typeset disks=$( print -- "$2" | sed 's/[()]//g') PATH=$PATH:/usr/es/sbin/cluster/utilities clmgr add repository "$disks" SITE=$site DISABLE_VALIDATION=true } mainmain() { # : Extract any cluster name, heart beat type, and : name, node list, and heart beat IP address for each site # odmget HACMPcluster | egrep -w 'name =|heartbeattype =' | sed 's/.*"\(.*\)".*/\1/' | paste - - | read cname hbc if [[ $hbc == U* ]] then hbc=$(dspmsg -s 64 cluster.cat 4 Unicast) else hbc=$(dspmsg -s 64 cluster.cat 5 Multicast) fi # : Put out the header line to describe the variables to SMIT # print -- "#cname:hbc:site1:repos1:ip1:site2:repos2:ip2" outline="${cname}:${hbc}" /usr/es/sbin/cluster/utilities/clodmget -f name -n HACMPsite | while read name do ip_address=$(/usr/es/sbin/cluster/utilities/clodmget -q "name = ${name}_sircol" -f ip_address -n HACMPsircol) if [[ -z $ip_address ]] then ip_address=$(dspmsg -s 1 cluster.cat 860 "Default") fi repository=$(/usr/es/sbin/cluster/utilities/clodmget -q "name = ${name}_sircol" -f repository -n HACMPsircol) outline="${outline}:${name}:${repository}:${ip_address}" done print -- "$outline" return 0 } maincluster_hlp.catRemove a Repository diskcluster.cat function main { typeset site=$1 typeset repositories=$2 PATH=$PATH:/usr/es/sbin/cluster/utilities clmgr -f delete repository "$repositories" SITE=$site } mainmain() { # : Extract any cluster name, heart beat type, and : name, node list, and heart beat IP address for each site # odmget HACMPcluster | egrep -w 'name =|heartbeattype =' | sed 's/.*"\(.*\)".*/\1/' | paste - - | read cname hbc if [[ $hbc == U* ]] then hbc=$(dspmsg -s 64 cluster.cat 4 Unicast) else hbc=$(dspmsg -s 64 cluster.cat 5 Multicast) fi # : Put out the header line to describe the variables to SMIT # print -- "#cname:hbc:site1:repos1:ip1:site2:repos2:ip2" outline="${cname}:${hbc}" /usr/es/sbin/cluster/utilities/clodmget -f name -n HACMPsite | while read name do ip_address=$(/usr/es/sbin/cluster/utilities/clodmget -q "name = ${name}_sircol" -f ip_address -n HACMPsircol) if [[ -z $ip_address ]] then ip_address=$(dspmsg -s 1 cluster.cat 860 "Default") fi repository=$(/usr/es/sbin/cluster/utilities/clodmget -q "name = ${name}_sircol" -f repository -n HACMPsircol) outline="${outline}:${name}:${repository}:${ip_address}" done print -- "$outline" return 0 } maincluster_hlp.catclca_nfs_del.dialog.opt/usr/es/sbin/cluster/sa/nfs/sbin/clca_nfsutil delrg $1clca_nfs_add_optsAdd a Resource Group with NFS exportscluster.cat/usr/es/sbin/cluster/sa/nfs/sbin/clca_nfsutil addrg/usr/es/sbin/cluster/sa/nfs/sbin/clca_nfsutil add_discoverclca_nfs_mod_optsChange/Show a Resource Group with NFS exportscluster.cat/usr/es/sbin/cluster/sa/nfs/sbin/clca_nfsutil modrg/usr/es/sbin/cluster/sa/nfs/sbin/clca_nfsutil mod_discover_rawnamecluster_hlp.catclsa_d_optsRemove an Application from the PowerHA SystemMirror configurationcluster.cat cmd_to_exec() { SA_ID="$1" COMPONENT_ID="$2" APPLICATION_ID="$3" /usr/es/sbin/cluster/sa/sbin/clquerysaapp -a "$APPLICATION_ID" RESOURCE_GROUP | while IFS='=' read tmp RG_NAME; do typeset -i ONLINE_COUNT=$(/usr/es/sbin/cluster/utilities/clRGinfo -s $RG_NAME 2>/dev/null | grep -w ONLINE | wc -l ) if [[ $ONLINE_COUNT > 0 ]]; then RG_ONLINE=1 RG_NAME_ONLINE[$count]=$RG_NAME count=$count+1 fi done if [[ $RG_ONLINE > 0 ]]; then print "${RG_NAME_ONLINE[*]} should be brought OFFLINE before changes are made." else /usr/es/sbin/cluster/sa/sbin/clrmrgs -a "$APPLICATION_ID" /usr/es/sbin/cluster/sa/sbin/clrmsaapp -d -a "$APPLICATION_ID" typeset SID=$( echo $APPLICATION_ID 2>/dev/null | cut -c 5-7 2>/dev/null ) typeset -i APP_COUNT=$( /usr/es/sbin/cluster/sa/sbin/cllssaapp | grep -v "GFS" | grep "SAP_$SID" | wc -l ) typeset IS_GLOBALS=$( odmget -q "application_id like SAP_GLOBALS_$SID" HACMPsa_metadata ) if [[ $APP_COUNT == 0 && -n $IS_GLOBALS ]]; then /usr/es/sbin/cluster/sa/sbin/clrmsaapp -d -a "SAP_GLOBALS_$SID" fi /usr/es/sbin/cluster/diag/clver -rt -C yes fi } cmd_to_execclsa_add.manual_mode_optsImport Smart Assist Configuration From a XML Filecluster.catcmd_to_exec() { sa_id="$1" input_file="$2" manual_config_command=$(odmget -q "sa_id=$sa_id and name=SMIT_MANUAL_ADD" HACMPsa | grep value | awk -F'=' '{print $2}' | awk -F'"' '{print $2}' ) if [[ -n $manual_config_command ]]; then $manual_config_command $input_file else dspmsg -s 51 cluster.cat 27 "No Manual Configuration command available for this Smart Assist" exit 1 fi } cmd_to_exec cmd_to_discover() { typeset -u SA_ID_UC=$1 typeset sa_root="/usr/es/sbin/cluster/sa" typeset xml_file="" #================================================================ # Determine an appropriate default XML config file based upon # the Smart Assist ID the customer selected. Some Smart Assists, # however, use the same ID for different aspects of the same # application, and require a different file. However, since the # component ID is not known at this point, it is not possible # to know which component they plan to work with. So the cmdopt # for the file input lists all possibilities in that case. #================================================================ case $SA_ID_UC in DB2*) xml_file="db2/config/db2_config.xml" ;; DHCP*) xml_file="dhcp/config/cl_dhcp_manual_config.xml" ;; DNS*) xml_file="dns/config/cl_dns_manual_config.xml" ;; DOMINO*) xml_file="domino/config/cl_dominoserver_config.xml" ;; FILENET*) xml_file="filenet/config/cl_filenet_manual_config.xml" ;; IHS*) xml_file="ihs/config/ihs_config.xml" ;; MAXDB*) xml_file="maxdb/config/maxdb_config.xml" if [[ $SA_ID_UC == *HS* ]]; then xml_file="maxdb/config/maxdb_hs_config.xml" fi ;; ORACLE*) xml_file="oracle/config/oracle_config.xml" if [[ $SA_ID_UC == *APPSRV* ]]; then xml_file="oraappsrv/config/oraapp_config.xml" fi ;; PRINT_SERVER) xml_file="printServer/config/cl_print_server_manual_config.xml" ;; SAP*) xml_file="sap/config/cl_sap_manual_config.xml" ;; TDS*) xml_file="tds/config/tds_config.xml" ;; TSM*SERV*) xml_file="tsmserver/config/cl_tsmserver_config.xml" ;; TSM*CLIENT*) xml_file="tsmclient/config/cl_tsmclient_config.xml" ;; TSM*AC*) xml_file="tsmadmin/config/cl_tsmadmin_config.xml" ;; WAS*) xml_file="was/config/was_config.xml" ;; WMQ*) xml_file="wmq/config/cl_wmq_manual_config.xml" ;; esac if [[ -n $xml_file ]]; then xml_file="$sa_root/$xml_file" fi echo "#sa_id:xml_file" echo $1:$xml_file } cmd_to_discoversa_idcluster_hlp.catclsa_d_optsTest Your Application for Availabilitycluster.cat cmd_to_exec() { SA_ID="$1" COMPONENT_ID="$2" APPLICATION_ID="$3" SA_TEST=/usr/es/sbin/cluster/etc/sa_test echo Args: $* echo SA_ID=$SA_ID TEST_COMMAND=$( /usr/es/sbin/cluster/sa/sbin/clquerysa -t query -s $SA_ID -c $COMPONENT_ID -q TEST_COMMAND ) if [[ -z $TEST_COMMAND ]]; then TEST_COMMAND=/usr/es/sbin/cluster/sa/sbin/clgettestplan fi $TEST_COMMAND $APPLICATION_ID > $SA_TEST 2> /dev/null if (( $? == 0 )); then /usr/es/sbin/cluster/cl_testtool/cl_testtool -e $SA_TEST fi } cmd_to_execclsa_gasa_add_optsGeneral Application Smart Assistcluster.cat/usr/es/sbin/cluster/sa/gasa/sbin/add/usr/es/sbin/cluster/sa/gasa/sbin/smit_util add_discovernodescluster_hlp.catclsa_gasa_modify_optsGeneral Application Smart Assistcluster.cat/usr/es/sbin/cluster/sa/gasa/sbin/modify/usr/es/sbin/cluster/sa/gasa/sbin/smit_util modify_discoverapplication_idcluster_hlp.catcl_wmq_add_dialog.optAdd a WebSphere MQ Manager Highly Available Resource Groupwmq_sa.cat/usr/es/sbin/cluster/sa/wmq/sbin/cl_wmq_config/usr/es/sbin/cluster/sa/wmq/sbin/cl_wmq_query-A _rawnamewmq_sa.catcl_wmq_mod_dialog.optModify a WebSphere MQ Manager Highly Available Resource Groupwmq_sa.cat/usr/es/sbin/cluster/sa/wmq/sbin/cl_wmq_config -M/usr/es/sbin/cluster/sa/wmq/sbin/cl_wmq_query -Mapplication_idwmq_sa.catDiscover WebSphere Componentswassa.cat/usr/es/sbin/cluster/sa/was/sbin/cl_wasdiscoverycl_wassaaddnode_dialog.optAdd a WebSphere Application Server Node to the Clusterwassa.cat/usr/es/sbin/cluster/sa/was/sbin/cl_wasimport -a -t 'APPSERVER'/usr/es/sbin/cluster/sa/was/sbin/cl_wasgetnode-c Cell -N Node -nwassa.catcl_wassamodnode_dialog.optModify Existing WebSphere Application Server Node PowerHA SystemMirror Resourceswassa.cat/usr/es/sbin/cluster/sa/was/sbin/cl_wasimport -u -t 'APPSERVER'/usr/es/sbin/cluster/sa/was/sbin/cl_wasgetnode-A application_id -owassa.catcl_wassarmnode_dialog.optRemove Existing WebSphere Application Server Node PowerHA SystemMirror Resourceswassa.cat/usr/es/sbin/cluster/sa/was/sbin/cl_wasimport -r -t 'APPSERVER'/usr/es/sbin/cluster/sa/was/sbin/cl_wasgetnode-c Cell -N Node -owassa.catcl_wassaaddclus_dialog.optAdd WebSphere Cluster Transaction Log Recovery to the Clusterwassa.cat/usr/es/sbin/cluster/sa/was/sbin/cl_wasimportclus -a/usr/es/sbin/cluster/sa/was/sbin/cl_wasgetclus-n -c Cell -w Clusterwassa.catcl_wassamodclus_dialog.optModify Existing WebSphere Cluster Transaction Log Recovery PowerHA SystemMirror Resourceswassa.cat/usr/es/sbin/cluster/sa/was/sbin/cl_wasimportclus -u/usr/es/sbin/cluster/sa/was/sbin/cl_wasgetclus-o -A application_idwassa.catcl_wassarmclus_dialog.optRemove Existing WebSphere Cluster Transaction Log Recovery PowerHA SystemMirror Resourceswassa.cat/usr/es/sbin/cluster/sa/was/sbin/cl_wasimportclus -r/usr/es/sbin/cluster/sa/was/sbin/cl_wasgetclus-o -c Cell -w Clusterwassa.catcl_wassaadddm_dialog.optAdd a Deployment Manager to the Clusterwassa.cat/usr/es/sbin/cluster/sa/was/sbin/cl_wasimport -a -t 'DMMANAGER'/usr/es/sbin/cluster/sa/was/sbin/cl_wasgetdm-n -c Cellwassa.catcl_wassamoddm_dialog.optModify Existing Deployment Manager PowerHA SystemMirror Resourceswassa.cat/usr/es/sbin/cluster/sa/was/sbin/cl_wasimport -u -t 'DMMANAGER'/usr/es/sbin/cluster/sa/was/sbin/cl_wasgetdm-o -A application_idwassa.catcl_wassarmdm_dialog.optRemove Existing Deployment Manager PowerHA SystemMirror Resourceswassa.cat/usr/es/sbin/cluster/sa/was/sbin/cl_wasimport -r -t 'DMMANAGER'/usr/es/sbin/cluster/sa/was/sbin/cl_wasgetdm-o -c Cellwassa.catcl_wassaaddihs_dialog.optAdd an IBM HTTP Server to the Clusterwassa.cat/usr/es/sbin/cluster/sa/was/sbin/cl_wasimport -a -t 'HTTPSERVER'/usr/es/sbin/cluster/sa/was/sbin/cl_wasgetihs -h _rawname -nwassa.catcl_wassamodihs_dialog.optModify Existing IBM HTTP Server PowerHA SystemMirror Resourceswassa.cat/usr/es/sbin/cluster/sa/was/sbin/cl_wasimport -u -t 'HTTPSERVER'/usr/es/sbin/cluster/sa/was/sbin/cl_wasgetihs-A application_id -owassa.catcl_wassarmihs_dialog.optRemove Existing IBM HTTP Server PowerHA SystemMirror Resourceswassa.cat/usr/es/sbin/cluster/sa/was/sbin/cl_wasimport -r -t 'HTTPSERVER'/usr/es/sbin/cluster/sa/was/sbin/cl_wasgetihs -h _rawname -owassa.catcl_wassaaddtds_dialog.optAdd a Tivoli Directory Server to the Clusterwassa.cat/usr/es/sbin/cluster/sa/was/sbin/cl_wasimporttds -a /usr/es/sbin/cluster/sa/was/sbin/cl_wasgettds-nwassa.catcl_wassamodtds_dialog.optModify Tivoli Directory Server PowerHA SystemMirror Resourceswassa.cat/usr/es/sbin/cluster/sa/was/sbin/cl_wasimporttds -u /usr/es/sbin/cluster/sa/was/sbin/cl_wasgettds-A application_id -owassa.catcl_wassarmtds_dialog.optRemove Tivoli Directory Server PowerHA SystemMirror Resourceswassa.cat/usr/es/sbin/cluster/sa/was/sbin/cl_wasimporttds -r /usr/es/sbin/cluster/sa/was/sbin/cl_wasgettds-owassa.catcl_tsm_add_server_instance.optionAdd a TSM server Highly Available Instance Resource Grouptsmserversa.cat/usr/es/sbin/cluster/sa/tsmserver/sbin/cl_tsm_serv_config/usr/es/sbin/cluster/sa/tsmserver/sbin/cl_tsm_server_query-i instancetsmserversa.catcl_tsm_mod_server_instance.optionModify a TSM server Highly Available Instance Resource Grouptsmserversa.cat/usr/es/sbin/cluster/sa/tsmserver/sbin/cl_tsm_serv_config -m/usr/es/sbin/cluster/sa/tsmserver/sbin/cl_tsm_server_query -qapplication_idtsmserversa.catcl_tsm_add_client_instance.optionAdd a TSM client Highly Available Instance Resource Grouptsmclientsa.cat/usr/es/sbin/cluster/sa/tsmclient/sbin/cl_tsm_client_config/usr/es/sbin/cluster/sa/tsmclient/sbin/cl_tsm_client_query-c configdirtsmclientsa.catcl_tsm_mod_client_instance.optionModify a TSM client Highly Available Instance Resource Grouptsmclientsa.cat/usr/es/sbin/cluster/sa/tsmclient/sbin/cl_tsm_client_config -m/usr/es/sbin/cluster/sa/tsmclient/sbin/cl_tsm_client_query -qapplication_idtsmclientsa.catcl_tsm_add_admin_instance.optionAdd a TSM admin Highly Available Instance Resource Grouptsmadminsa.cat/usr/es/sbin/cluster/sa/tsmadmin/sbin/cl_tsm_admin_config/usr/es/sbin/cluster/sa/tsmadmin/sbin/cl_tsm_admin_query-ntsmadminsa.catcl_tsm_mod_admin_instance.optionModify a TSM admin Highly Available Instance Resource Grouptsmadminsa.cat/usr/es/sbin/cluster/sa/tsmadmin/sbin/cl_tsm_admin_config -m/usr/es/sbin/cluster/sa/tsmadmin/sbin/cl_tsm_admin_query -qapplication_idtsmadminsa.catcl_tdssaadd_dialog.optAdd a Tivoli Directory Server to the Clustertdssa.cat/usr/es/sbin/cluster/sa/tds/sbin/cl_importtds -a /usr/es/sbin/cluster/sa/tds/sbin/cl_gettds-ntdssa.catcl_tdssamod_dialog.optModify Tivoli Directory Server PowerHA SystemMirror Resourcestdssa.cat/usr/es/sbin/cluster/sa/tds/sbin/cl_importtds -u /usr/es/sbin/cluster/sa/tds/sbin/cl_gettds-A application_id -otdssa.catcl_tdssaadd_dialog1.optAdd a Tivoli Directory Server to the Clustertdssa.cat/usr/es/sbin/cluster/sa/tds/sbin/cl_importtds -a /usr/es/sbin/cluster/sa/tds/sbin/cl_gettds-ntdssa.catcl_tdssamod_dialog1.optModify Tivoli Directory Server PowerHA SystemMirror Resourcestdssa.cat/usr/es/sbin/cluster/sa/tds/sbin/cl_importtds -u /usr/es/sbin/cluster/sa/tds/sbin/cl_gettds-A application_id -otdssa.catcl_sapsa_add_gfs.optionAdd SAP Global Filesystem Detailssapsa.cat/usr/es/sbin/cluster/sa/sap/sbin/cl_addsapinstance -t GFS/usr/es/sbin/cluster/sa/sap/sbin/cl_instanceresources -i GFS-S sidsapsa.catcl_sapsa_mod_gfs.optionChange/Show SAP Global File System Detailssapsa.cat/usr/es/sbin/cluster/sa/sap/sbin/cl_modifysapinstance -t GFS -a sap_gfs/usr/es/sbin/cluster/sa/sap/sbin/cl_instanceresources-a application_idsapsa.catcl_sapsa_add_appinstance_cmd.optionAdd SAP Application Instance Detailssapsa.cat/usr/es/sbin/cluster/sa/sap/sbin/cl_addsapinstance -t AS/usr/es/sbin/cluster/sa/sap/sbin/cl_instanceresources-i _rawnamesapsa.catcl_sapsa_modify_appinstance.optionChange/Show SAP Application Instance Detailssapsa.cat/usr/es/sbin/cluster/sa/sap/sbin/cl_modifysapinstance -t AS/usr/es/sbin/cluster/sa/sap/sbin/cl_instanceresources-a application_idsapsa.catcl_sapsa_add_scsinstance_cmd.optionAdd SAP SCS/ASCS Instance(s) Detailssapsa.cat/usr/es/sbin/cluster/sa/sap/sbin/cl_addsapinstance -t SCS/usr/es/sbin/cluster/sa/sap/sbin/cl_instanceresources-i _rawnamesapsa.catcl_sapsa_modify_scsinstance.optionChange/Show SAP SCS/ASCS Instance(s) Detailssapsa.cat/usr/es/sbin/cluster/sa/sap/sbin/cl_modifysapinstance -t SCS/usr/es/sbin/cluster/sa/sap/sbin/cl_instanceresources-a application_idsapsa.catcl_sapsa_add_ersinstance_cmd.optionAdd SAP ERS Instance(s) Detailssapsa.cat/usr/es/sbin/cluster/sa/sap/sbin/cl_addsapinstance -t ERS/usr/es/sbin/cluster/sa/sap/sbin/cl_instanceresources-i _rawnamesapsa.catcl_sapsa_modify_ersinstance.optionChage/Show SAP ERS Instance(s) Detailssapsa.cat/usr/es/sbin/cluster/sa/sap/sbin/cl_modifysapinstance -t ERS/usr/es/sbin/cluster/sa/sap/sbin/cl_instanceresources-a application_idsapsa.catcl_db2sa_modify_single_instance.optionChange/Show SAP Database instance detailssapsa.cat/usr/es/sbin/cluster/sa/db2/sbin/cl_db2preimport -C 'DB2_NON_DPF_SINGLE' -T -M /usr/es/sbin/cluster/sa/db2/sbin/cl_db2smquery -qapplication_idsapsa.catcl_sapsa_modify_appinstance_attr.optionChange/Show SAP Application Instance attributes Detailssapsa.cat/usr/es/sbin/cluster/sa/sap/sbin/cl_modifysapattributes -t AS/usr/es/sbin/cluster/sa/sap/sbin/cl_instanceresources-a application_idsapsa.catcl_sapsa_modify_scsinstance_attr.optionChange/Show SAP SCS/ASCS Instance(s) attributes Detailssapsa.cat/usr/es/sbin/cluster/sa/sap/sbin/cl_modifysapattributes -t SCS/usr/es/sbin/cluster/sa/sap/sbin/cl_instanceresources-a application_idsapsa.catcl_sapsa_modify_ersinstance_attr.optionChage/Show SAP ERS Instance(s) attributes Detailssapsa.cat/usr/es/sbin/cluster/sa/sap/sbin/cl_modifysapattributes -t ERS/usr/es/sbin/cluster/sa/sap/sbin/cl_instanceresources-a application_idsapsa.catcl_print_server_sa_modify.optionModify a Print Subsystem Highly Available Resource Groupprint_server_sa.cat/usr/es/sbin/cluster/sa/printServer/sbin/cl_print_server_import -a -M /usr/es/sbin/cluster/sa/printServer/sbin/cl_print_server_query -q application_idprint_server_sa.catcl_print_server_sa_add_cmd.optionAdd a Print Susbsystem Highly Available Resource Groupprint_server_sa.cat/usr/es/sbin/cluster/sa/printServer/sbin/cl_print_server_import -a /usr/es/sbin/cluster/sa/printServer/sbin/cl_print_server_query -D-n nodes -c component_idprint_server_sa.catcl_oraclesa_add_ascfc.optionAdd an Oracle CFC Application Serveroraclesa.cat/usr/es/sbin/cluster/sa/oracle/sbin/cl_osa_addInstance -A CFC /usr/es/sbin/cluster/sa/oracle/sbin/cl_osa_discover -d -A 'CFC' -n nodes -s _rawnameoraclesa.catcl_oraclesa_add_as_afc_cmd.optionAdd an Oracle AFC Application Serveroraclesa.cat/usr/es/sbin/cluster/sa/oracle/sbin/cl_osa_addInstance -A AFC/usr/es/sbin/cluster/sa/oracle/sbin/cl_osa_discover -d -A AFC -n nodes -s _rawnameoraclesa.catcl_oraclesa_add_db_instance_cmd.optionAdd an Oracle RDBMS Instanceoraclesa.cat/usr/es/sbin/cluster/sa/oracle/sbin/cl_osa_addInstance -D/usr/es/sbin/cluster/sa/oracle/sbin/cl_osa_discover -D-d -s _rawname -n nodesoraclesa.catcl_oraclesa_modify_as_cfc.optionModify an Oracle CFC Application Serveroraclesa.cat/usr/es/sbin/cluster/sa/oracle/sbin/cl_osa_modifyInstance -A CFC /usr/es/sbin/cluster/sa/oracle/sbin/cl_osa_discover-a application_idoraclesa.catcl_oraclesa_modify_as_afc_cmd.optionModify an Oracle AFC Application Serveroraclesa.cat/usr/es/sbin/cluster/sa/oracle/sbin/cl_osa_modifyInstance -A AFC/usr/es/sbin/cluster/sa/oracle/sbin/cl_osa_discover-a application_idoraclesa.catcl_oraclesa_modify_db_instance_cmd.optionModify an Oracle RDBMS Instanceoraclesa.cat/usr/es/sbin/cluster/sa/oracle/sbin/cl_osa_modifyInstance -D/usr/es/sbin/cluster/sa/oracle/sbin/cl_osa_discover-a application_idoraclesa.catcl_oraappsa_add_ascfc.optionAdd an Oracle CFC Application Serveroraappsa.cat/usr/es/sbin/cluster/sa/oraappsrv/sbin/cl_osa_addInstance -A CFC /usr/es/sbin/cluster/sa/oraappsrv/sbin/cl_osa_discover -d -A 'CFC' -n nodes -s _rawnameoraappsa.catcl_oraappsa_add_as_afc_cmd.optionAdd an Oracle AFC Application Serveroraappsa.cat/usr/es/sbin/cluster/sa/oraappsrv/sbin/cl_osa_addInstance -A AFC/usr/es/sbin/cluster/sa/oraappsrv/sbin/cl_osa_discover -d -A AFC -n nodes -s _rawnameoraappsa.catcl_oraappsa_modify_as_cfc.optionModify an Oracle CFC Application Serveroraappsa.cat/usr/es/sbin/cluster/sa/oraappsrv/sbin/cl_osa_modifyInstance -A CFC /usr/es/sbin/cluster/sa/oraappsrv/sbin/cl_osa_discover-a application_idoraappsa.catcl_oraappsa_modify_as_afc_cmd.optionModify an Oracle AFC Application Serveroraappsa.cat/usr/es/sbin/cluster/sa/oraappsrv/sbin/cl_osa_modifyInstance -A AFC/usr/es/sbin/cluster/sa/oraappsrv/sbin/cl_osa_discover-a application_idoraappsa.catcl_hot_standby_wizard_cmd_svc_dialog_optionSAP liveCache Hot Standby Configurationlc_hs_wizard.cat/usr/es/sbin/cluster/sa/hswizard/sbin/cl_hotstandby_createInstancelc_hs_wizard.catcl_hot_standby_wizard_cmd_ds_dialog_optionSAP liveCache Hot Standby Configurationlc_hs_wizard.cat/usr/es/sbin/cluster/sa/hswizard/sbin/cl_hotstandby_createInstance lc_hs_wizard.catcl_hot_standby_wizard_cmd_mc_dialog_optionImport SAP liveCache Hot Standby Configuration From a XML Filelc_hs_wizard.cat/usr/es/sbin/cluster/sa/hswizard/sbin/cl_hotstandby_createInstance lc_hs_wizard.catcl_maxdbsa_add_db_instance_cmd.optionAdd a SAP MaxDB Database Instancemaxdbsa.cat/usr/es/sbin/cluster/sa/maxdb/sbin/cl_maxdb_addInstance /usr/es/sbin/cluster/sa/maxdb/sbin/cl_maxdb_discover -p-I instance -n owning_nodemaxdbsa.catcl_maxdbsa_modify_db_instance_cmd.optionModify the SAP MaxDB Database Instancemaxdbsa.cat/usr/es/sbin/cluster/sa/maxdb/sbin/cl_maxdb_modifyInstance /usr/es/sbin/cluster/sa/maxdb/sbin/cl_maxdb_discover-a application_idmaxdbsa.catcl_maxdbsa_hot_standby_add_db_instance_cmd.optionAdd a SAP MaxDB Hot Standby Database Instancemaxdbsa.cat/usr/es/sbin/cluster/sa/maxdb/sbin/cl_maxdb_addInstance -H /usr/es/sbin/cluster/sa/maxdb/sbin/cl_maxdb_discover -P -I instancemaxdbsa.catcl_maxdbsa_hot_standby_modify_db_instance_cmd.optionModify the SAP liveCache Hot Standby Database Instancemaxdbsa.cat/usr/es/sbin/cluster/sa/maxdb/sbin/cl_hotstandby_modifyInstance /usr/es/sbin/cluster/sa/maxdb/sbin/cl_maxdb_discover-A application_idmaxdbsa.catcl_addihs_dialog.optAdd an IBM HTTP Server to the Clusterihssa.cat/usr/es/sbin/cluster/sa/ihs/sbin/cl_ihsimport -a -t 'HTTPSERVER'/usr/es/sbin/cluster/sa/ihs/sbin/cl_getihs -h _rawname -nihssa.catcl_modihs_dialog.optModify Existing IBM HTTP Server PowerHA SystemMirror Resourcesihssa.cat/usr/es/sbin/cluster/sa/ihs/sbin/cl_ihsimport -u -t 'HTTPSERVER'/usr/es/sbin/cluster/sa/ihs/sbin/cl_getihs-A application_id -oihssa.catcl_domino_server_add.optionAdd a Lotus Domino Server Highly Available Resource Grouplotusdominosa.cat/usr/es/sbin/cluster/sa/domino/sbin/cl_lotus_domino_config/usr/es/sbin/cluster/sa/domino/sbin/cl_lotus_domino_query-nlotusdominosa.catcl_domino_server_mod.optionModify a Lotus Domino Server Highly Available Resource Grouplotusdominosa.cat/usr/es/sbin/cluster/sa/domino/sbin/cl_lotus_domino_config -m/usr/es/sbin/cluster/sa/domino/sbin/cl_lotus_domino_query -qapplication_idlotusdominosa.catcl_dns_sa_modify.optionModify a DNS Highly Available Resource Groupdnssa.cat/usr/es/sbin/cluster/sa/dns/sbin/cl_dns_import -a -M /usr/es/sbin/cluster/sa/dns/sbin/cl_dns_query -q application_iddnssa.catcl_dns_sa_add_cmd.optionAdd a DNS Highly Available Resource Groupdnssa.cat/usr/es/sbin/cluster/sa/dns/sbin/cl_dns_import -a /usr/es/sbin/cluster/sa/dns/sbin/cl_dns_query -D -n nodesdnssa.catcl_dhcp_sa_modify.optionModify a DHCP Highly Available Resource Groupdhcpsa.cat/usr/es/sbin/cluster/sa/dhcp/sbin/cl_dhcp_import -a -M /usr/es/sbin/cluster/sa/dhcp/sbin/cl_dhcp_query -q application_iddhcpsa.catcl_dhcp_sa_add_cmd.optionAdd a DHCP Highly Available Resource Groupdhcpsa.cat/usr/es/sbin/cluster/sa/dhcp/sbin/cl_dhcp_import -a /usr/es/sbin/cluster/sa/dhcp/sbin/cl_dhcp_query -D -n nodesdhcpsa.catcl_db2sa_add_single_instance.optionAdd a DB2 Highly Available Instance Resource Groupdb2sa.cat/usr/es/sbin/cluster/sa/db2/sbin/cl_db2preimport -C 'DB2_NON_DPF_SINGLE' -T /usr/es/sbin/cluster/sa/db2/sbin/cl_db2smquery -D single-n nodes -i instance optdb2sa.catcl_db2sa_modify_single_instance.optionModify a DB2 Highly Available Instance Resource Groupdb2sa.cat/usr/es/sbin/cluster/sa/db2/sbin/cl_db2preimport -C 'DB2_NON_DPF_SINGLE' -T -M /usr/es/sbin/cluster/sa/db2/sbin/cl_db2smquery -qapplication_iddb2sa.catcl_db2sa_add_mutual_instance.optionTwo-Node Mutual Takeover Configuration Assistantdb2sa.cat/usr/es/sbin/cluster/sa/db2/sbin/cl_db2mt_importcmd_to_discover() { name=$* name=$(echo $name | sed -e "s/ /:/g") name=$(echo $name | sed -e "s/,/:/g") /usr/es/sbin/cluster/sa/db2/sbin/cl_db2smadd -M -n $name } cmd_to_discovernodesdb2sa.catcl_db2sa_modify_mutual_instance.optionTwo-Node Mutual Takeover Configuration Assistantdb2sa.cat/usr/es/sbin/cluster/sa/db2/sbin/cl_db2mt_import -M/usr/es/sbin/cluster/sa/db2/sbin/cl_db2smquery -Qapplication_iddb2sa.catcl_filenetsa_modify_process_engine.optionModify a Process Engine Highly Available Resource Groupfilenetsa.cat/usr/es/sbin/cluster/sa/filenet/sbin/cl_filenet_pe_import -a -M /usr/es/sbin/cluster/sa/filenet/sbin/cl_filenet_pe_query -qapplication_idfilenetsa.catcl_db2sa_add_single_instance.optionAdd a DB2 Highly Available Instance Resource Groupdb2sa.cat/usr/es/sbin/cluster/sa/filenet/sbin/cl_filenet_db_ce_pe_preimport -C 'FILENET_DB_CONTENT_ENGINE' -T /usr/es/sbin/cluster/sa/db2/sbin/cl_db2smquery -D single-n nodes -i instancedb2sa.catcl_db2sa_modify_single_instance.optionModify a DB2 Highly Available Instance Resource Groupdb2sa.cat/usr/es/sbin/cluster/sa/filenet/sbin/cl_filenet_db_ce_pe_preimport -C 'FILENET_DB_CONTENT_ENGINE' -T -M /usr/es/sbin/cluster/sa/db2/sbin/cl_db2smquery -qapplication_iddb2sa.catcl_filenetsa_add_process_engine.optionAdd a Process Engine User Resource Groupfilenetsa.cat/usr/es/sbin/cluster/sa/filenet/sbin/cl_filenet_pe_import -a /usr/es/sbin/cluster/sa/filenet/sbin/cl_filenet_pe_query -D-n nodes -u user_namefilenetsa.catcl_db2sa_add_single_instance.optionAdd a DB2 Highly Available Instance Resource Groupdb2sa.cat/usr/es/sbin/cluster/sa/filenet/sbin/cl_filenet_db_ce_pe_preimport -C 'FILENET_DB_PROCESS_ENGINE' -T /usr/es/sbin/cluster/sa/db2/sbin/cl_db2smquery -D single-n nodes -i instancedb2sa.catcl_db2sa_modify_single_instance.optionModify a DB2 Highly Available Instance Resource Groupdb2sa.cat/usr/es/sbin/cluster/sa/filenet/sbin/cl_filenet_db_ce_pe_preimport -C 'FILENET_DB_PROCESS_ENGINE' -T -M /usr/es/sbin/cluster/sa/db2/sbin/cl_db2smquery -qapplication_iddb2sa.catcl_wassaaddnode_dialog.optAdd a Content Engine Resource Groupfilenetsa.cat/usr/es/sbin/cluster/sa/filenet/sbin/cl_filenet_was_AE_CE_import -a -C 'FILENET_CONTENT_ENGINE' -t 'APPSERVER'/usr/es/sbin/cluster/sa/was/sbin/cl_wasgetnode-c Cell -N Node -nfilenetsa.catcl_wassaaddnode_dialog.optAdd a Application Engine Resource Groupfilenetsa.cat/usr/es/sbin/cluster/sa/filenet/sbin/cl_filenet_was_AE_CE_import -a -C 'FILENET_APPLICATION_ENGINE' -t 'APPSERVER'/usr/es/sbin/cluster/sa/was/sbin/cl_wasgetnode-c Cell -N Node -nfilenetsa.catcl_wassamodnode_dialog.optModify a Content Engine Highly Available Resource Groupfilenetsa.cat/usr/es/sbin/cluster/sa/filenet/sbin/cl_filenet_was_AE_CE_import -u -C 'FILENET_CONTENT_ENGINE' -t 'APPSERVER'/usr/es/sbin/cluster/sa/was/sbin/cl_wasgetnode-A application_id -owassa.catcl_wassamodnode_dialog.optModify a Application Engine Highly Available Resource Groupfilenetsa.cat/usr/es/sbin/cluster/sa/filenet/sbin/cl_filenet_was_AE_CE_import -u -C 'FILENET_APPLICATION_ENGINE' -t 'APPSERVER'/usr/es/sbin/cluster/sa/was/sbin/cl_wasgetnode-A application_id -owassa.catmain() { /usr/es/sbin/cluster/utilities/clmgr manage cluster cloudroha ACTION=add $* } main main() { shift; /usr/es/sbin/cluster/utilities/clmgr manage cluster cloudroha ACTION=add $* } main main() { /usr/es/sbin/cluster/utilities/clmgr manage cluster cloudroha ACTION=modify $* } main main() { shift; /usr/es/sbin/cluster/utilities/clmgr manage cluster cloudroha ACTION=modify $* } main main() { first_node=$(clodmget -q "object=COMMUNICATION_PATH and node_id=1" -f name -n HACMPnode) /usr/es/sbin/cluster/utilities/cllspowervs -cH -n $first_node } main cm_cfg_rm_powervs_dummy_dmain() { site=$1 cl_type=$(/usr/es/sbin/cluster/utilities/clodmget -f multi_site_lc -n HACMPcluster) if [[ $cl_type == 1 ]]; then /usr/es/sbin/cluster/utilities/clmgr manage cluster cloudroha ACTION=delete CLOUDSITE=$site else /usr/es/sbin/cluster/utilities/clmgr manage cluster cloudroha ACTION=delete fi } maincm_cfg_add_bmc_dialog_cloud_optAdd Backup Profile for Cloudcm_cfg_add_bmc_dialog_remote_optAdd Backup Profile for Remote Storagecm_cfg_ch_bmc_cloud_optChange/Show Backup Profile for Cloud/usr/es/sbin/cluster/utilities/clmgr -c query backup_profile_rawnamecm_cfg_ch_bmc_remote_optChange/Show Backup Profile for Remote Storage/usr/es/sbin/cluster/utilities/clmgr modify backup_profile /usr/es/sbin/cluster/utilities/clmgr -c query backup_profile_rawnamecm_cfg_rm_bmc_optRemove Backup Profile/usr/es/sbin/cluster/utilities/clmgr -f remove backup_profile cm_cfg_add_stg_svc_optAdd Storage Configurationcluster.cat/usr/es/sbin/cluster/utilities/clmgr add storage_system cluster_hlp.catChange/Show Storage Configurationmain() { storage=$1 /usr/es/sbin/cluster/utilities/clmgr -c query storage_system $storage BACKUP=1 } main_rawnamecluster_hlp.catRemove Storage Configurationcluster_hlp.catcluster_hlp.catcluster_hlp.cat/usr/es/sbin/cluster/utilities/cl_cbm_storage_check_SPOC_FORCE=Y /usr/es/sbin/cluster/cspoc/fix_args nop cl_rc.cluster/usr/es/sbin/cluster/utilities/cldiscOPT -_ startcluster.cat_SPOC_FORCE=Y /usr/es/sbin/cluster/cspoc/fix_args nop cl_rc.clustercluster.cat_SPOC_FORCE=Y /usr/es/sbin/cluster/cspoc/fix_args nop cl_rc.clustercluster.cat_SPOC_FORCE=Y /usr/es/sbin/cluster/cspoc/fix_args nop cl_clstopcluster.cat_cm_show_current_state_application_resource_group_menu_dwnShow Current Resource Group and Application Statecluster.catcl_resgrp_start.dialog_non_concurrent.opt/usr/es/sbin/cluster/utilities/clRGmove -s 'false' cl_resgrp_start.dialog_non_concurrent.opt.divergencecl_resgrp_start.dialog_non_concurrent.optcl_resgrp_start.dialog_non_concurrent.opt.divergencecl_resgrp_start.dialog_concurrent.opt/usr/es/sbin/cluster/utilities/clRGmove -s 'false' /usr/es/sbin/cluster/utilities/clRGmove -s 'false' cl_resgrp_move.dialog.optMove Secondary Instance(s) of Resource Group(s) to Another Node cmd_to_discover() { NODE_NAME=$1 NODE_NAME=`echo "$NODE_NAME" | awk '{ print $1 }' | sed 's/*//'` GROUP_NAME=$2 echo $GROUP_NAME | read GROUP_NAME P1 P2 P3 P4 P5 echo "#node_name:group_name" echo "$NODE_NAME:$GROUP_NAME" } cmd_to_discover node_name group_namecl_resgrp_move.dialog.site.optMove Resource Group(s) to Another Sitecmd_to_exec() { minus_g_arg=$1 group=$2 minus_n_arg=$3 site_or_node=$4 typeset -i found=0 rg_list=$( echo $group | tr ',' ' ') for rg in $rg_list do if /usr/es/sbin/cluster/utilities/clodmget -q"group = $rg" -f stype -n HACMPgroup | grep -q "S" then # for site aware rgs, pass the target site and -x /usr/es/sbin/cluster/utilities/clRGmove -x -g $group -n $site_or_node found=1 break else continue fi done if (( $found == 0 ));then /usr/es/sbin/cluster/utilities/clRGmove -s 'false' -g $group -n $site_or_node fi } cmd_to_exec cmd_to_discover() { SITE_NAME=$1 SITE_NAME=`echo "$SITE_NAME" | awk '{ print $1 }' | sed 's/*//'` GROUP_NAME=$2 echo $GROUP_NAME | read GROUP_NAME P1 P2 P3 P4 P5 echo "#node_name:group_name" echo "$SITE_NAME:$GROUP_NAME" } cmd_to_discover site_name group_namecl_resgrp_move.dialog.site.optMove Secondary Instance(s) of Resource Group(s) to Another Site/usr/es/sbin/cluster/utilities/clRGmove -s 'true' cmd_to_discover() { SITE_NAME=$1 SITE_NAME=`echo "$SITE_NAME" | awk '{ print $1 }' | sed 's/*//'` GROUP_NAME=$2 echo $GROUP_NAME | read GROUP_NAME P1 P2 P3 P4 P5 echo "#site_name:group_name" echo "$SITE_NAME:$GROUP_NAME" } cmd_to_discover site_name group_namecl_resgrp_move.dialog.site.opt.divergenceMove Resource Group(s) to Another Site/usr/es/sbin/cluster/utilities/clRGmove -s 'false' cmd_to_discover() { SITE_NAME=$1 SITE_NAME=`echo "$SITE_NAME" | awk '{ print $1 }' | sed 's/*//'` GROUP_NAME=$2 echo $GROUP_NAME | read GROUP_NAME P1 P2 P3 P4 P5 echo "#node_name:group_name" echo "$SITE_NAME:$GROUP_NAME" } cmd_to_discover site_name group_namecl_resgrp_move.dialog.site.opt.divergenceMove Secondary Instance(s) of Resource Group(s) to Another Site/usr/es/sbin/cluster/utilities/clRGmove -s 'true' cmd_to_discover() { SITE_NAME=$1 SITE_NAME=`echo "$SITE_NAME" | awk '{ print $1 }' | sed 's/*//'` GROUP_NAME=$2 echo $GROUP_NAME | read GROUP_NAME P1 P2 P3 P4 P5 echo "#site_name:group_name" echo "$SITE_NAME:$GROUP_NAME" } cmd_to_discover site_name group_nameSuspend Application Monitoring/usr/es/sbin/cluster/events/utils/cl_RMupdate suspend_appmoncluster_hlp.catcm_resume_appmoncluster.catcluster_hlp.cat_clm.cl_app_umtcluster.cat/usr/es/sbin/cluster/utilities/clavan/usr/es/sbin/cluster/utilities/clavan -ccl__swap_adapter.dialogcluster.cat/usr/es/sbin/cluster/utilities/clswapaddresscluster.cat_cm_config_comm_dev_node.dialogcluster.catmain() { dspmsg -s 37 cluster.cat 2000 "Network Interfaces " |read STRING1 dspmsg -s 37 cluster.cat 2100 "RS-232 Devices " |read STRING2 dspmsg -s 37 cluster.cat 2200 "Target-Mode SCSI Devices " |read STRING3 dspmsg -s 37 cluster.cat 2300 "Target-Mode SSA Devices " |read STRING4 dspmsg -s 37 cluster.cat 2400 "X.25 Communication Interfaces " |read STRING5 dspmsg -s 37 cluster.cat 2500 "SNA Communication Links " |read STRING6 dspmsg -s 37 cluster.cat 2600 "Physical Disk Devices " |read STRING7 if [ "$1" = "$STRING1" ]; then PATH=mktcpip fi if [ "$1" = "$STRING2" ]; then PATH=tty fi if [ "$1" = "$STRING3" ]; then PATH=scsia fi if [ "$1" = "$STRING4" ]; then PATH=ssaa fi if [ "$1" = "$STRING5" ]; then PATH=commodev fi if [ "$1" = "$STRING6" ]; then PATH=sna fi if [ "$1" = "$STRING7" ]; then PATH=vg fi echo "#SMITPATH $PATH" exit 0 } main_rawnameList All Logical Volumes by Volume Groupmain() { export _CSPOC_MODE=shared /usr/es/sbin/cluster/sbin/cl_lsvg -l } mainList All Logical Volumes by Volume GroupList All Volume Groups on the ClusterSynchronize a Volume Group Definitioncl__cmdlvmimportvgdImport a Volume Groupmain() { export _CSPOC_MODE=evaluate export _CSPOC_CALLED_FROM_SMIT=true /usr/es/sbin/cluster/sbin/cl_mirrorvg -cspoc $* } maincl__cmdlvmunmirrorvgdmain() { export _CSPOC_MODE=evaluate export _CSPOC_CALLED_FROM_SMIT=true /usr/es/sbin/cluster/sbin/cl_unmirrorvg -cspoc $* } maincl__cmdlvmsyncvg_vgdSynchronize LVM Mirrors by Volume Groupmain() { print -- $* | read vg_name node_list rest _CSPOC_CALLED_FROM_SMIT=true /usr/es/sbin/cluster/sbin/cl_syncvg -cspoc "-f $node_list" $rest -v $vg_name } maincl__cmdlvmsyncvg_lvdSynchronize LVM Mirrors by Logical Volumemain() { print -- $* | read lv_name node_list rest _CSPOC_CALLED_FROM_SMIT=true /usr/es/sbin/cluster/sbin/cl_syncvg -cspoc "-f $node_list" $rest -l $lv_name } mainmain() { export _CSPOC_CALLED_FROM_SMIT=true export _CSPOC_MODE=both hdcrypt_args='' t_flag='' k_flag='' m_flag='' n_flag='' rc=0 ARGS='' vg_name='' lv_name='' os_version=$(oslevel -r|sed 's/-//g') min_req_ver=730000 local_node=$(/usr/es/sbin/cluster/utilities/get_local_nodename) cmd_args='a:b:c:d:e:iL:r:R:s:t:u:v:w:x:y:Y:S:U:G:P:m:o:T:p:k:h:j:z:f?g:n:' while getopts $cmd_args OPTION do case $OPTION in y) lv_name=$OPTARG ;; k) k_flag=$OPTARG; hdcrypt_args="$hdcrypt_args -k $k_flag" ;; h) t_flag=$OPTARG; hdcrypt_args="$hdcrypt_args -h $t_flag" ;; j) m_flag=$OPTARG; hdcrypt_args="$hdcrypt_args -j $m_flag" ;; z) n_flag=$OPTARG; hdcrypt_args="$hdcrypt_args -z $n_flag" ;; esac done #Remove leading and trailing spaces from hdcrypt_args hdcrypt_args=$(echo $hdcrypt_args | xargs) # Remove hdcrypt args from cmd args as mklv does not reqired to pass hdcrypt args if [[ -n $hdcrypt_args ]] then ARGS=$(echo $@ | sed s/"$hdcrypt_args"//) else ARGS=$(echo $@) fi shift $(( OPTIND - 1 )) vg_name=$1 clutils_log_dir=$(/usr/bin/odmget -q name=clutils.log HACMPlogs | grep -w 'value =' | awk -F'=' '{print $2}'| xargs) [[ -z $clutils_log_dir ]] && clutils_log_dir=$(/usr/bin/odmget -q name=clutils.log HACMPlogs | grep -w 'defaultdir =' | awk -F'=' '{print $2}' | xargs) clutils_log_dir=${clutils_log_dir:-/var/hacmp/log} clutils_log=${clutils_log_dir}/clutils.log # If lvm encryption is requested then check for supported aix version if [[ -n $hdcrypt_args ]];then hdcrypt_version=$(LC_ALL=C lslpp -L | grep -w hdcrypt | awk '{print $2}') if [[ -z $hdcrypt_version || $os_version < $min_req_ver ]] then dspmsg -s 2 command.cat 1480 ' ERROR: Installed AIX level %1$s is not supported to use LVM Encryption, minimum level required to use AIX LVM Encryption is AIX %2$s. ' $os_version $min_req_ver rc=1 fi if [[ $t_flag == 'pks' ]];then pks_status=$(hdcryptmgr pksshow >>$clutils_log 2>&1) if (( $? != 0 ));then dspmsg -s 2 command.cat 1481 ' ERROR: %1$s authentication is not supported on node %2$s, enable %1$s authentication and rerun the command. Check log file %3$s for more details. ' 'pks' $local_node $clutils_log rc=1 fi fi fi # Check the required arguments are provided or not to enable lvm encryption if [[ $rc == 0 ]] && [[ -n $t_flag || -n $m_flag || -n $n_flag ]] && [[ -z $k_flag ]] then dspmsg -s 2 command.cat 1479 ' ERROR: To use the authentication attributes, %1$s should be set with yes. ' 'Enable LVM Encryption' rc=1 fi if [[ $rc == 0 ]] && [[ -n $k_flag ]] then if [[ -z $t_flag ]];then dspmsg -s 2 command.cat 1478 ' ERROR: Enabling logical volume encryption requires %1$s attribute. ' 'Auth Method' rc=1 elif [[ $t_flag == 'keyserv' ]] && [[ -z $m_flag || -z $n_flag ]];then dspmsg -s 2 command.cat 1476 ' ERROR: Enabling logical volume encryption using %1$s authentication method requires %2$s and %3$s attributes. ' 'keyserv' 'Method Details' 'Auth Method Name' rc=1 elif [[ $t_flag == 'pks' ]] && [[ -z $n_flag ]];then dspmsg -s 2 command.cat 1475 ' ERROR: Enabling logical volume encryption using %1$s authentication method requires %2$s attribute. ' 'pks' 'Auth Method Name' rc=1 fi fi if [[ -z $lv_name && $rc == 0 ]] then lvs_before=$(/usr/es/sbin/cluster/utilities/clmgr -cSa LOGICAL_VOLUMES q vg $vg_name) fi # If no errors observed then invoke mklv and lvm encryption if [[ $rc == 0 ]];then /usr/es/sbin/cluster/sbin/cl_mklv -cspoc $ARGS rc=$? if [[ -z $lv_name ]] then lvs_after=$(/usr/es/sbin/cluster/utilities/clmgr -cSa LOGICAL_VOLUMES q vg $vg_name) if [[ -n $lvs_before ]];then lv_name=$(echo $lvs_after | sed s/$lvs_before//) lv_name=$(echo $lv_name | sed s/,//) else lv_name=$lvs_after fi fi if [[ -n $hdcrypt_args && $rc == 0 ]];then if [[ $t_flag == 'keyserv' ]];then /usr/es/sbin/cluster/cspoc/cl_enable_encryption -a authadd -l $lv_name -v $vg_name -t $t_flag -m $m_flag -n $n_flag -k $k_flag rc1=$? elif [[ $t_flag == 'pks' ]];then /usr/es/sbin/cluster/cspoc/cl_enable_encryption -a authadd -l $lv_name -v $vg_name -t $t_flag -n $n_flag -k $k_flag rc1=$? fi if (( rc1 != 0 ));then dspmsg -s 2 command.cat 1477 ' WARNING: Failed to add authentication for "%1$s". You can run "%2$s %1$s [..]" or "use Change a Logical Volume from %3$s menu" to provide the authentication. If the problem persists, please contact IBM support. ' $lv_name 'clmgr modify lv' 'smitty cl_lv' fi elif [[ -z $hdcrypt_args && $rc == 0 ]];then is_vg_encrypt=$(LC_ALL=C /usr/es/sbin/cluster/utilities/clmgr -cSa ENCRYPTION q vg $vg_name) if [[ $is_vg_encrypt == "yes" ]];then dspmsg -s 32 cspoc.cat 6 ' WARNING: Encryption for volume group "%1$s" is enabled, but the logical volume "%2$s" is not encrypted. To enable the encryption for logical volume, You can run "%3$s %2$s [...] or use Change a Logical Volume from %4$s menu". ' $vg_name $lv_name 'clmgr modify lv' 'smitty cl_lv' fi elif [[ $rc != 0 ]];then return $rc fi else return $rc fi } mainRemove a Copy from a Logical VolumeList All Concurrent Volume Groups on the Clustercl__cmdlvmimportconvgdmain() { export _CSPOC_MODE=concurrent /usr/es/sbin/cluster/cspoc/smitlvm -14 $* } maincl__cmdlvmmirrorconvgdMirror a Concurrent Volume Groupcl__cmdlvmunmirrorconvgdcl__cmdlvmsyncconvg_vgdSynchronize Concurrent LVM Mirrors by Volume Groupmain() { export _CSPOC_MODE=concurrent /usr/es/sbin/cluster/cspoc/smitlvm -21 -v $* } maincl__cmdlvmsyncconvg_lvdSynchronize Concurrent LVM Mirrors by Logical Volumecspoc.catmain() { export _CSPOC_MODE=concurrent /usr/es/sbin/cluster/cspoc/smitlvm -21 -l $* } mainmain() { export _CSPOC_MODE=concurrent /usr/es/sbin/cluster/sbin/cl_lsvg -l } mainmain() { export _CSPOC_MODE=concurrent /usr/es/sbin/cluster/cspoc/smitlvm -17 "$@" } maincl__cmdlvmmkconlvcopydmain() { export _CSPOC_MODE=concurrent /usr/es/sbin/cluster/cspoc/smitlvm -19 $* } mainRemove a Copy from a Concurrent Logical Volumemain() { export _CSPOC_MODE=concurrent /usr/es/sbin/cluster/cspoc/smitlvm -20 $* } mainIncrease the Size of a Concurrent Logical Volumemain() { export _CSPOC_MODE=concurrent /usr/es/sbin/cluster/cspoc/smitlvm -18 $* } maincl__cmdlvmlsconlvcopydShow Characteristics of a Concurrent Logical Volumecspoc.catRemove a Concurrent Logical Volumecspoc.catmain() { export _CSPOC_MODE=concurrent /usr/es/sbin/cluster/cspoc/smitlvm -8 $* } mainShow Characteristics of a Concurrent Logical Volumemain() { export _CSPOC_MODE=concurrent /usr/es/sbin/cluster/cspoc/smitlvm -6 $* } main_rawnamecl_resgrp_stop.dialog.optBring a Resource Group Offlinecspoc.cat cmd_to_discover() { NODE_NAME=$2 NODE_NAME=`echo "$NODE_NAME" | awk '{ print $1 }'` echo $1 | read GROUP_NAME P1 P2 P3 P4 P5 echo "#node_name:group_name" echo $NODE_NAME:$GROUP_NAME } cmd_to_discovergroup_name node_namecl_resgrp_stop.dialog.opt cmd_to_discover() { NODE_NAME=$2 NODE_NAME=`echo "$NODE_NAME" | awk '{ print $1 }'` echo $1 | read GROUP_NAME P1 P2 P3 P4 P5 echo "#node_name:group_name" echo $NODE_NAME:$GROUP_NAME } cmd_to_discovergroup_name node_namecl__createvgS.dialogCreate a Scalable Volume Groupcl__createvg.dialog_CSPOC_CALLED_FROM_SMIT=true /usr/es/sbin/cluster/sbin/cl_mkvg -f -n -Bcl__createvg.dialog_CSPOC_CALLED_FROM_SMIT=true /usr/es/sbin/cluster/sbin/cl_mkvg -f -nList All Logical Volumes by Volume Groupmain() { export _CSPOC_CALLED_FROM_SMIT=true export _CSPOC_MODE=both print -- $* | read flag vg_list vgs= while [[ -n $vg_list ]] ; do print -- $vg_list | read vg vg_list vgs="$vgs $vg" done /usr/es/sbin/cluster/sbin/cl_lsvg $flag $vgs } main_CSPOC_CALLED_FROM_SMIT=true _CSPOC_MODE=both /usr/es/sbin/cluster/sbin/cl_rmlvcluster.catcluster.cat_CSPOC_CALLED_FROM_SMIT=true /usr/es/sbin/cluster/sbin/cl_mkvg -f -n -C -Scl__con_createvg.dialog_CSPOC_CALLED_FROM_SMIT=true /usr/es/sbin/cluster/sbin/cl_mkvg -f -n -C -Bcl__con_createvg.dialog_CSPOC_CALLED_FROM_SMIT=true /usr/es/sbin/cluster/sbin/cl_mkvg -f -n -C -Icl__createfs_comp.dialogAdd a Compressed Journaled File System_CSPOC_CALLED_FROM_SMIT=true /usr/es/sbin/cluster/sbin/cl_crfscluster_hlp.cat_CSPOC_CALLED_FROM_SMIT=true /usr/es/sbin/cluster/sbin/cl_crfscluster_hlp.catcl__lvcreatefs.dialogcluster_hlp.catcl__lvcreatefs_comp.dialogexport _CSPOC_CALLED_FROM_SMIT=true; /usr/es/sbin/cluster/sbin/cl_crlvfscluster_hlp.catcl__lvcreatefs_lf.dialogcluster_hlp.catcl_disk_man.rem.dialogRemove a Disk From the ClusterConvert a Concurrent Volume Group to Enhanced Concurrent Mode_CSPOC_CALLED_FROM_SMIT=true _CSPOC_MODE=both /usr/es/sbin/cluster/sbin/cl_showfs2Change/Show Characteristics of a File System in the Clustermain() { _CSPOC_VFS=jfs /usr/es/sbin/cluster/cspoc/smitlvm -10 $* } mainmain() { /usr/es/sbin/cluster/cspoc/clchshjfs2 $* } mainFS_name VG_name RG_name Nodelist/usr/es/sbin/cluster/sbin/cl_showfs2 -v jfs2cl__lvcreatejfs2.dialogAdd an Enhanced Journaled File Systemexport _CSPOC_CALLED_FROM_SMIT=true; /usr/es/sbin/cluster/sbin/cl_crlvfscluster_hlp.catcl__createjfs2.dialogAdd an Enhanced Journaled File System on a Previously Defined Logical Volume_CSPOC_CALLED_FROM_SMIT=true /usr/es/sbin/cluster/sbin/cl_crfscluster_hlp.catChange/Show Characteristics of a Enhanced Journaled File Systemmain() { _CSPOC_VFS=jfs2 /usr/es/sbin/cluster/cspoc/smitlvm -10 $* } mainmain() { /usr/es/sbin/cluster/cspoc/clchshjfs2 $* } mainFS_name VG_name RG_name NodelistDisplay Data Path Device Configuration/usr/es/sbin/cluster/sbin/cl_lsvpcfgcl_dpls_cfg.dialogDisplay Data Path Device Status/usr/es/sbin/cluster/sbin/cl_lsvpdevstatuscl_dpls_cfg.dialogcl_dpls_cfg.dialogConvert ESS hdisk Device Volume Group to an SDD VPATH Device Volume Groupmain() { /usr/es/sbin/cluster/sbin/cl_hd2vp -cspoc "-g $1" $2 -f } mainConvert SDD VPATH Device Volume Group to an ESS hdisk Device Volume Groupmain() { /usr/es/sbin/cluster/sbin/cl_hd2vp -cspoc "-g $1" $2 -b } maincl__createvpathvg.dialogCreate a Volume Group with Data Path Devices_CSPOC_CALLED_FROM_SMIT=true /usr/es/sbin/cluster/sbin/cl_mkvg4vp -n -f -Icl__con_createvpathvgS.dialogCreate a Concurrent Volume Group with Data Path Devices_CSPOC_CALLED_FROM_SMIT=true /usr/es/sbin/cluster/sbin/cl_mkvg4vp -n -f -C -Scl__con_createvpathvg.dialogCreate a Concurrent Volume Group with Data Path Devices_CSPOC_CALLED_FROM_SMIT=true /usr/es/sbin/cluster/sbin/cl_mkvg4vp -n -f -C -Bcl__con_createvpathvg.dialogCreate a Concurrent Volume Group with Data Path Devices_CSPOC_CALLED_FROM_SMIT=true /usr/es/sbin/cluster/sbin/cl_mkvg4vp -n -f -Ccl__con_createvpathvg.dialog_CSPOC_CALLED_FROM_SMIT=true /usr/es/sbin/cluster/sbin/cl_mkvg4vp -n -f -C -Icluster.cat_dspevs.dialogcluster.cat/usr/es/sbin/cluster/utilities/clevsummary -iScan the PowerHA SystemMirror for AIX Scripts Log File/usr/es/sbin/cluster/utilities/clviewlogWatch the PowerHA SystemMirror for AIX Scripts Log FileScan the PowerHA SystemMirror for AIX System Log File/usr/es/sbin/cluster/utilities/cllog -a cluster.logWatch the PowerHA SystemMirror for AIX System Log File/usr/es/sbin/cluster/utilities/cllog -w cluster.log-d _rawnameChange all Cluster Logs DirectoryChange/Show PowerHA SystemMirror Log File Parametersmain() { /usr/es/sbin/cluster/utilities/clchparam $1 VERBOSE_LOGGING='high' $2 } main $*/usr/es/sbin/cluster/utilities/cllsparam -c-n _rawname/usr/es/sbin/cluster/utilities/cllsclstr -wc_cm_config_security.connectionConfigure Connection Authentication Modecluster.cat/usr/es/sbin/cluster/utilities/cllsclstr -wc_cm_config_security.message_dialogcluster.cat_cm_config_security.message_key_dialogcluster.cat/usr/es/sbin/cluster/utilities/clkeygen -s_cm_config_security.keydist_message_dialogEnable/Disable Automatic Key Distributioncluster.cat_cm_config_security.keyrefr_message_dialogActivate the key on all PowerHA SystemMirror cluster nodescluster.catlsuser -Dlist_users() { RGN=$1 USN="$2" if [[ -n $1 ]] then /usr/es/sbin/cluster/cspoc/fix_args dis cl_lsuser -cspoc "-g $RGN" -c $USN else /usr/es/sbin/cluster/cspoc/fix_args dis cl_lsuser -c $USN fi } list_users_raw_rgname _rawnamecl_lsuser.dialogList Groups on the Clustercluster_hlp.cat/usr/es/sbin/cluster/cspoc/fix_args nop cl_mkgroupChange / Show Group Attributes on the Cluster/usr/es/sbin/cluster/cspoc/fix_args dis cl_lsgroup -c_rawnamecluster_hlp.catRemove a Group from the Clustercluster_hlp.catChange a User's Password in the Clusterx() { /usr/es/sbin/cluster/cspoc/fix_args nop cl_chpasswd -cspoc -f -r $* if [ $? -ne 0 ] then exit 1 fi } xcluster_hlp.cat_cl_disk_man.replace.dialogcmd() { print $* | read vg_name source_hdisk source_pvid ref_node node_list rep_hdisk rep_pvid rg export _CSPOC_CALLED_FROM_SMIT=true /usr/es/sbin/cluster/cspoc/cl_diskreplace -cspoc "-f -n $node_list" -R $ref_node $vg_name $source_hdisk $rep_hdisk } cmd_cm_update_hacmp_interface_with_aix_settingsUpdate PowerHA SystemMirror Communication Interface with AIX Settingscluster_hlp.catcmd_to_discover() { NAME=`odmget -q name=$1 HACMPfilecollection | grep 'name = '| cut -d\" -f2` DESCRIPTION=`odmget -q name=$1 HACMPfilecollection | grep 'description = '| cut -d\" -f2` PROP_SYNC=`odmget -q name=$1 HACMPfilecollection | grep 'prop_sync = '| cut -d' ' -f3` if [[ $PROP_SYNC = 0 ]]; then PROP_SYNC=no else PROP_SYNC=yes fi PROP_AUTO=`odmget -q name=$1 HACMPfilecollection | grep 'prop_auto = '| cut -d' ' -f3` if [[ $PROP_AUTO = 0 ]]; then PROP_AUTO=no else PROP_AUTO=yes fi echo "#OLDNAME:DESCRIPTION:PROP_SYNC:PROP_AUTO" echo $NAME:$DESCRIPTION:$PROP_SYNC:$PROP_AUTO } cmd_to_discovercm_filecollection_rmcluster.cat/usr/es/sbin/cluster/utilities/clmgr delete file_collection cm_filecollection_timecluster.catcmd_to_discover() { PERIOD=`odmget -q 'name=file_collections_auto_prop' HACMPtimersvc | grep 'period =' | cut -d ' ' -f3` PERIOD=`expr $PERIOD / 60` echo "#PERIOD" echo $PERIOD } cmd_to_discovercm_filesinfilecollection_addcluster.catcmd_to_discover() { NAME=`odmget -q name=$1 HACMPfilecollection | grep 'name = '| cut -d\" -f2` DESCRIPTION=`odmget -q name=$1 HACMPfilecollection | grep 'description = '| cut -d\" -f2` PROP_SYNC=`odmget -q name=$1 HACMPfilecollection | grep 'prop_sync = '| cut -d' ' -f3` if [[ $PROP_SYNC = 0 ]]; then PROP_SYNC=no else PROP_SYNC=yes fi PROP_AUTO=`odmget -q name=$1 HACMPfilecollection | grep 'prop_auto = '| cut -d' ' -f3` if [[ $PROP_AUTO = 0 ]]; then PROP_AUTO=no else PROP_AUTO=yes fi echo "#OLDNAME:DESCRIPTION:PROP_SYNC:PROP_AUTO" echo $NAME:$DESCRIPTION:$PROP_SYNC:$PROP_AUTO } cmd_to_discover_rawnamecm_filesfromfilecollection_rmRemove Files from a File Collectioncluster.catcmd_to_exec() { print "$*" | read fc_name rest /usr/es/sbin/cluster/utilities/clmgr modify file_collection $fc_name DELETE="$rest" } cmd_to_execparamscmd_to_exec() { /usr/es/sbin/cluster/utilities/clfileprop -m $1 } cmd_to_execfilecollectionnameManage List of Users Allowed to Change Passwordcluster_hlp.cat/usr/es/sbin/cluster/utilities/cl_manageallowpasswd -Lcluster_hlp.catcl_modpasswdutilx() { ISLINKED=$1 GROUP=$2 if [[ "$ISLINKED" = "Linked" ]]; then FLAGS="-l" else FLAGS="-r" fi if [[ "$GROUP" != "" ]]; then FLAGS="$FLAGS -g $GROUP" fi /usr/es/sbin/cluster/utilities/cl_chpasswdutil $FLAGS } x/usr/es/sbin/cluster/utilities/cl_chpasswdutil-dx() { echo "#username:" /usr/bin/whoami } xcluster_hlp.catcluster_manager_log_param.dialogChange/Show Cluster Manager Log File Parameterscluster.cat/usr/es/sbin/cluster/utilities/cl_clstrmgr_debug_level -dcluster_hlp.catChange/Show characteristics of a Volume Groupcspoc.catvgstat() { /usr/es/sbin/cluster/sbin/cl_ls_vgstatus -cspoc "-n $1" $2 2>/dev/null } vgstatNodelist VG_nameChange/Show characteristics of a Concurrent Volume Groupcspoc.catvgstat() { /usr/es/sbin/cluster/sbin/cl_ls_vgstatus -cspoc "-n $1" $2 2>/dev/null } vgstatNodelist VG_namecspoc.catcluster_hlp.catcl__cmdlvmlsvg2List All Volume Groups on the Clustercspoc.cat_CSPOC_CALL_FROM_SMIT=true _CSPOC_MODE=both /usr/es/sbin/cluster/sbin/cl_rmfscl_mark_critical_vg.optionsMark Volume group as Critical main() { export ODMDIR=/etc/objrepos for VGNAME in $* do if ! odmget -q value=$VGNAME HACMPresource | sed -n '/name =/s/CONCURRENT_VOLUME_GROUP/CRITICAL_VG/p;/group =/p;/value =/p;/HACMPresource/p' | /usr/es/sbin/cluster/utilities/clodmadd then RGNAME=$(/usr/es/sbin/cluster/utilities/clodmget -q value=$VGNAME -f group -n HACMPresource) dspmsg -s 24 cspoc.cat 30 "cl_chvg: Marking volume group $VGNAME in resource group $RGNAME as CRITICAL failed " cl_chvg $VGNAME $RGNAME >& 2 return 1 fi done Class=HACMPcluster: handle='handle=0' printf '%s %s ' $Class $handle | /usr/es/sbin/cluster/utilities/clodmchange -o HACMPcluster dspmsg -s 43 cspoc.cat 36 "cl_chvg: The HACMP configuration has been changed - CRITICAL Volume Group $VGNAME has been added. The configuration must be synchronized to make this change effective across the cluster " cl_chvg 'CRITICAL Volume Group' $VGNAME dspmsg -s 24 cspoc.cat 32 "cl_chvg: The default action for Critical Volume Group $VGNAME on loss of quorum is to halt the node. The SMIT panel to 'Configure failure action for CRITICAL Volume Groups' can be used to change this action " cl_chvg $VGNAME } maincl_mark_noncritical_vg.optionscl_set_critical_vg_response_dialog_optConfigure failure action for CRITICAL Volume Groupsmain() { print -- $* | read failure_action notify_method VG_name if [[ -z $VG_name ]] then VG_name=$notify_method notify_method='' fi if /usr/es/sbin/cluster/utilities/clchappmon name=$VG_name MONITOR_TYPE=selective_fallover $failure_action $notify_method then dspmsg -s 24 cspoc.cat 33 "cl_chvg: The HACMP configuration has been changed - a custom failure action has been specified for CRITICAL Volume Group $VG_name. The configuration must be synchronized to make this change effective across the cluster " cl_chvg $VG_name else return 1 fi } maincmd_to_discover() { print -- $* | read VG_name rest # see if this vg already has a monitor entry MON=$(/usr/es/sbin/cluster/utilities/clodmget -q"name = RESOURCE_TO_MONITOR AND type = CRITICAL_VG AND value = $VG_name" -f monitor -n HACMPmonitor) if [[ -n $MON ]] then # Harvest the action and optional notofy method ACTION=$(/usr/es/sbin/cluster/utilities/clodmget -q"monitor = $MON AND name = FAILURE_ACTION AND type = CRITICAL_VG" -f value -n HACMPmonitor) NOTIFY=$(/usr/es/sbin/cluster/utilities/clodmget -q"monitor = $MON AND name = NOTIFY_METHOD AND type = CRITICAL_VG" -f value -n HACMPmonitor) else # Use defaults ACTION=halt NOTIFY= fi # all done echo "#ACTION:NOTIFY:VG" echo "$ACTION:$NOTIFY:$VG_name" } cmd_to_discover_rawnameRemove a Volume Group/usr/es/sbin/cluster/cspoc/cli_on_cluster -S /usr/es/sbin/cluster/utilities/halevel -scluster.catcmd_to_exec() { dspmsg -s 56 cluster_hlp.cat 60 "To learn about available fixes for this product, visit the IBM Support Portal at https://www.ibm.com/support/home/ Among the many resources available from the Portal is FixCentral - a source for viewing and downloading fixes for all IBM products: http://www.ibm.com/support/fixcentral/ FixCentral is also the source for retrieving fixes for CAA and RSCT. You can also subscribe to receive notifications whenever new fixes become available. - Subscribe or Unsubscribe - https://www.ibm.com/support/mynotifications - Feedback - https://www.ibm.com/x_dir/xfeedback.nsf/feedback?OpenForm To ensure proper delivery please add mynotify@stg.events.ihost.com to your address book. Important information about each service pack and the fixes contained therein can be found in the README file located under /usr/es/sbin/cluster When reporting a problem to IBM, you may be asked to provide information about the installed version of code or to collect log files for problem determination. There are smit options for these tasks under the Problem Determination Tools top level smit menu." } cmd_to_execcluster_hlp.catChange/Show Characteristics of a Mirror Pool/usr/es/sbin/cluster/sbin/cl_lsmpvgs -mMP_name VG_namecl__cmdlvmmklvdmpmain() { export _CSPOC_CALLED_FROM_SMIT=true export _CSPOC_MODE=both hdcrypt_args='' t_flag='' k_flag='' m_flag='' n_flag='' rc=0 ARGS='' vg_name='' lv_name='' local_node=$(/usr/es/sbin/cluster/utilities/get_local_nodename) os_version=$(oslevel -r|sed 's/-//g') min_req_ver=730000 cmd_args='a:b:c:d:e:iL:r:R:s:t:u:v:w:x:y:Y:S:U:G:P:m:o:T:p:k:h:j:z:f?g:n:' while getopts $cmd_args OPTION do case $OPTION in y) lv_name=$OPTARG ;; k) k_flag=$OPTARG; hdcrypt_args="$hdcrypt_args -k $k_flag" ;; h) t_flag=$OPTARG; hdcrypt_args="$hdcrypt_args -h $t_flag" ;; j) m_flag=$OPTARG; hdcrypt_args="$hdcrypt_args -j $m_flag" ;; z) n_flag=$OPTARG; hdcrypt_args="$hdcrypt_args -z $n_flag" ;; esac done #Remove leading and trailing spaces from hdcrypt_args hdcrypt_args=$(echo $hdcrypt_args | xargs) # Remove hdcrypt args from cmd args as mklv does not reqired to pass hdcrypt args if [[ -n $hdcrypt_args ]] then ARGS=$(echo $@ | sed s/"$hdcrypt_args"//) else ARGS=$(echo $@) fi shift $(( OPTIND - 1 )) vg_name=$1 clutils_log_dir=$(/usr/bin/odmget -q name=clutils.log HACMPlogs | grep -w 'value =' | awk -F'=' '{print $2}'| xargs) [[ -z $clutils_log_dir ]] && clutils_log_dir=$(/usr/bin/odmget -q name=clutils.log HACMPlogs | grep -w 'defaultdir =' | awk -F'=' '{print $2}' | xargs) clutils_log_dir=${clutils_log_dir:-/var/hacmp/log} clutils_log=${clutils_log_dir}/clutils.log # If lvm encryption is requested then check for supported aix version if [[ -n $hdcrypt_args ]];then hdcrypt_version=$(LC_ALL=C lslpp -L | grep -w hdcrypt | awk '{print $2}') if [[ -z $hdcrypt_version || $os_version < $min_req_ver ]] then dspmsg -s 2 command.cat 1480 ' ERROR: Installed AIX level %1$s is not supported to use LVM Encryption, minimum level required to use AIX LVM Encryption is AIX %2$s. ' $os_version $min_req_ver rc=1 fi if [[ $t_flag == 'pks' ]];then pks_status=$(hdcryptmgr pksshow >>$clutils_log 2>&1) if (( $? != 0 ));then dspmsg -s 2 command.cat 1481 ' ERROR: %1$s authentication is not supported on node %2$s, enable %1$s authentication and rerun the command. Check log file %3$s for more details. ' 'pks' $local_node $clutils_log rc=1 fi fi fi # Check the required arguments are provided or not to enable lvm encryption if [[ $rc == 0 ]] && [[ -n $t_flag || -n $m_flag || -n $n_flag ]] && [[ -z $k_flag ]] then dspmsg -s 2 command.cat 1479 ' ERROR: To use the authentication attributes, %1$s should be set with yes. ' 'Enable LVM Encryption' rc=1 fi if [[ $rc == 0 ]] && [[ -n $k_flag ]] then if [[ -z $t_flag ]];then dspmsg -s 2 command.cat 1478 ' ERROR: Enabling logical volume encryption requires %1$s attribute. ' 'Auth Method' rc=1 elif [[ $t_flag == 'keyserv' ]] && [[ -z $m_flag || -z $n_flag ]];then dspmsg -s 2 command.cat 1476 ' ERROR: Enabling logical volume encryption using %1$s authentication method requires %2$s and %3$s attributes. ' 'keyserv' 'Method Details' 'Auth Method Name' rc=1 elif [[ $t_flag == 'pks' ]] && [[ -z $n_flag ]];then dspmsg -s 2 command.cat 1475 ' ERROR: Enabling logical volume encryption using %1$s authentication method requires %2$s attribute. ' 'pks' 'Auth Method Name' rc=1 fi fi if [[ -z $lv_name && $rc == 0 ]] then lvs_before=$(/usr/es/sbin/cluster/utilities/clmgr -cSa LOGICAL_VOLUMES q vg $vg_name) fi # If no errors observed then invoke mklv and lvm encryption if [[ $rc == 0 ]];then /usr/es/sbin/cluster/sbin/cl_mklv -cspoc $ARGS rc=$? if [[ -z $lv_name ]] then lvs_after=$(/usr/es/sbin/cluster/utilities/clmgr -cSa LOGICAL_VOLUMES q vg $vg_name) if [[ -n $lvs_before ]];then lv_name=$(echo $lvs_after | sed s/$lvs_before//) lv_name=$(echo $lv_name | sed s/,//) else lv_name=$lvs_after fi fi if [[ -n $hdcrypt_args && $rc == 0 ]];then if [[ $t_flag == 'keyserv' ]];then /usr/es/sbin/cluster/cspoc/cl_enable_encryption -a authadd -l $lv_name -v $vg_name -t $t_flag -m $m_flag -n $n_flag -k $k_flag rc1=$? elif [[ $t_flag == 'pks' ]];then /usr/es/sbin/cluster/cspoc/cl_enable_encryption -a authadd -l $lv_name -v $vg_name -t $t_flag -n $n_flag -k $k_flag rc1=$? fi if (( rc1 != 0 ));then dspmsg -s 2 command.cat 1477 ' WARNING: Failed to add authentication for "%1$s". You can run "%2$s %1$s [..]" or "use Change a Logical Volume from %3$s menu" to provide the authentication. If the problem persists, please contact IBM support. ' $lv_name 'clmgr modify lv' 'smitty cl_lv' fi elif [[ -z $hdcrypt_args && $rc == 0 ]];then is_vg_encrypt=$(LC_ALL=C /usr/es/sbin/cluster/utilities/clmgr -cSa ENCRYPTION q vg $vg_name) if [[ $is_vg_encrypt == "yes" ]];then dspmsg -s 32 cspoc.cat 6 ' WARNING: Encryption for volume group "%1$s" is enabled, but the logical volume "%2$s" is not encrypted. To enable the encryption for logical volume, You can run "%3$s %2$s [...] or use Change a Logical Volume from %4$s menu". ' $vg_name $lv_name 'clmgr modify lv' 'smitty cl_lv' fi elif [[ $rc != 0 ]];then return $rc fi else return $rc fi } maincl__cmdlvmextendvgdmpcl_chshdiskdoptChange/Show Characteristics of a Physical VolumeChange/Show Characteristics of a Physical Volumemain() { print $* | read hdiskname rest _CSPOC_CALLED_FROM_SMIT=true /usr/es/sbin/cluster/sbin/cl_chpv $rest $hdiskname } mainmain() { print $* | read Refnode Nodelist HDisk VGName _CSPOC_CALLED_FROM_SMIT=true /usr/es/sbin/cluster/sbin/cl_lspvdisk -cspoc -n${Nodelist} -R ${Refnode} ${VGName} ${HDisk} } mainRefNode Nodelist Hdisk VGNamemain() { NodeList=$1 NewName=$2 if [[ $3 == '-Y' ]] then PVID="-Y $5" HDisk=$4 else PVID="" HDisk=$3 fi /usr/es/sbin/cluster/sbin/cl_rendisk -cspoc $NodeList $NewName $PVID $HDisk } mainList all Shared Physical Volumesmain() { export _CSPOC_CALLED_FROM_SMIT=true export _CSPOC_MODE=both hdcrypt_args='' t_flag='' k_flag='' m_flag='' n_flag='' rc=0 rc1=0 ARGS='' vg_name='' lv_name='' is_encrypt='' local_node=$(/usr/es/sbin/cluster/utilities/get_local_nodename) cmd_args='a:b:R:d:e:L:n:p:r:s:t:u:v:w:x:U:G:P:m:M:o:k:h:j:z:f?g:n:' os_version=$(oslevel -r|sed 's/-//g') min_req_ver=730000 while getopts $cmd_args OPTION do case $OPTION in k) k_flag=$OPTARG; hdcrypt_args="$hdcrypt_args -k $k_flag" ;; h) t_flag=$OPTARG; hdcrypt_args="$hdcrypt_args -h $t_flag" ;; j) m_flag=$OPTARG; hdcrypt_args="$hdcrypt_args -j $m_flag" ;; z) n_flag=$OPTARG; hdcrypt_args="$hdcrypt_args -z $n_flag" ;; R) R_flag=$OPTARG;; esac done if [[ -n $hdcrypt_args && -n $R_flag ]];then dspmsg -s 2 command.cat 1486 ' ERROR: There is a conflict between add and remove LVM authentication, provide either of these attributes. ' return 1 fi #Remove leading and trailing spaces from hdcrypt_args hdcrypt_args=$(echo $hdcrypt_args | xargs) R_flag=$(echo $R_flag | xargs) # Remove hdcrypt args from cmd args as hdcrypt args is not required for chlv command if [[ -n $hdcrypt_args ]] then ARGS=$(echo $@ | sed s/"$hdcrypt_args"//) elif [[ -n $R_flag ]];then ARGS=$(echo $@ | sed s/"-R $R_flag"//) else ARGS=$(echo $@) fi shift $(( OPTIND - 1 )) lv_name=$1 vg_name=$(/usr/es/sbin/cluster/utilities/clmgr -cSa VOLUME_GROUP q lv $lv_name) is_encrypt=$(LC_ALL=C /usr/es/sbin/cluster/utilities/clmgr -cSa ENCRYPTION q lv $lv_name) clutils_log_dir=$(/usr/bin/odmget -q name=clutils.log HACMPlogs | grep -w 'value =' | awk -F'=' '{print $2}'| xargs) [[ -z $clutils_log_dir ]] && clutils_log_dir=$(/usr/bin/odmget -q name=clutils.log HACMPlogs | grep -w 'defaultdir =' | awk -F'=' '{print $2}' | xargs) clutils_log_dir=${clutils_log_dir:-/var/hacmp/log} clutils_log=${clutils_log_dir}/clutils.log # If lvm encryption is requested then check for supported aix version if [[ -n $hdcrypt_args || -n $R_flag ]];then hdcrypt_version=$(LC_ALL=C lslpp -L | grep -w hdcrypt | awk '{print $2}') if [[ -z $hdcrypt_version || $os_version < $min_req_ver ]] then dspmsg -s 2 command.cat 1480 ' ERROR: Installed AIX level %1$s is not supported to use LVM Encryption, minimum level required to use AIX LVM Encryption is AIX %2$s. ' $os_version $min_req_ver rc=1 fi if [[ $t_flag == 'pks' ]];then pks_status=$(hdcryptmgr pksshow >>$clutils_log 2>&1) if (( $? != 0 ));then dspmsg -s 2 command.cat 1481 ' ERROR: %1$s authentication is not supported on node %2$s, enable %1$s authentication and rerun the command. Check log file %3$s for more details. ' 'pks' $local_node $clutils_log rc=1 fi fi fi # Check the required arguments are provided or not to enable lvm encryption if [[ $rc == 0 ]] then if [[ -n $hdcrypt_args && -z $k_flag && $is_encrypt == 'yes' ]] || [[ $k_flag == 'y' ]];then if [[ -z $t_flag ]];then dspmsg -s 2 command.cat 1478 'ERROR: Enabling logical volume encryption requires %1$s attribute. ' 'Auth Method' rc=1 elif [[ $t_flag == 'keyserv' ]] && [[ -z $m_flag || -z $n_flag ]];then dspmsg -s 2 command.cat 1476 'ERROR: Enabling logical volume encryption using %1$s authentication method requires %2$s and %3$s attributes. ' 'keyserv' 'Auth Method Name' 'Method Details' rc=1 elif [[ $t_flag == 'pks' ]] && [[ -z $n_flag ]];then dspmsg -s 2 command.cat 1475 'ERROR: Enabling logical volume encryption using %1$s authentication method requires %2$s attribute. ' 'pks' 'Auth Method Name' rc=1 fi elif [[ -n $hdcrypt_args ]] && [[ -z $k_flag && $is_encrypt == 'no' ]];then dspmsg -s 2 command.cat 1479 'ERROR: To use the authentication attributes, %1$s should be set with yes. ' 'Enable LVM Encryption' rc=1 elif [[ -n $t_flag || -n $m_flag || -n $n_flag ]] && [[ $k_flag == 'n' ]];then dspmsg -s 2 command.cat 1479 'ERROR: To use the authentication attributes, %1$s should be set with yes. ' 'Enable LVM Encryption' rc=1 fi fi # If no errors observed then invoke chlv and lvm encryption if [[ $rc == 0 ]];then /usr/es/sbin/cluster/sbin/cl_chlv $ARGS rc=$? if [[ -n $hdcrypt_args && $rc == 0 ]];then if [[ $is_encrypt == 'yes' && -z $k_flag ]];then k_flag='y' elif [[ $is_encrypt == 'no' && -z $k_flag ]];then k_flag='n' fi if [[ $t_flag == 'keyserv' ]];then /usr/es/sbin/cluster/cspoc/cl_enable_encryption -a authadd -l $lv_name -v $vg_name -t $t_flag -m $m_flag -n $n_flag -k $k_flag rc1=$? elif [[ $t_flag == 'pks' ]];then /usr/es/sbin/cluster/cspoc/cl_enable_encryption -a authadd -l $lv_name -v $vg_name -t $t_flag -n $n_flag -k $k_flag rc1=$? fi if (( rc1 != 0 ));then dspmsg -s 2 command.cat 1477 ' WARNING: Failed to add authentication for "%1$s". You can run "%2$s %1$s [..]" or "use Change a Logical Volume from %3$s menu" to provide the authentication. If the problem persists, please contact IBM support. ' $lv_name 'clmgr modify lv' 'smitty cl_lv' fi if [[ $k_flag == 'n' ]];then /usr/es/sbin/cluster/cspoc/cl_enable_encryption -l $lv_name -v $vg_name -k $k_flag if (( $? != 0 ));then dspmsg -s 2 command.cat 1483 ' WARNING: Failed to disable LVM encryption for %1$s. ' $lv_name fi fi elif [[ -z $hdcrypt_args && -z $R_flag && $rc == 0 ]];then is_vg_encrypt=$(LC_ALL=C /usr/es/sbin/cluster/utilities/clmgr -cSa ENCRYPTION q vg $vg_name) if [[ $is_vg_encrypt == "yes" && $is_encryt != "yes" ]];then dspmsg -s 32 cspoc.cat 6 ' WARNING: Encryption for volume group "%1$s" is enabled, but the logical volume "%2$s" is not encrypted. To enable the encryption for logical volume, You can run "%3$s %2$s [...] or use Change a Logical Volume from %4$s menu". ' $vg_name $lv_name 'clmgr modify lv' 'smitty cl_lv' fi elif [[ -n $R_flag && $rc == 0 ]];then /usr/es/sbin/cluster/cspoc/cl_enable_encryption -l $lv_name -v $vg_name -r $R_flag if (( $? != 0 ));then dspmsg -s 2 command.cat 1487 ' WARNING: Failed to remove authentication method name(s). ' fi elif [[ $rc != 0 ]];then return $rc fi else return $rc fi } mainlvdisc () { Sched='p'; Perm='r'; BadBlk='n'; Verify='n'; MirrWC='n' case $1 in 1 ) Sched='s' ;; 4 ) Sched='ps' ;; 8 ) Sched='pr' ;; 5 ) Sched='st' ;; esac if (( $2 == 1 )) then Perm='w' fi if (( $3 == 1 )) then BadBlk='y' fi if (( $4 == 1 )) then Verify='y' fi case $5 in 1 ) MirrWC='y' ;; 4 ) MirrWC='p' ;; esac case $6 in 0 ) OverlapIO='n' ;; 1 ) OverlapIO='y' ;; esac echo '#::::::::::Sched:Permissions:BadBlk:Verify:MirrWC:OverlapIO' echo '::::::::::'$Sched':'$Perm':'$BadBlk':'$Verify':'$MirrWC':'$OverlapIO } lvdiscSched Permissions BadBlk Verify MirrWC OverlapIOChange a Logical Volume on the Clustermain() { export _CSPOC_CALLED_FROM_SMIT=true export _CSPOC_MODE=both hdcrypt_args='' t_flag='' k_flag='' m_flag='' n_flag='' rc=0 rc1=0 ARGS='' vg_name='' lv_name='' is_encrypt='' os_version=$(oslevel -r|sed 's/-//g') min_req_ver=730000 local_node=$(/usr/es/sbin/cluster/utilities/get_local_nodename) cmd_args='a:b:R:d:e:L:n:p:r:s:t:u:v:w:x:U:G:P:m:M:o:k:h:j:z:f?g:n:' while getopts $cmd_args OPTION do case $OPTION in k) k_flag=$OPTARG; hdcrypt_args="$hdcrypt_args -k $k_flag" ;; h) t_flag=$OPTARG; hdcrypt_args="$hdcrypt_args -h $t_flag" ;; j) m_flag=$OPTARG; hdcrypt_args="$hdcrypt_args -j $m_flag" ;; z) n_flag=$OPTARG; hdcrypt_args="$hdcrypt_args -z $n_flag" ;; R) R_flag=$OPTARG;; esac done if [[ -n $hdcrypt_args && -n $R_flag ]];then dspmsg -s 2 command.cat 1486 ' ERROR: There is a conflict between add and remove LVM authentication, provide either of these attributes. ' return 1 fi #Remove leading and trailing spaces from hdcrypt_args hdcrypt_args=$(echo $hdcrypt_args | xargs) R_flag=$(echo $R_flag | xargs) # Remove hdcrypt args from cmd args as hdcrypt args is not required for chlv command if [[ -n $hdcrypt_args ]] then ARGS=$(echo $@ | sed s/"$hdcrypt_args"//) elif [[ -n $R_flag ]];then ARGS=$(echo $@ | sed s/"-R $R_flag"//) else ARGS=$(echo $@) fi shift $(( OPTIND - 1 )) lv_name=$1 vg_name=$(/usr/es/sbin/cluster/utilities/clmgr -cSa VOLUME_GROUP q lv $lv_name) is_encrypt=$(LC_ALL=C /usr/es/sbin/cluster/utilities/clmgr -cSa ENCRYPTION q lv $lv_name) clutils_log_dir=$(/usr/bin/odmget -q name=clutils.log HACMPlogs | grep -w 'value =' | awk -F'=' '{print $2}'| xargs) [[ -z $clutils_log_dir ]] && clutils_log_dir=$(/usr/bin/odmget -q name=clutils.log HACMPlogs | grep -w 'defaultdir =' | awk -F'=' '{print $2}' | xargs) clutils_log_dir=${clutils_log_dir:-/var/hacmp/log} clutils_log=${clutils_log_dir}/clutils.log # If lvm encryption is requested then check for supported aix version if [[ -n $hdcrypt_args || -n $R_flag ]];then hdcrypt_version=$(LC_ALL=C lslpp -L | grep -w hdcrypt | awk '{print $2}') if [[ -z $hdcrypt_version || $os_version < $min_req_ver ]] then dspmsg -s 2 command.cat 1480 ' ERROR: Installed AIX level %1$s is not supported to use LVM Encryption, minimum level required to use AIX LVM Encryption is AIX %2$s. ' $os_version $min_req_ver rc=1 fi if [[ $t_flag == 'pks' ]];then pks_status=$(hdcryptmgr pksshow >>$clutils_log 2>&1) if (( $? != 0 ));then dspmsg -s 2 command.cat 1481 ' ERROR: %1$s authentication is not supported on node %2$s, enable %1$s authentication and rerun the command. Check log file %3$s for more details. ' 'pks' $local_node $clutils_log rc=1 fi fi fi # Check the required arguments are provided or not to enable lvm encryption if [[ $rc == 0 ]] then if [[ -n $hdcrypt_args && -z $k_flag && $is_encrypt == 'yes' ]] || [[ $k_flag == 'y' ]];then if [[ -z $t_flag ]];then dspmsg -s 2 command.cat 1478 'ERROR: Enabling logical volume encryption requires %1$s attribute. ' 'Auth Method' rc=1 elif [[ $t_flag == 'keyserv' ]] && [[ -z $m_flag || -z $n_flag ]];then dspmsg -s 2 command.cat 1476 'ERROR: Enabling logical volume encryption using %1$s authentication method requires %2$s and %3$s attributes. ' 'keyserv' 'Auth Method Name' 'Method Details' rc=1 elif [[ $t_flag == 'pks' ]] && [[ -z $n_flag ]];then dspmsg -s 2 command.cat 1475 'ERROR: Enabling logical volume encryption using %1$s authentication method requires %2$s attribute. ' 'pks' 'Auth Method Name' rc=1 fi elif [[ -n $hdcrypt_args ]] && [[ -z $k_flag && $is_encrypt == 'no' ]];then dspmsg -s 2 command.cat 1479 'ERROR: To use the authentication attributes, %1$s should be set with yes. ' 'Enable LVM Encryption' rc=1 elif [[ -n $t_flag || -n $m_flag || -n $n_flag ]] && [[ $k_flag == 'n' ]];then dspmsg -s 2 command.cat 1479 'ERROR: To use the authentication attributes, %1$s should be set with yes. ' 'Enable LVM Encryption' rc=1 fi fi # If no errors observed then invoke chlv and lvm encryption if [[ $rc == 0 ]];then /usr/es/sbin/cluster/sbin/cl_chlv $ARGS rc=$? if [[ -n $hdcrypt_args && $rc == 0 ]];then if [[ $is_encrypt == 'yes' && -z $k_flag ]];then k_flag='y' elif [[ $is_encrypt == 'no' && -z $k_flag ]];then k_flag='n' fi if [[ $t_flag == 'keyserv' ]];then /usr/es/sbin/cluster/cspoc/cl_enable_encryption -a authadd -l $lv_name -v $vg_name -t $t_flag -m $m_flag -n $n_flag -k $k_flag rc1=$? elif [[ $t_flag == 'pks' ]];then /usr/es/sbin/cluster/cspoc/cl_enable_encryption -a authadd -l $lv_name -v $vg_name -t $t_flag -n $n_flag -k $k_flag rc1=$? fi if (( rc1 != 0 ));then dspmsg -s 2 command.cat 1477 ' WARNING: Failed to add authentication for "%1$s". You can run "%2$s %1$s [..]" or "use Change a Logical Volume from %3$s menu" to provide the authentication. If the problem persists, please contact IBM support. ' $lv_name 'clmgr modify lv' 'smitty cl_lv' fi if [[ $k_flag == 'n' ]];then /usr/es/sbin/cluster/cspoc/cl_enable_encryption -l $lv_name -v $vg_name -k $k_flag if (( $? != 0 ));then dspmsg -s 2 command.cat 1483 ' WARNING: Failed to disable LVM encryption for %1$s. ' $lv_name fi fi elif [[ -z $hdcrypt_args && -z $R_flag && $rc == 0 ]];then is_vg_encrypt=$(LC_ALL=C /usr/es/sbin/cluster/utilities/clmgr -cSa ENCRYPTION q vg $vg_name) if [[ $is_vg_encrypt == "yes" && $is_encryt != "yes" ]];then dspmsg -s 32 cspoc.cat 6 ' WARNING: Encryption for volume group "%1$s" is enabled, but the logical volume "%2$s" is not encrypted. To enable the encryption for logical volume, You can run "%3$s %2$s [...] or use Change a Logical Volume from %4$s menu". ' $vg_name $lv_name 'clmgr modify lv' 'smitty cl_lv' fi elif [[ -n $R_flag && $rc == 0 ]];then /usr/es/sbin/cluster/cspoc/cl_enable_encryption -l $lv_name -v $vg_name -r $R_flag if (( $? != 0 ));then dspmsg -s 2 command.cat 1487 ' WARNING: Failed to remove authentication method name(s). ' fi elif [[ $rc != 0 ]];then return $rc fi else return $rc fi } mainlvdisc () { Sched='p'; Perm='r'; BadBlk='n'; Verify='n'; MirrWC='n' case $1 in 1 ) Sched='s' ;; 4 ) Sched='ps' ;; 8 ) Sched='pr' ;; 5 ) Sched='st' ;; esac if (( $2 == 1 )) then Perm='w' fi if (( $3 == 1 )) then BadBlk='y' fi if (( $4 == 1 )) then Verify='y' fi case $5 in 1 ) MirrWC='y' ;; 4 ) MirrWC='p' ;; esac case $6 in 0 ) OverlapIO='n' ;; 1 ) OverlapIO='y' ;; esac echo '#::::::::::Sched:Permissions:BadBlk:Verify:MirrWC:OverlapIO' echo '::::::::::'$Sched':'$Perm':'$BadBlk':'$Verify':'$MirrWC':'$OverlapIO } lvdiscSched Permissions BadBlk Verify MirrWC OverlapIOShow Mirror Pools for a Volume Groupcl__cmdlvmmklvcopydmpAdd a Copy to a Logical Volumecl__cmdlvmmirrorvgdmpcl__cmdchshvgdmpChange/Show characteristics of a Volume Groupvgstat() { /usr/es/sbin/cluster/sbin/cl_ls_vgstatus -cspoc "-n $1" $2 2>/dev/null } vgstatNodelist VG_namemain() { print -- $* | read mirror_pool cspoc nodelist storage_location vg_name disks new_mp=$(dspmsg -s 127 cspoc.cat 89 "") if [[ $mirror_pool == "-p${new_mp}" ]] then dspmsg -s 127 cspoc.cat 27 "To create a new mirror pool in $vg_name, specify the actual mirror pool name in place of ''" $vg_name return -1 else # Remove any parens disks=$(echo "$disks" | sed 's/[\(\)]//g') # Remove any duplicates disks=$(echo "$disks" | tr " " "\n" | sort -u | tr "\n" " ") # Modify/Create the mirror pool /usr/es/sbin/cluster/sbin/cl_mp_disks $cspoc $nodelist $mirror_pool $storage_location $vg_name $disks fi } mainmain() { print -- $* | read cspoc nodelist vg_name disks /usr/es/sbin/cluster/sbin/cl_mp_disks $cspoc $nodelist -P $vg_name $disks } maincl_rmpooldoptRemove a Mirror Poolmain() { print -- $* | read cspoc nodelist mp_name vg_name /usr/es/sbin/cluster/sbin/cl_rmmp $cspoc $nodelist $vg_name $mp_name } maincl_getdiskdoptShow UUID for a Shared Physical Volumemain() { print -- $* | read Disk_name Node_name /usr/es/sbin/cluster/cspoc/cli_on_node -N $Node_name /usr/es/sbin/cluster/cspoc/cl_getdisk $Disk_name | cut -f2- -d: } mainmain() { print -- $* | read mp_name vg_name nodelist new_mp_name /usr/es/sbin/cluster/sbin/cl_ren_mp -cspoc "-n $nodelist" $vg_name $mp_name $new_mp_name } maincl_ldap_server_exist_optAdd an existing LDAP server/usr/es/sbin/cluster/cspoc/cl_ldap_server_existingcl_ldap_server_new_optConfigure a new peer-to-peer LDAP Server/usr/es/sbin/cluster/cspoc/cl_ldap_server_configcl_ldap_client_config_optConfigure LDAP ClientChange a LDAP User Attributeslsuser -R LDAP -c_rawnamecl_user_remove_ldapx() { lsuser -R LDAP -ca id groups home ALL if [[ $? -eq 2 ]] then dspmsg -s 129 cspoc.cat 117 "LDAP not configured for PowerHA SystemMirror. " return 1 fi } xAdd a Group to the LDAPmode=LDAP /usr/es/sbin/cluster/cspoc/fix_args nop cl_mkgroupcl_group_change_ldapChange / Show a LDAP Group Attributesmode=LDAP /usr/es/sbin/cluster/cspoc/fix_args nop cl_chgroup_rawnamecl_rmgroup.dialog_ldapmode=LDAP /usr/es/sbin/cluster/cspoc/fix_args nop cl_rmgroupx() { lsgroup -R LDAP -c ALL if [[ $? -eq 2 ]] then dspmsg -s 129 cspoc.cat 117 "LDAP not configured for PowerHA SystemMirror. " return 1 fi } xx() { mode=LDAP /usr/es/sbin/cluster/cspoc/fix_args nop cl_chpasswd -cspoc -f -r $* if [ $? -ne 0 ] then exit 1 fi } xx() { mode=`/usr/es/sbin/cluster/utilities/clodmget -n -q group=EFSKeyStore -f value HACMPLDAP` if [[ $mode -eq 1 ]]; then mode_tt=LDAP elif [[ $mode -eq 2 ]]; then mode_tt='Shared Filesystem' else dspmsg -s 129 cspoc.cat 156 'EFS Keystore is not configured for PowerHA SystemMirror. ' return 1 fi vg_tt=`LC_ALL=C LANG=C /usr/es/sbin/cluster/utilities/clshowres -g EFS_KeyStore 2>/dev/null|grep -w '^Volume Groups'|awk '{print $3}'` sip_tt=`LC_ALL=C LANG=C /usr/es/sbin/cluster/utilities/clshowres -g EFS_KeyStore 2>/dev/null|grep -w '^Service IP Label'|awk '{print $4}'` echo '#efs_mode:efs_pw:efs_vg:efs_sip' echo $mode_tt::$vg_tt:$sip_tt } xcluster_hlp.cat/usr/es/sbin/cluster/cspoc/cl_delete_efs/usr/es/sbin/cluster/utilities/clrgdependency -t'SITECOLLOCATION' -acluster_hlp.cat_cm_rg_oss_dependencies.ch.dialogChange/Show Online on the same site Dependency between Resource Groupscluster_hlp.cat_cm_rg_oss_dependencies.rm.dialogRemove Online on the same site Dependency between Resource Groups/usr/es/sbin/cluster/utilities/clrgdependency -t'SITECOLLOCATION' -dcluster_hlp.catAdd a Resource Group (extended)Change/Show a Resource Groupcmd_to_discover () { args=$*; grp_out=`/usr/es/sbin/cluster/utilities/clgetgrp -c $args` if [ $? -ne 0 ] then exit 1; fi grp_head=`/usr/es/sbin/cluster/utilities/clgetgrp -c $args | grep '#'` grp_data=`/usr/es/sbin/cluster/utilities/clgetgrp -c $args | grep -v '#'` time=`/usr/es/sbin/cluster/utilities/clchmsgtimer | grep -v '#'` time1=`echo $time|cut -f1 -d :` time2=`echo $time|cut -f2 -d :` time=`expr $time1 + $time2` if [ $time -eq 0 ] then time=180 fi echo $grp_head:time echo $grp_data:$time Seconds } cmd_to_discover-g _rawname_cm_add_a_service_ip_label_address.dialog.multiple.sitesAdd a Service IP Label/Address configurable on Multiple Nodes (extended)main() { # there is no good, single command to show site and # topology information, so we will do our best here to # show what we can if [[ -z $(/usr/es/sbin/cluster/utilities/clodmget -n -f name HACMPsite) ]] then dspmsg -s 63 cluster.cat 47 "There are no sites defined. " else for site in $(/usr/es/sbin/cluster/utilities/clmgr show site) do dspmsg -s 1 cluster.cat 957 "Site Name" echo " $site" dspmsg -s 1 cluster.cat 958 "Site Nodes" echo "" /usr/es/sbin/cluster/utilities/clmgr show site $site | grep ^NODES | cut -f2 -d\" site_sircol=$site"_sircol" if [[ -n $(/usr/es/sbin/cluster/utilities/clodmget -q"name = $site_sircol" -n -f ip_address HACMPsircol) ]] then dspmsg -s 63 cluster.cat 48 "Site Multicast IP " echo " $(/usr/es/sbin/cluster/utilities/clodmget -q"name = $site_sircol" -n -f ip_address HACMPsircol)" fi if [[ -n $(/usr/es/sbin/cluster/utilities/clodmget -q"name = $site_sircol" -n -f repository HACMPsircol) ]] then dspmsg -s 63 cluster.cat 49 "Site Repository Disk (pvid) " echo " $(/usr/es/sbin/cluster/utilities/clodmget -q"name = $site_sircol" -n -f repository HACMPsircol)" fi echo "" done fi dspmsg -s 1 cluster.cat 360 "Cluster Networks" /usr/es/sbin/cluster/utilities/cltopinfo -n } main_cm_add_a_site_to_the_hacmp_cluster_dialogcluster_hlp.cat_cm_change_show_a_site_in_the_hacmp_cluster.dialogcluster_hlp.cat_cm_delete_a_site_in_the_hacmp_cluster.optcluster_hlp.catChange/Show All Resources and Attributes for a Custom Resource GroupChange/Show All Resources and Attributes for a Custom Resource Group_clm.cm_cfg_res.customSiteEDP1Change/Show All Resources and Attributes for a Resource Groupcmd_to_discover () { /usr/es/sbin/cluster/utilities/clgetgrp -fstartup $* | read STPOLICY /usr/es/sbin/cluster/utilities/clgetgrp -ffallover $* | read FOPOLICY /usr/es/sbin/cluster/utilities/clgetgrp -ffallback $* | read FBPOLICY if ! /usr/bin/lslpp -L cluster.es.genxd.cmds > /dev/null 2>&1 then /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep "#" | read HEAD /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" | read DATA echo "$HEAD:STARTUP:FALLOVER:FALLBACK" echo "$DATA:$STPOLICY:$FOPOLICY:$FBPOLICY" else /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s ds8k_gm $* | read D8SKRES /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s xiv_rm $* | read XIVRES /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s ds8k_inband_mm $* | read DS8KMMRES /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep "#" | sed "s/:GENXD_REP_RESOURCE:/:/" | read HEAD MIRROR_GRP=$(/usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" |cut -f36 -d:) if [[ -n $MIRROR_GRP ]] then /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" | sed "s/:$MIRROR_GRP:/:/" | read DATA else /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" |awk 'BEGIN{FS=OFS=":"}{$36="++"}{print}'|sed 's/:++:/:/'| read DATA fi echo "$HEAD:STARTUP:FALLOVER:FALLBACK:GENXD_REP_RESOURCE:GENXD_REP_RESOURCE_XIV:DS8K_MM_RESOURCES" echo "$DATA:$STPOLICY:$FOPOLICY:$FBPOLICY:$D8SKRES:$XIVRES:$DS8KMMRES" fi } cmd_to_discover-g _rawname_clm.cm_cfg_res.customSiteEDP2Change/Show All Resources and Attributes for a Resource Groupcmd_to_discover () { /usr/es/sbin/cluster/utilities/clgetgrp -fstartup $* | read STPOLICY /usr/es/sbin/cluster/utilities/clgetgrp -ffallover $* | read FOPOLICY /usr/es/sbin/cluster/utilities/clgetgrp -ffallback $* | read FBPOLICY if ! /usr/bin/lslpp -L cluster.es.genxd.cmds > /dev/null 2>&1 then /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep "#" | read HEAD /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" | read DATA echo "$HEAD:STARTUP:FALLOVER:FALLBACK" echo "$DATA:$STPOLICY:$FOPOLICY:$FBPOLICY" else /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s ds8k_gm $* | read D8SKRES /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s xiv_rm $* | read XIVRES /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s ds8k_inband_mm $* | read DS8KMMRES /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep "#" | sed "s/:GENXD_REP_RESOURCE:/:/" | read HEAD MIRROR_GRP=$(/usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" |cut -f36 -d:) if [[ -n $MIRROR_GRP ]] then /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" | sed "s/:$MIRROR_GRP:/:/" | read DATA else /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" |awk 'BEGIN{FS=OFS=":"}{$36="++"}{print}'|sed 's/:++:/:/'| read DATA fi echo "$HEAD:STARTUP:FALLOVER:FALLBACK:GENXD_REP_RESOURCE:GENXD_REP_RESOURCE_XIV:DS8K_MM_RESOURCES" echo "$DATA:$STPOLICY:$FOPOLICY:$FBPOLICY:$D8SKRES:$XIVRES:$DS8KMMRES" fi } cmd_to_discover-g _rawname_clm.cm_cfg_res.customSiteEDP3Change/Show All Resources and Attributes for a Resource Group/usr/es/sbin/cluster/utilities/clmgr modify resource_group cmd_to_discover () { /usr/es/sbin/cluster/utilities/clgetgrp -fstartup $* | read STPOLICY /usr/es/sbin/cluster/utilities/clgetgrp -ffallover $* | read FOPOLICY /usr/es/sbin/cluster/utilities/clgetgrp -ffallback $* | read FBPOLICY if ! /usr/bin/lslpp -L cluster.es.genxd.cmds > /dev/null 2>&1 then /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep "#" | read HEAD /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" | read DATA echo "$HEAD:STARTUP:FALLOVER:FALLBACK" echo "$DATA:$STPOLICY:$FOPOLICY:$FBPOLICY" else /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s ds8k_gm $* | read D8SKRES /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s xiv_rm $* | read XIVRES /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s ds8k_inband_mm $* | read DS8KMMRES /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep "#" | sed "s/:GENXD_REP_RESOURCE:/:/" | read HEAD MIRROR_GRP=$(/usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" |cut -f36 -d:) if [[ -n $MIRROR_GRP ]] then /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" | sed "s/:$MIRROR_GRP:/:/" | read DATA else /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" |awk 'BEGIN{FS=OFS=":"}{$36="++"}{print}'|sed 's/:++:/:/'| read DATA fi echo "$HEAD:STARTUP:FALLOVER:FALLBACK:GENXD_REP_RESOURCE:GENXD_REP_RESOURCE_XIV:DS8K_MM_RESOURCES" echo "$DATA:$STPOLICY:$FOPOLICY:$FBPOLICY:$D8SKRES:$XIVRES:$DS8KMMRES" fi } cmd_to_discover-g _rawname_clm.cm_cfg_res.customSiteEDP4Change/Show All Resources and Attributes for a Resource Groupcmd_to_discover () { /usr/es/sbin/cluster/utilities/clgetgrp -fstartup $* | read STPOLICY /usr/es/sbin/cluster/utilities/clgetgrp -ffallover $* | read FOPOLICY /usr/es/sbin/cluster/utilities/clgetgrp -ffallback $* | read FBPOLICY if ! /usr/bin/lslpp -L cluster.es.genxd.cmds > /dev/null 2>&1 then /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep "#" | read HEAD /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" | read DATA echo "$HEAD:STARTUP:FALLOVER:FALLBACK" echo "$DATA:$STPOLICY:$FOPOLICY:$FBPOLICY" else /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s ds8k_gm $* | read D8SKRES /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s xiv_rm $* | read XIVRES /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s ds8k_inband_mm $* | read DS8KMMRES /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep "#" | sed "s/:GENXD_REP_RESOURCE:/:/" | read HEAD MIRROR_GRP=$(/usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" |cut -f36 -d:) if [[ -n $MIRROR_GRP ]] then /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" | sed "s/:$MIRROR_GRP:/:/" | read DATA else /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" |awk 'BEGIN{FS=OFS=":"}{$36="++"}{print}'|sed 's/:++:/:/'| read DATA fi echo "$HEAD:STARTUP:FALLOVER:FALLBACK:GENXD_REP_RESOURCE:GENXD_REP_RESOURCE_XIV:DS8K_MM_RESOURCES" echo "$DATA:$STPOLICY:$FOPOLICY:$FBPOLICY:$D8SKRES:$XIVRES:$DS8KMMRES" fi } cmd_to_discover-g _rawnameChange/Show All Resources and Attributes for a Resource Groupcmd_to_discover () { /usr/es/sbin/cluster/utilities/clgetgrp -fstartup $* | read STPOLICY /usr/es/sbin/cluster/utilities/clgetgrp -ffallover $* | read FOPOLICY /usr/es/sbin/cluster/utilities/clgetgrp -ffallback $* | read FBPOLICY if ! /usr/bin/lslpp -L cluster.es.genxd.cmds > /dev/null 2>&1 then /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep "#" | read HEAD /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" | read DATA echo "$HEAD:STARTUP:FALLOVER:FALLBACK" echo "$DATA:$STPOLICY:$FOPOLICY:$FBPOLICY" else /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s ds8k_gm $* | read D8SKRES /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s xiv_rm $* | read XIVRES /usr/es/sbin/cluster/xd_generic/xd_cli/clxd_list_mg_smit -s ds8k_inband_mm $* | read DS8KMMRES /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep "#" | sed "s/:GENXD_REP_RESOURCE:/:/" | read HEAD MIRROR_GRP=$(/usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" |cut -f36 -d:) if [[ -n $MIRROR_GRP ]] then /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" | sed "s/:$MIRROR_GRP:/:/" | read DATA else /usr/es/sbin/cluster/utilities/cllsres -c -s $* | grep -v "#" |awk 'BEGIN{FS=OFS=":"}{$36="++"}{print}'|sed 's/:++:/:/'| read DATA fi echo "$HEAD:STARTUP:FALLOVER:FALLBACK:GENXD_REP_RESOURCE:GENXD_REP_RESOURCE_XIV:DS8K_MM_RESOURCES" echo "$DATA:$STPOLICY:$FOPOLICY:$FBPOLICY:$D8SKRES:$XIVRES:$DS8KMMRES" fi } cmd_to_discover-g _rawnameSetup Cluster, Sites, Nodes and Networkscmd_to_exec() { cluster_name=$1 site1="$2" nodelist1="$3" prio1="1" site2="$4" nodelist2="$5" prio2="2" type="$6" node_list="$nodelist1 $nodelist2" /usr/es/sbin/cluster/utilities/clodmget -f name,multi_site_lc -n HACMPcluster | IFS=: read cname ctype if [[ -z $cname ]] then # There is no cluster configured - build up the args # for creating cluster and sites from scratch hostlist1="" hostlist2="" for nn in $nodelist1 do hostlist1="$hostlist1 ${nn%%.*}" done for nn in $nodelist2 do hostlist2="$hostlist2 ${nn%%.*}" done /usr/es/sbin/cluster/utilities/clmgr add cluster $cluster_name NODES="$node_list" TYPE=$type /usr/es/sbin/cluster/utilities/clmgr -D add site $site1 NODES="$hostlist1" RECOVERY_PRIORITY=$prio1 /usr/es/sbin/cluster/utilities/clmgr -D add site $site2 NODES="$hostlist2" RECOVERY_PRIORITY=$prio2 else # There is a cluster configured - to invoke the "modify" # commands we need to figure out what has changed typeset -i rc=0 name_arg="" [[ $cluster_name != $cname ]] && name_arg="NAME=$cluster_name" nodes_arg="" [[ $(echo $node_list | sort -u) != $(/usr/es/sbin/cluster/utilities/cllsclstr -cwng | tail -1 | cut -f5 -d: | sort -u) ]] && nodes_arg="NODES=$node_list" type_arg="" [[ $ctype == 0 ]] && ctype="SC" [[ $ctype == 1 ]] && ctype="LC" [[ $ctype != $type ]] && type_arg="TYPE=$type" if [[ -n "$name_arg$nodes_arg$type_arg" ]]; then /usr/es/sbin/cluster/utilities/clmgr modify cluster $name_arg $nodes_arg $type_arg (( rc+=$? )) fi /usr/es/sbin/cluster/utilities/cllssite -c | paste -s -d: - | cut -d: -f 7,8,13,14 | IFS=: read cur_site1 cur_site1_nodes cur_site2 cur_site2_nodes name_arg="" [[ $site1 != $cur_site1 ]] && name_arg="NAME=$site1" nodes_arg="" [[ $(echo $nodelist1 | sort -u) != $(echo $cur_site1_nodes | sort -u) ]] && nodes_arg="NODES=$(echo $nodelist1 | tr ' ' ',')" if [[ -n "$name_arg$nodes_arg" ]]; then /usr/es/sbin/cluster/utilities/clmgr modify site $cur_site1 $name_arg $nodes_arg (( rc+=$? )) fi name_arg="" [[ $site2 != $cur_site2 ]] && name_arg="NAME=$site2" nodes_arg="" [[ $(echo $nodelist2 | sort -u) != $(echo $cur_site2_nodes | sort -u) ]] && nodes_arg="NODES=$(echo $nodelist2 | tr ' ' ',')" if [[ -n "$name_arg$nodes_arg" ]]; then /usr/es/sbin/cluster/utilities/clmgr modify site $cur_site2 $name_arg $nodes_arg (( rc+=$? )) fi return $rc fi } cmd_to_execcmd_to_discover() { print "#cname:site1:site1nodes:site2:site2nodes:ctype" cname=$(/usr/es/sbin/cluster/utilities/clodmget -f name -n HACMPcluster) if [[ -z "$cname" ]] then # # There is no cluster configured - generate a default # cluster name and send the local hostname as one of # the nodes to add # localnode=$(hostname) clname=${localnode%%.*} print "${clname}_cluster:site1:$localnode:site2::SC:" exit 0 fi ctype=$(/usr/es/sbin/cluster/utilities/clodmget -f multi_site_lc -n HACMPcluster) if [[ $ctype == 0 ]] then ctype="SC" else ctype="LC" fi print "$cname:$(/usr/es/sbin/cluster/utilities/clodmget -f name,nodelist -d: -n HACMPsite | paste -s -d: -):$ctype" exit 0 } cmd_to_discoverMulti Site with Linked Clusters Configurationmain() { print $* | read site1 repos1 ipaddr1 site2 repos2 ipaddr2 # : Remove parentheses around PVIDs # repos1=${repos1#\(} repos1=${repos1%\)} repos2=${repos2#\(} repos2=${repos2%\)} # : Add the repositories for each site to the cluster definition # if [[ $repos1 == $repos2 ]] then dspmsg -s 64 cluster.cat 9 "Each site in a linked cluster must have a different repository. Chose a different repository disk for each site " return 1 fi /usr/es/sbin/cluster/utilities/clmgr add repository $repos1 SITE=$site1 DISABLE_VALIDATION=true rc=$? (( $rc != 0 )) && return $rc /usr/es/sbin/cluster/utilities/clmgr add repository $repos2 SITE=$site2 DISABLE_VALIDATION=true rc=$? (( $rc != 0 )) && return $rc # : Add the cluster heart beat IP addresses for each site to the cluster definition # Default=$(dspmsg -s 1 cluster.cat 860 "Default") if [[ $ipaddr1 == $Default ]] then dspmsg -s 63 cluster.cat 18 "Default Multicast IP address will be used for site $site1 and will be assigned during Synchronization. " $site1 else /usr/es/sbin/cluster/utilities/clmgr modify site $site1 SITE_IP=$ipaddr1 rc=$? (( $rc != 0 )) && return $rc fi if [[ $ipaddr2 == $Default ]] then dspmsg -s 63 cluster.cat 18 "Default Multicast IP address will be used for site $site2 and will be assigned during Synchronization. " $site2 else /usr/es/sbin/cluster/utilities/clmgr modify site $site2 SITE_IP=$ipaddr2 rc=$? (( $rc != 0 )) && return $rc fi # : If we got here, let the user know what to do next # dspmsg -s 63 cluster.cat 17 "Initial site configuration has been saved. You can now go on to complete the rest of the configuration, including adding backup repository disks (recommended), custom event notifications, resource groups and applications, etc. When you have entered all the basic information you can then use Verification and Synchronization to verify the configuration and distribute it to all cluster nodes. " return 0 } mainmain() { # : Extract any cluster name, and : name, node list, and heart beat IP address for each site # name=$(/usr/es/sbin/cluster/utilities/clodmget -f name -n HACMPcluster) print -- "#cname:site1:ip1:nodelist1:site2:ip2:nodelist2" outline="${cname}" odmget HACMPsite | egrep -w 'name =|nodelist =' | sed 's/.*"\(.*\)".*/\1/' | paste - - | while read name nodelist do ip_addr=$(/usr/es/sbin/cluster/utilities/clodmget -q "name = ${name}_sircol" -f ip_address -n HACMPsircol) if [[ -z $ip_addr ]] then ip_addr=$(dspmsg -s 1 cluster.cat 860 "Default") fi outline="${outline}:${name}:${ip_addr}:${nodelist}" done print -- "$outline" return 0 } mainDefine Repository and Cluster IP AddressDefine Repository and Cluster IP Addressmain() { dspmsg -s 63 cluster.cat 15 "No nodes are currently defined for the cluster. Define at least one node, and ideally all nodes, prior to defining the repository disk and cluster IP address for each site. It is important that all nodes in a site have access to the repository disk and can be reached via the cluster IP address, therefore you should define the nodes and sites in the cluster first. " } maincm_chng_tunables.dialog.opt.sitescm_add_repository_disk.dialog.opt.sitescm_rem_repository_disk.dialog.opt.sitescm_show_repos_disk.sitesShow Repository Diskscluster.catmain() { /usr/es/sbin/cluster/utilities/clmgr view report repository } maincluster_hlp.catcm_replace_repos.dialog.opt.sitesSelect a new repository diskcluster.catmain() { sitenm=$1 disk=$(echo $2 | sed 's/[()]//g') /usr/es/sbin/cluster/utilities/clmgr replace repository $disk SITE=$sitenm } maincluster_hlp.cat_clm.sites_repos_ipaddr_hbcMulti Site with Linked Clusters Configurationcluster.catmain() { # : Pick up the constant set of parameters # print $* | read cluster_name heart_beat_type site1 repos1 first_arg rest_args # : The user may or may not have entered site ip addresses, : so $first_arg must always be examined to see if it is the : second site name # /usr/es/sbin/cluster/utilities/clodmget -f name -n HACMPsite | paste - - | read asite1 asite2 if [[ $first_arg == $asite1 || $first_arg == $asite2 ]] then # : No IP address was entered for the first site # site2=$first_arg print $rest_args | read repos2 ipaddr2 else # : An IP address was entred for the first site # ipaddr1=$first_arg print $rest_args | read site2 repos2 ipaddr2 fi # : Remove parentheses around PVIDs # repos1=${repos1#\(} repos1=${repos1%\)} repos2=${repos2#\(} repos2=${repos2%\)} # : Try and set up the repositories for the sites # if [[ $repos1 == $repos2 ]] then dspmsg -s 64 cluster.cat 9 "Each site in a linked cluster must have a different repository. Chose a different repository disk for each site\n" return 1 fi repos=$(/usr/es/sbin/cluster/utilities/clodmget -q "name = ${site1}_sircol" -f repository -n HACMPsircol) if [[ -z $repos ]] # no current repos then /usr/es/sbin/cluster/utilities/clmgr add repository $repos1 SITE=$site1 DISABLE_VALIDATION=true elif [[ $repos != $repos1 ]] # repos changed then /usr/es/sbin/cluster/utilities/clmgr replace repository $repos1 SITE=$site1 fi rc=$? (( $rc != 0 )) && return $rc repos=$(/usr/es/sbin/cluster/utilities/clodmget -q "name = ${site2}_sircol" -f repository -n HACMPsircol) if [[ -z $repos ]] # no current repos then /usr/es/sbin/cluster/utilities/clmgr add repository $repos2 SITE=$site2 DISABLE_VALIDATION=true elif [[ $repos != $repos2 ]] # repos changed then /usr/es/sbin/cluster/utilities/clmgr replace repository $repos2 SITE=$site2 fi rc=$? (( $rc != 0 )) && return $rc # : Unicast vs Multicast # unicast=$(dspmsg -s 64 cluster.cat 4 Unicast) # : Until clmgr modify cluster learns to handle heart beat type # Default=$(dspmsg -s 1 cluster.cat 860 "Default") if [[ $ipaddr1 == $Default ]] then ipaddr1="" fi if [[ $ipaddr2 == $Default ]] then ipaddr2="" fi if [[ $heart_beat_type == $unicast ]] then heart_beat_type='U' else if [[ -z $ipaddr1 && -z $ipaddr2 ]] then heart_beat_type='M' else heart_beat_type='C' fi fi # : Direct update of HACMPcluster until clmgr learns to deal with unicast # Class="HACMPcluster:" hbt="heartbeattype=${heart_beat_type}" handle="handle=0" printf "%s %s %s " $Class $handle $hbt | /usr/es/sbin/cluster/utilities/clodmchange -o HACMPcluster if [[ $heart_beat_type == 'U' ]] then if [[ -n $ipaddr1 || -n $ipaddr2 ]] then # : If both unicast was selected, and site ip addresses given, : the user is confused. # dspmsg -s 64 cluster.cat 1 "A cluster IP address for heart beat is not used with unicast heart beating. The entered cluster IP address is ignored. " fi else # : Processing for multicast # if [[ -z $ipaddr1 ]] then dspmsg -s 63 cluster.cat 18 "Default Multicast IP address will be used for site $site1 and will be assigned during Synchronization." $site1 else /usr/es/sbin/cluster/utilities/clmgr modify site $site1 SITE_IP=$ipaddr1 fi rc=$? (( $rc != 0 )) && return $rc if [[ -z $ipaddr2 ]] then dspmsg -s 63 cluster.cat 18 "Default Multicast IP address will be used for site $site2 and will be assigned during Synchronization. " $site2 else /usr/es/sbin/cluster/utilities/clmgr modify site $site2 SITE_IP=$ipaddr2 fi rc=$? (( $rc != 0 )) && return $rc fi # : If we got here, let the user know what to do next # dspmsg -s 63 cluster.cat 17 "Initial site configuration has been saved. You can now go on to complete the rest of the configuration, including adding backup repository disks (recommended), custom event notifications, resource groups and applications, etc. When you have entered all the basic information you can then use Verification and Synchronization to verify the configuration and distribute it to all cluster nodes. " } mainmain() { # : Extract any cluster name, heart beat type, and : name, node list, and heart beat IP address for each site # odmget HACMPcluster | egrep -w 'name =|heartbeattype =' | sed 's/.*"\(.*\)".*/\1/' | paste - - | read cname hbc if [[ $hbc == U* ]] then hbc=$(dspmsg -s 64 cluster.cat 4 Unicast) else hbc=$(dspmsg -s 64 cluster.cat 5 Multicast) fi print -- "#cname:hbc:site1:ip1:nodelist1:repos1:site2:ip2:nodelist2:repos2" outline="${cname}:${hbc}" odmget HACMPsite | egrep -w 'name =|nodelist =' | sed 's/.*"\(.*\)".*/\1/' | paste - - | while read name nodelist do ip_addr=$(/usr/es/sbin/cluster/utilities/clodmget -q "name = ${name}_sircol" -f ip_address -n HACMPsircol) if [[ -z $hbc || $hbc != U* ]] && [[ -z $ip_addr ]] then ip_addr=$(dspmsg -s 1 cluster.cat 860 "Default") fi repos=$(/usr/es/sbin/cluster/utilities/clodmget -q "name = ${name}_sircol" -f repository -n HACMPsircol) [[ -n "$repos" ]] && repos="("$repos")" outline="${outline}:${name}:${ip_addr}:${nodelist}:${repos}" done print -- "$outline" return 0 } maincluster_hlp.cat_clm.sites_repos_ipaddr_exists_hbcMulti Site with Linked Clusters Configurationcluster.catmain() { print $* | read cluster_name heart_beat_type site1 ipaddr1 site2 ipaddr2 # : Unicast vs Mulicast # unicast=$(dspmsg -s 64 cluster.cat 4 Unicast) multicast=$(dspmsg -s 64 cluster.cat 5 Multicast) Default=$(dspmsg -s 1 cluster.cat 860 "Default") # : Until clmgr modify cluster learns to handle heart beat type # if [[ $ipaddr1 == $Default ]] then ipaddr1="" fi if [[ $ipaddr2 == $Default ]] then ipaddr2="" fi if [[ $heart_beat_type == $unicast ]] then heart_beat_type='U' new_type=$unicast else if [[ -z $ipaddr1 && -z $ipaddr2 ]] then heart_beat_type='M' new_type=$multicast else heart_beat_type='C' new_type=$(dspmsg -s 64 cluster.cat 19 "Multicast with IP address $ipaddr1 on $site1 and IP address $ipaddr2 on $site2 " $ipaddr1 $site1 $ipaddr2 $site2) fi fi # : The only thing the user is allowed to change at this point : is the heart beat type. # current_type=$(/usr/es/sbin/cluster/utilities/clodmget -f heartbeattype -n HACMPcluster) if [[ $current_type == U* && $heart_beat_type == U ]] || [[ $current_type == M* && $heart_beat_type == M ]] then dspmsg -s 64 cluster.cat 11 "Cluster configuration is unchanged" return 0 fi # : The heart beat has been changed in the cluster. Update the : HACMPcluster ODM class to reflect this. # Class="HACMPcluster:" hbt="heartbeattype=${heart_beat_type}" handle="handle=0" printf "%s %s %s " $Class $handle $hbt | /usr/es/sbin/cluster/utilities/clodmchange -o HACMPcluster # : If we got here, let the user know what to do next # dspmsg -s 64 cluster.cat 12 "Cluster heartbeat mechanism has been changed to ${new_type}. Use the Verification and Synchronization operation to make this change effective. " "$new_type" if [[ $heart_beat_type == "M" ]] then print "" dspmsg -s 64 cluster.cat 18 "Default Multicast IP address will be used for cluster $cluster_name and will be assigned during Synchronizationn " $cluster_name fi # : And show the current configuration # print "" dspmsg -s 64 cluster.cat 15 "Current cluster configuration follows " print "" /usr/es/sbin/cluster/utilities/cltopinfo return 0 } mainmain() { # : Extract any cluster name, heart beat type, and : name, node list, and heart beat IP address for each site # odmget HACMPcluster | egrep -w 'name =|heartbeattype =' | sed 's/.*"\(.*\)".*/\1/' | paste - - | read cname hbc if [[ $hbc == U* ]] then hbc=$(dspmsg -s 64 cluster.cat 4 Unicast) else hbc=$(dspmsg -s 64 cluster.cat 5 Multicast) fi # : Put out the header line to describe the variables to SMIT # print -- "#cname:hbc:site1:repos1:ip1:site2:repos2:ip2" outline="${cname}:${hbc}" /usr/es/sbin/cluster/utilities/clodmget -f name -n HACMPsite | while read name do ip_address=$(/usr/es/sbin/cluster/utilities/clodmget -q "name = ${name}_sircol" -f ip_address -n HACMPsircol) if [[ -z $ip_address ]] then ip_address=$(dspmsg -s 1 cluster.cat 860 "Default") fi repository=$(/usr/es/sbin/cluster/utilities/clodmget -q "name = ${name}_sircol" -f repository -n HACMPsircol) outline="${outline}:${name}:${repository}:${ip_address}" done print -- "$outline" return 0 } maincluster_hlp.cat_clm.sites_repos_ipaddr_existsDefine Repository and Cluster IP Addresscluster.catmain() { # : Show the current configuration # dspmsg -s 64 cluster.cat 99 Current cluster configuration follows print "" /usr/es/sbin/cluster/utilities/cltopinfo return 0 } mainmain() { # : Extract any cluster name, heart beat type, and : name, node list, and heart beat IP address for each site # odmget HACMPcluster | egrep -w 'name =|heartbeattype =' | sed 's/.*"\(.*\)".*/\1/' | paste - - | read cname hbc if [[ $hbc == U* ]] then hbc=$(dspmsg -s 64 cluster.cat 4 Unicast) else hbc=$(dspmsg -s 64 cluster.cat 5 Multicast) fi # : Put out the header line to describe the variables to SMIT # print -- "#cname:hbc:site1:repos1:ip1:site2:repos2:ip2" outline="${cname}:${hbc}" /usr/es/sbin/cluster/utilities/clodmget -f name -n HACMPsite | while read name do ip_address=$(/usr/es/sbin/cluster/utilities/clodmget -q "name = ${name}_sircol" -f ip_address -n HACMPsircol) if [[ -z $ip_address ]] then ip_address=$(dspmsg -s 1 cluster.cat 860 "Default") fi repository=$(/usr/es/sbin/cluster/utilities/clodmget -q "name = ${name}_sircol" -f repository -n HACMPsircol) outline="${outline}:${name}:${repository}:${ip_address}" done print -- "$outline" return 0 } maincluster_hlp.cat