• Loading...
This documentation relates to the latest released version of BMC Atrium Discovery (other versions).

Changes to Discovery Commands

Skip to end of metadata
Go to start of metadata
Space Search

Searching ADDM 8.3

Table of Contents

The following sections show the discovery command changes between BMC Atrium Discovery versions.

The following changes are not shown:

  • Entirely new discovery platforms
  • Changes to comments only
  • Commands which have been removed and not replaced
  • Changes to echo only statements

Discovery command changes from 8.2.03 to 8.3

Click this link to show the discovery command changes from 8.2.03 to 8.3

Solaris

The PATH is changed.
The following code:

/bin:/usr/bin:/sbin:/usr/sbin

is replaced with:

/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin

Changed method:

  • getHBAList – enabled changed: was hbainfo, now hba_lputil

The following code is added:

echo 'arp:'
arp -a -n 2>/dev/null | awk '{ if ( $4 ~ /SP/ ) { print $2, $5 } }'
echo 'end arp'

The following code:

NDD=`which ndd` 
TW_KSTAT=`which kstat 2>/dev/null`
if [ -x "$TW_KSTAT" ]

is replaced with:

NDD=`tw_which ndd`
KSTAT=`tw_which kstat`
if [ -x "$KSTAT" ]

The following code:

kstat -p -m $iface 2>/dev/null

is replaced with:

$KSTAT -p -m $iface 2>/dev/null

The following code:

instance=`PRIV_NDD $NDD -get /dev/$NIC_TYPE instance`

is replaced with:

instance=`PRIV_NDD $NDD -get /dev/$NIC_TYPE instance 2>/dev/null`

The following code:

if [ -d "${P}" -a -r "${P}" ]; then
    (cd "${P}"; ls -al)

is replaced with:

PRIV_TEST -d "${P}" -a -r "${P}" > /dev/null 2> /dev/null
if [ $? -eq 0 ]; then
    (cd "${P}"; PRIV_LS -al)

The following code is added:

# Used in conjunction with PRIV_CAT and PRIV_LS
PRIV_TEST() {
   test "$@"
}

# This function supports privilege listing of files and directories
# Used in conjunction with PRIV_TEST 
PRIV_LS() {
  ls "$@"
}

tw_which() {
  SAVE=$IFS
  IFS=:
  for d in $PATH
  do
    if [ -x $d/$1 -a ! -d $d/$1 ]
    then
        echo $d/$1
        break
    fi
  done
  IFS=$SAVE
}

The following code is added:

# fcinfo requires superuser privileges to display any HBA information
PRIV_FCINFO() {
    "$@"
}

The following code:

if [ -f "${P}" ]; then
    echo "ls:" `ls -ld "${P}"`
    if [ -x `which digest` ]; then
        echo "md5sum:" `digest -a md5 "${P}" 2>/dev/null`

is replaced with:

PRIV_TEST -f "${P}" > /dev/null 2> /dev/null
if [ $? -eq 0 ]; then
    echo "ls:" `PRIV_LS -ld "${P}"`
    DIGEST=`tw_which digest`
    if [ -x "$DIGEST" ]; then
        echo "md5sum:" `$DIGEST -a md5 "${P}" 2>/dev/null`

Solaris: getHBAList: hbainfo: REMOVED
Solaris: getHBAList: hba_lputil: ADDED

The following code:

showrev -p 2>/dev/null | cut -c-16 | nawk '{print $2;}'

is replaced with:

showrev -p 2>/dev/null | grep -v "No patches are installed" | cut -c-16 | nawk '{print $2;}'

AIX

The following code is added:

num_logical_processors=`egrep '^Online Virtual CPUs' /tmp/tideway.$$ | cut -f2 -d:`

The following code:

echo 'model:' `egrep '^System Model:' /tmp/tideway.$$ | cut -f2 -d:`

is replaced with:

echo 'model:' `egrep '^System Model:' /tmp/tideway.$$ | cut -f2 -d: | sed -e 's/IBM,//'`

The following code:

num_logical_processors=`egrep '^Number Of Processors:' /tmp/tideway.$$ | cut -f2 -d:`

is replaced with:

# Use this processor value if lparstat failed
if [ "$num_logical_processors" = "" ]; then
    num_logical_processors=`egrep '^Number Of Processors:' /tmp/tideway.$$ | cut -f2 -d:`
fi

The following code:

num_logical_processors=`lscfg -lproc\* 2>/dev/null | wc -l`

is replaced with:

# Use this processor value if lparstat failed
if [ "$num_logical_processors" = "" ]; then
    num_logical_processors=`lscfg -lproc\* 2>/dev/null | wc -l`
fi

The following code:

     echo "num_processors": $num_physical_processors
     echo "num_logical_processors:" $num_logical_processors
     echo "processor_type:" $cputype $cpuspeed
     echo "processor_speed:" $cpuspeed
 fi

is replaced with:

fi
if [ "$num_physical_processors" != "" ]; then
     echo "num_processors": $num_physical_processors
fi
if [ "$num_logical_processors" != "" ]; then
     echo "num_logical_processors:" $num_logical_processors
fi
if [ "$cputype" != "" -a "$cpuspeed" != "" ]; then
     echo "processor_type:" $cputype $cpuspeed
     echo "processor_speed:" $cpuspeed
fi

The following code is added:

num_logical_processors=`egrep '^Online Virtual CPUs' /tmp/tideway.$$ | cut -f2 -d:`

The following code:

echo 'model:' `egrep '^System Model:' /tmp/tideway.$$ | cut -f2 -d:`

is replaced with:

echo 'model:' `egrep '^System Model:' /tmp/tideway.$$ | cut -f2 -d: | sed -e 's/IBM,//'`

The following code:

num_logical_processors=`egrep '^Number Of Processors:' /tmp/tideway.$$ | cut -f2 -d:`

is replaced with:

# Use this processor value if lparstat failed
if [ "$num_logical_processors" = "" ]; then
    num_logical_processors=`egrep '^Number Of Processors:' /tmp/tideway.$$ | cut -f2 -d:`
fi

The following code:

num_logical_processors=`lscfg -lproc\* 2>/dev/null | wc -l`

is replaced with:

# Use this processor value if lparstat failed
if [ "$num_logical_processors" = "" ]; then
    num_logical_processors=`lscfg -lproc\* 2>/dev/null | wc -l`
fi

The following code:

echo "num_processors": $num_physical_processors
echo "num_logical_processors:" $num_logical_processors
echo "processor_type:" $cputype $cpuspeed
echo "processor_speed:" $cpuspeed
fi

is replaced with:

fi
if [ "$num_physical_processors" != "" ]; then
    echo "num_processors": $num_physical_processors
fi
if [ "$num_logical_processors" != "" ]; then
    echo "num_logical_processors:" $num_logical_processors
fi
if [ "$cputype" != "" -a "$cpuspeed" != "" ]; then
    echo "processor_type:" $cputype $cpuspeed
    echo "processor_speed:" $cpuspeed
fi

The following code:

if [ `uname -v` -ge 6 ]; then
    wparaddrs=`lswpar -Nqa address 2>/dev/null | xargs echo | sed -e 's/\./\./g
' -e 's/ /|/g'`
fi
if [ "$wparaddrs" = "" ]; then
    ifconfig -a 2>/dev/null
else
    ifconfig -a 2>/dev/null | egrep -v "$wparaddrs"

is replaced with:

if [ `uname -v` -lt 5 ]; then
    for name in `netstat -i | cut -f 1 -d\  | grep -Ev '^Name|^lo0|^$' | sort -u`
    do
        ifconfig $name 2>/dev/null
    done
else
    if [ `uname -v` -ge 6 ]; then
        wparaddrs=`lswpar -Nqa address 2>/dev/null | xargs echo | sed -e 's/\./\./g
' -e 's/ /|/g'`
    fi
    if [ "$wparaddrs" = "" ]; then
        ifconfig -a 2>/dev/null
    else
        ifconfig -a 2>/dev/null | egrep -v "$wparaddrs"
    fi

The following code:

if [ `uname -v` -ge 6 ]; then
    wparaddrs=`lswpar -Nqa address 2>/dev/null | xargs echo | sed -e 's/\./\./g
' -e 's/ /|/g'`
fi
if [ "$wparaddrs" = "" ]; then
    ifconfig -a 2>/dev/null
else
    ifconfig -a 2>/dev/null | egrep -v "$wparaddrs"

is replaced with:

if [ `uname -v` -lt 5 ]; then
    for name in `netstat -i | cut -f 1 -d\  | grep -Ev '^Name|^lo0|^$' | sort -u`
    do
        ifconfig $name 2>/dev/null
    done
else
    if [ `uname -v` -ge 6 ]; then
        wparaddrs=`lswpar -Nqa address 2>/dev/null | xargs echo | sed -e 's/\./\./g
' -e 's/ /|/g'`
    fi
    if [ "$wparaddrs" = "" ]; then
        ifconfig -a 2>/dev/null
    else
        ifconfig -a 2>/dev/null | egrep -v "$wparaddrs"
    fi

The following code:

entstat -d ${adapter} 2>/dev/null | egrep "(Media Speed)|(Hardware Address)" 2>/dev/null

is replaced with:

entstat -d ${adapter} 2>/dev/null | egrep "(ETHERNET STATISTICS)|(Device Type)|(Media Speed)|(Hardware Address)|(PVID)|(Port VLAN ID)" 2>/dev/null

The following code is added:

echo 'begin lsdev-lscfg:'
for i in `lsdev -Cc adapter -F name:status | grep "^en"`
do
  adapter=`echo $i | cut -f1 -d:`
  status=`echo $i | cut -f2 -d:`

  if [ $status = "Available" ]; then
    echo Begin-interface: $adapter
    lscfg -vl $adapter 2>/dev/null
    echo End-interface: $adapter
  fi
done
echo 'end lsdev-lscfg:'

# VIO support
if [ -x /usr/ios/cli/ioscli ]; then
  echo begin ioscli-lsmap-all:
  /usr/ios/cli/ioscli lsmap -all -net -fmt ":"
  echo end ioscli-lsmap-all:
fi

The following code:

if [ -d %(path)s -a -r %(path)s ]; then
    (cd %(path)s; ls -al)
else
    echo 'DIRECTORY NOT FOUND'
fi

is replaced with:

PRIV_TEST -d %(path)s -a -r %(path)s > /dev/null 2> /dev/null
if [ $? -eq 0 ]; then
    (cd %(path)s; PRIV_LS -al)
else
    echo 'DIRECTORY NOT FOUND'
fi

The following code is added:

# Clear any shell aliases on VIO
unalias uname
unalias hostname
unalias lsdev
unalias netstat

The following code is added:

# This function supports privilege listing of files and directories
# Used in conjunction with PRIV_TEST 
PRIV_LS() {
  ls "$@"
}

The following code:

osver=`oslevel 2>/dev/null`
if [ $? -ne 0 ]; then
    osver=""
fi
if [ "$osver" = "" -o "$osver" = "TYPERML" ]; then
    osmaj=`uname -v 2>/dev/null`
    osmin=`uname -r 2>/dev/null`
    osver="$osmaj.$osmin"
fi
echo 'os:' `uname -s 2>/dev/null` $osver
echo 'os_arch:' `uname -p 2>/dev/null`

is replaced with:

# VIO support
if [ -f /usr/ios/cli/ios.level ]; then
    viover=`cat /usr/ios/cli/ios.level`
    os="VIO $viover"
else
    osver=`oslevel 2>/dev/null`
    if [ $? -ne 0 ]; then
        osver=""
    fi
    if [ "$osver" = "" -o "$osver" = "TYPERML" ]; then
        osmaj=`uname -v 2>/dev/null`
        osmin=`uname -r 2>/dev/null`
        osver="$osmaj.$osmin"
    fi
    os="`uname -s 2>/dev/null` $osver"
fi
echo 'os:' $os
echo 'os_arch:' `uname -p 2>/dev/null`

The following code:

if [ -f %(path)s ]; then
    echo "ls:" `ls -ld %(path)s` 

is replaced with:

PRIV_TEST -f %(path)s > /dev/null 2> /dev/null
if [ $? -eq 0 ]; then
    echo "ls:" `PRIV_LS -ld %(path)s` 

Mac OS-X

The following code:

grep "Memory: " /tmp/tideway-hw-$$ | sed 's/^.*: \(.*\)$/ram: \1/'

is replaced with:

grep "^[[:blank:]]*Memory: " /tmp/tideway-hw-$$ | sed 's/^.*: \(.*\)$/ram: \1/'

The following code:

if [ -d %(path)s -a -r %(path)s ]; then
    (cd %(path)s; ls -alT)

is replaced with:

PRIV_TEST -d %(path)s -a -r %(path)s > /dev/null 2> /dev/null
if [ $? -eq 0 ]; then
    (cd %(path)s; PRIV_LS -alT)

The following code:

# This function supports privilege testing of attributes of files.
# Used in conjunction with PRIV_CAT.
 PRIV_TEST() {
   test "$@"
 }

is replaced with:

# This function supports privilege testing of attributes of files.
# Used in conjunction with PRIV_CAT and PRIV_LS
PRIV_TEST() {
  test "$@"
}

# This function supports privilege listing of files and directories
# Used in conjunction with PRIV_TEST 
PRIV_LS() {
  ls "$@"
}

The following code:

if [ -f %(path)s ]; then
    echo "ls:" `ls -lTd %(path)s`
    echo "md5sum:" `md5sum %(path)s 2>/dev/null | awk '{print $1;}'`
else
    echo "FILE NOT FOUND"

is replaced with:

PRIV_TEST -f %(path)s > /dev/null 2> /dev/null
if [ $? -eq 0 ]; then
    echo "ls:" `PRIV_LS -lTd %(path)s`
    echo "md5sum:" `md5sum %(path)s 2>/dev/null | awk '{print $1;}'`
else
    echo "FILE NOT FOUND"

IRIX

The following code:

if [ -d %(path)s -a -r %(path)s ]; then
    (cd %(path)s; ls -al)
else
    echo 'DIRECTORY NOT FOUND'
fi

is replaced with:

PRIV_TEST -d %(path)s -a -r %(path)s > /dev/null 2> /dev/null
if [ $? -eq 0 ]; then
    (cd %(path)s; PRIV_LS -al)
else
    echo 'DIRECTORY NOT FOUND'
fi

The following code:

# This function supports privilege testing of attributes of files.
# Used in conjunction with PRIV_CAT.
PRIV_TEST() {
  test "$@"
}

is replaced with:

 # This function supports privilege testing of attributes of files.
# Used in conjunction with PRIV_CAT and PRIV_LS
PRIV_TEST() {
  test "$@"
}

# This function supports privilege listing of files and directorie
# Used in conjunction with PRIV_TEST 
PRIV_LS() {
  ls "$@"
}

The following code:

if [ -f %(path)s ]; then
    echo "ls:" `ls -ld %(path)s`
else
    echo "FILE NOT FOUND"
fi

is replaced with:

PRIV_TEST -f %(path)s > /dev/null 2> /dev/null
if [ $? -eq 0 ]; then
    echo "ls:" `PRIV_LS -ld %(path)s`
else
    echo "FILE NOT FOUND"
fi

Tru64

The following code:

if [ -d %(path)s -a -r %(path)s ]; then
    (cd %(path)s; ls -al)
else
    echo 'DIRECTORY NOT FOUND'
fi

is replaced with:

PRIV_TEST -d %(path)s -a -r %(path)s > /dev/null 2> /dev/null
if [ $? -eq 0 ]; then
    (cd %(path)s; PRIV_LS -al)
else
    echo 'DIRECTORY NOT FOUND'
fi

The following code:

# This function supports privilege testing of attributes of files.
# Used in conjunction with PRIV_CAT.
PRIV_TEST() {
  test "$@"
}

is replaced with:

 # This function supports privilege testing of attributes of files.
# Used in conjunction with PRIV_CAT and PRIV_LS
PRIV_TEST() {
  test "$@"
}

# This function supports privilege listing of files and directories
# Used in conjunction with PRIV_TEST 
PRIV_LS() {
  ls "$@"
}

The following code:

if [ -f %(path)s ]; then
    echo "ls:" `ls -ld %(path)s`
else
    echo "FILE NOT FOUND"
fi

is replaced with:

PRIV_TEST -f %(path)s > /dev/null 2> /dev/null
if [ $? -eq 0 ]; then
    echo "ls:" `PRIV_LS -ld %(path)s`
else
    echo "FILE NOT FOUND"
fi

Mainframe

New methods:

  • getApplication
  • getDependency

Changed methods:

  • getDatabaseDetail – enabled changed: was False, now True.
  • getTransaction – enabled changed: was False, now True.
  • getMQDetail – enabled changed: was False, now True.

UnixWare

The following code:

if [ -d %(path)s -a -r %(path)s ]; then
    (cd %(path)s; ls -al)
else
    echo 'DIRECTORY NOT FOUND'
fi

is replaced with:

PRIV_TEST -d %(path)s -a -r %(path)s > /dev/null 2> /dev/null
if [ $? -eq 0 ]; then
    (cd %(path)s; PRIV_LS -al)
else
    echo 'DIRECTORY NOT FOUND'
fi

The following code:

# This function supports privilege testing of attributes of files.
# Used in conjunction with PRIV_CAT.
PRIV_TEST() {
  test "$@"
}

is replaced with:

# This function supports privilege testing of attributes of files.
# Used in conjunction with PRIV_CAT and PRIV_LS
PRIV_TEST() {
  test "$@"
}

# This function supports privilege listing of files and directories
# Used in conjunction with PRIV_TEST 
PRIV_LS() {
  ls "$@"
}

The following code:

if [ -f %(path)s ]; then
    echo "ls:" `ls -ld %(path)s`
else
    echo "FILE NOT FOUND"
fi

is replaced with:

PRIV_TEST -f %(path)s > /dev/null 2> /dev/null
if [ $? -eq 0 ]; then
    echo "ls:" `PRIV_LS -ld %(path)s`
else
    echo "FILE NOT FOUND"
fi

FreeBSD

The following code:

if [ -d %(path)s -a -r %(path)s ]; then
    (cd %(path)s; ls -alT)
else
    echo 'DIRECTORY NOT FOUND'
fi

is replaced with:

PRIV_TEST -d %(path)s -a -r %(path)s > /dev/null 2> /dev/null
if [ $? -eq 0 ]; then
    (cd %(path)s; PRIV_LS -alT)
else
    echo 'DIRECTORY NOT FOUND'
fi

The following code:

# This function supports privilege testing of attributes of files.
# Used in conjunction with PRIV_CAT.
PRIV_TEST() {
  test "$@"
}

is replaced with:

# This function supports privilege testing of attributes of files.
# Used in conjunction with PRIV_CAT and PRIV_LS
PRIV_TEST() {
  test "$@"
}

# This function supports privilege listing of files and directories
# Used in conjunction with PRIV_TEST 
PRIV_LS() {
  ls "$@"
}

The following code:

if [ -f %(path)s ]; then
    echo "ls:" `ls -lTd %(path)s`
    echo "md5sum:" `md5 -q %(path)s 2>/dev/null`
else
    echo "FILE NOT FOUND"

is replaced with:

PRIV_TEST -f %(path)s > /dev/null 2> /dev/null
if [ $? -eq 0 ]; then
    echo "ls:" `PRIV_LS -lTd %(path)s`
    echo "md5sum:" `md5 -q %(path)s 2>/dev/null`
else
    echo "FILE NOT FOUND"

Linux

The following code:

if [ "${model}" != "" ]; then
    echo 'model:' ${model}
fi

is replaced with:

if [ "${model}" != "" ]; then
    echo 'candidate_model[]:' ${model}
fi

The following code:

    echo 'serial:' ${serial}
fi

if [ "${model}" != "" ]; then
    echo 'model:' ${model}
fi

is replaced with:

    echo 'candidate_serial[]:' ${serial}
fi

if [ "${model}" != "" ]; then

    echo 'candidate_model[]:' ${model}
fi

The following code:

    # On a VMWare ESX controller, report the *real* hardware information
    file=/tmp/tideway-hw-$$
    PRIV_ESXCFG /usr/sbin/esxcfg-info --hardware > ${file} 2>/dev/null
    if [ $? -eq 0 ]; then
        physical=`grep "Num Packages\." ${file} | sed -e "s/[Changes to Discovery Commands^0-9]//g"`
        logical=`grep "Num Cores." ${file} | head -n 1 | sed -e "s/[Changes to Discovery Commands^0-9]//g"`
        tmp=`echo ${cputype} | sed 's/ @.*$//'`
        cputype="${tmp} ${cpuspeed}"
        ram=`grep "Physical Mem\." ${file} | sed 's/[Changes to Discovery Commands^0-9]*//g'`B
    else
        print=0
    fi
    rm -f ${file}

fi
if [ -f /opt/xensource/bin/xe ]; then
    print=0
  }
}'

is replaced with:

    # On a VMWare ESX controller, report the *real* hardware information
    file=/tmp/tideway-hw-$$
    PRIV_ESXCFG /usr/sbin/esxcfg-info --hardware > ${file} 2>/dev/null
    uuid=""
    if [ $? -eq 0 ]; then
        physical=`grep "Num Packages\." ${file} | sed -e "s/[Changes to Discovery Commands^0-9]//g"`
        logical=`grep "Num Cores." ${file} | head -n 1 | sed -e "s/[Changes to Discovery Commands^0-9]//g"`
        tmp=`echo ${cputype} | sed 's/ @.*$//'`
        cputype="${tmp} ${cpuspeed}"
        ram=`grep "Physical Mem\." ${file} | sed 's/[Changes to Discovery Commands^0-9]*//g'`B
        uuid=`grep "BIOS UUID\." ${file}`
    else
        print=0
    fi
    rm -f ${file}

    # Get UUID as hostid if possible
    if [ "$uuid" != "" ]; then
        # Process horrid BIOS UUID format :(
        echo "$uuid" | sed -e 's/\./ /g' | awk '{
printf("hostid: ");
for(i = 3 ; i < 19; i++)
{
    printf("%02s", substr($i,3,2));
    if (i == 6 || i == 8 || i == 10 || i == 12) printf("-");
}
printf("\n");
}'
    else
        if [ -r /etc/slp.reg ]; then
            uuid=`grep hardwareUuid /etc/slp.reg | cut -f2 -d= | tr '[:upper:]' '[:lower:]' | sed -e 's/"//g'`
            if [ "${uuid}" != "" ]; then
                echo 'hostid:' ${uuid}
            fi
        fi
    fi
fi
if [ -f /opt/xensource/bin/xe ]; then
    print=0
  }
}'

The following code:

# Can we get information from the BIOS?
if [ -f /usr/sbin/dmidecode ]; then 
    PRIV_DMIDECODE /usr/sbin/dmidecode 2>/dev/null | sed -n '/DMI type 1,/,/^Handle 0x0/p' | awk '
    $1 ~ /Manufacturer:/ { sub(".*Manufacturer: *",""); printf( "vendor: %s\n", $0); } 
    $1 ~ /Vendor:/ { sub(".*Vendor: *",""); printf( "vendor: %s\n", $0 ); } 
    $1 ~ /Product/ && $2 ~ /Name:/ { sub(".*Product Name: *",""); printf( "model:  %s\n", $0 ); } 
    $1 ~ /Product:/ { sub(".*Product: *",""); printf( "model: %s\n", $0 ); } 
    $1 ~ /Serial/ && $2 ~ /Number:/ { sub(".*Serial Number: *",""); printf( "serial: %s\n", $0 ); } ' 
fi

if [ -f /usr/sbin/hwinfo ]; then 
    PRIV_HWINFO /usr/sbin/hwinfo --bios 2>/dev/null | sed -n '/System Info:/,/Info:/p' | awk ' 
    $1 ~ /Manufacturer:/ { sub(".*Manufacturer: *",""); gsub( "\"", ""); printf( "vendor: %s\n", $0 ); } 
    $1 ~ /Product:/ { sub(".*Product: *",""); gsub( "\"", ""); printf( "model: %s\n", $0 ); } 
    $1 ~ /Serial:/ { sub(".*Serial: *",""); gsub( "\"", ""); printf( "serial: %s\n", $0 ); }' 
fi

# PPC64 LPAR?
if [ -f /proc/ppc64/lparcfg ]; then
    sed -e 's/=/: /' /proc/ppc64/lparcfg | egrep '^[a-z]' | sed -e 's/^serial_number/serial/' -e 's/^system_type/model/' -e 's/partition_id/lpar_id/' -e 's/^group/lpar_partition_group_id/' -e 's///'
fi

# zLinux?
if [ -f /proc/sysinfo -a -d /proc/dasd ]; then
    echo "vendor:" `egrep '^Manufacturer:' /proc/sysinfo | awk '{print $2;}'`
    type=`egrep '^Type:' /proc/sysinfo | awk '{print $2;}'`
    model=`egrep '^Model:' /proc/sysinfo | awk '{print $2;}'`
    echo "model: $type-$model"
    echo "zlinux_seqence:" `egrep '^Sequence Code:' /proc/sysinfo | awk '{print $3;}'`
    echo "zlinux_vm_name:" `egrep '^VM00 Name:' /proc/sysinfo | awk '{print $3;}'`
    echo "zlinux_vm_software:" `egrep '^VM00 Control Program:' /proc/sysinfo | awk '{print $4, $5;}'`
fi

is replaced with:

# zLinux?
if [ -f /proc/sysinfo -a -d /proc/dasd ]; then

    echo "candidate_vendor[]:" `egrep '^Manufacturer:' /proc/sysinfo | awk '{print $2;}'`
    type=`egrep '^Type:' /proc/sysinfo | awk '{print $2;}'`
    model=`egrep '^Model:' /proc/sysinfo | awk '{print $2;}'`
    echo "candidate_model[]: $type-$model"
    echo "zlinux_sequence:" `egrep '^Sequence Code:' /proc/sysinfo | awk '{print $3;}'`
    echo "zlinux_vm_name:" `egrep '^VM00 Name:' /proc/sysinfo | awk '{print $3;}'`
    echo "zlinux_vm_software:" `egrep '^VM00 Control Program:' /proc/sysinfo | awk '{print $4, $5;}'`
fi

# Can we get information from the BIOS? We use lshal if available as that
# requires no superuser permissions but we attempt to run all tools as some
# can return invalid values in some cases. The system will select the "best"
# candidate from the values returned, where "best" is the first non-bogus value
if [ -x /usr/bin/lshal ]; then 
    /usr/bin/lshal 2>/dev/null | sed -e 's/(string)$//g' -e "s/'//g" | awk '
    $1 ~ /system.hardware.serial/ {
        sub(".*system.hardware.serial = *", "");
        printf("candidate_serial[]: %s\n", $0);
    }
    $1 ~ /system.hardware.uuid/ {
        sub(".*system.hardware.uuid = *", "");
        printf("candidate_uuid[]: %s\n", $0);
    }
    $1 ~ /system.hardware.product/ {
        sub(".*system.hardware.product = *", "");
        printf("candidate_model[]: %s\n", $0);
    }
    $1 ~ /system.hardware.vendor/ {
        sub(".*system.hardware.vendor = *", "");
        printf("candidate_vendor[]: %s\n", $0);
    }'
fi
if [ -f /usr/sbin/dmidecode ]; then
        PRIV_DMIDECODE /usr/sbin/dmidecode 2>/dev/null | sed -n '/DMI type 1,/,/^Handle 0x0/p' | awk '
    $1 ~ /Manufacturer:/ { sub(".*Manufacturer: *", ""); printf("candidate_vendor[]: %s\n", $0); }
    $1 ~ /Vendor:/ { sub(".*Vendor: *", ""); printf("candidate_vendor[]: %s\n", $0); }
    $1 ~ /Product/ && $2 ~ /Name:/ { sub(".*Product Name: *", ""); printf("candidate_model[]: %s\n", $0); }
    $1 ~ /Product:/ { sub(".*Product: *",""); printf("candidate_model[]: %s\n", $0 ); }
    $1 ~ /Serial/ && $2 ~ /Number:/ { sub(".*Serial Number: *", ""); printf("candidate_serial[]: %s\n", $0); }
    $1 ~ /UUID:/ { sub(".*UUID: *", ""); printf( "candidate_uuid[]: %s\n", $0 ); } '
fi
if [ -f /usr/sbin/hwinfo ]; then
        PRIV_HWINFO /usr/sbin/hwinfo --bios 2>/dev/null | sed -n '/System Info:/,/Info:/p' | awk '
    $1 ~ /Manufacturer:/ { sub(".*Manufacturer: *", ""); gsub("\"", ""); printf("candidate_vendor[]: %s\n", $0); }
    $1 ~ /Product:/ { sub(".*Product: *", ""); gsub("\"", ""); printf("candidate_model[]: %s\n", $0); }
    $1 ~ /Serial:/ { sub(".*Serial: *", ""); gsub("\"", ""); printf("candidate_serial[]: %s\n", $0); }
    $1 ~ /UUID:/ { sub(".*UUID: *", ""); gsub("\"", ""); printf("candidate_uuid[]: %s\n", $0); } ' 
fi

# PPC64 LPAR?
if [ -r /proc/ppc64/lparcfg ]; then
    echo begin lparcfg:
    cat /proc/ppc64/lparcfg 2>/dev/null
    echo end lparcfg
fi
# LPAR name?
if [ -r /proc/device-tree/ibm,partition-name ]; then
    echo "lpar_partition_name:" `cat /proc/device-tree/ibm,partition-name`
fi

The following code:

if [ -d %(path)s -a -r %(path)s ]; then
    (cd %(path)s; ls -a --full-time --color=never)
else
    echo 'DIRECTORY NOT FOUND'
fi

is replaced with:

PRIV_TEST -d %(path)s -a -r %(path)s > /dev/null 2> /dev/null
if [ $? -eq 0 ]; then
    (cd %(path)s; PRIV_LS -a --full-time --color=never)
else
    echo 'DIRECTORY NOT FOUND'
fi

The following code:

# This function supports privilege testing of attributes of files.
# Used in conjunction with PRIV_CAT.
PRIV_TEST() {
  test "$@"
}

is replaced with:

# This function supports privilege testing of attributes of files.
# Used in conjunction with PRIV_CAT and PRIV_LS
PRIV_TEST() {
  test "$@"
}

# This function supports privilege listing of files and directories
# Used in conjunction with PRIV_TEST 
PRIV_LS() {
  ls "$@"
}

The following code is removed:

# emlxadm requires superuser privileges to display any HBA information
PRIV_EMLXADM() {
    "$@"
}

The following code:

os=""

if [ "$os" = "" -a -e /proc/vmware/version ]; then
    os=`grep -m1 ESX /proc/vmware/version`
fi

if [ "$os" = "" -a -f /etc/SuSE-release ]; then
    os=`head -n 1 /etc/SuSE-release`
fi
if [ "$os" = "" -a -f /etc/lsb-release ]; then
    ostype=`grep DISTRIB_ID /etc/lsb-release | cut -f2 -d=`
    osver=`grep DISTRIB_RELEASE /etc/lsb-release | cut -f2 -d=`
    os="$ostype $osver"
fi
if [ "$os" = "" -a -f /etc/debian_version ]; then
    ver=`cat /etc/debian_version`
    os="Debian Linux $ver"


is replaced with:

os=""

if [ "$os" = "" -a -x /usr/bin/lsb_release ]; then
    # We'd like to use -ds but that puts quotes in the output!
    os=`/usr/bin/lsb_release -d | cut -f2 -d:`
fi
if [ "$os" = "" -a -e /proc/vmware/version ]; then
    os=`grep -m1 ESX /proc/vmware/version`
fi

if [ "$os" = "" -a -f /etc/SuSE-release ]; then
    os=`head -n 1 /etc/SuSE-release`
fi

if [ "$os" = "" -a -f /etc/debian_version ]; then
    ver=`cat /etc/debian_version`
    os="Debian Linux $ver"

The following code:

if [ -f %(path)s ]; then
    echo "ls:" `ls -ld %(path)s`
    echo "md5sum:" `md5sum %(path)s 2>/dev/null | awk '{print $1;}'`
else
    echo "FILE NOT FOUND"

is replaced with:

PRIV_TEST -f %(path)s > /dev/null 2> /dev/null
if [ $? -eq 0 ]; then
    echo "ls:" `PRIV_LS -ld %(path)s`
    echo "md5sum:" `md5sum %(path)s 2>/dev/null | awk '{print $1;}'`
else
    echo "FILE NOT FOUND"

Changed method:

  • getHBAList – enabled changed: was hbainfo, now hba_lputil

OpenBSD

The following code:

if [ -d %(path)s -a -r %(path)s ]; then
    (cd %(path)s; ls -alT)
else
    echo 'DIRECTORY NOT FOUND'
fi

is replaced with:

PRIV_TEST -d %(path)s -a -r %(path)s > /dev/null 2> /dev/null
if [ $? -eq 0 ]; then
    (cd %(path)s; PRIV_LS -alT)
else
    echo 'DIRECTORY NOT FOUND'
fi

The following code:

# This function supports privilege testing of attributes of files.
# Used in conjunction with PRIV_CAT.
PRIV_TEST() {
  test "$@"
}

is replaced with:

# This function supports privilege testing of attributes of files.
# Used in conjunction with PRIV_CAT and PRIV_LS
PRIV_TEST() {
  test "$@"
}

# This function supports privilege listing of files and directories
# Used in conjunction with PRIV_TEST 
PRIV_LS() {
  ls "$@"
}

The following code:

if [ -f %(path)s ]; then
    echo "ls:" `ls -lTd %(path)s`
    echo "md5sum:" `md5 -q %(path)s 2>/dev/null`
else
    echo "FILE NOT FOUND"

is replaced with:

PRIV_TEST -f %(path)s > /dev/null 2> /dev/null
if [ $? -eq 0 ]; then
    echo "ls:" `PRIV_LS -lTd %(path)s`
    echo "md5sum:" `md5 -q %(path)s 2>/dev/null`
else
    echo "FILE NOT FOUND"

NetBSD

The following code:

if [ -d %(path)s -a -r %(path)s ]; then
    (cd %(path)s; ls -alT)
else
    echo 'DIRECTORY NOT FOUND'
fi

is replaced with:

PRIV_TEST -d %(path)s -a -r %(path)s > /dev/null 2> /dev/null
if [ $? -eq 0 ]; then
    (cd %(path)s; PRIV_LS -alT)
else
    echo 'DIRECTORY NOT FOUND'
fi

The following code:

# This function supports privilege testing of attributes of files.
# Used in conjunction with PRIV_CAT.
PRIV_TEST() {
  test "$@"
}

is replaced with:

# This function supports privilege testing of attributes of files.
# Used in conjunction with PRIV_CAT and PRIV_LS
PRIV_TEST() {
  test "$@"
}

# This function supports privilege listing of files and directories
# Used in conjunction with PRIV_TEST 
PRIV_LS() {
  ls "$@"
}

The following code:

if [ -f %(path)s ]; then
    echo "ls:" `ls -lTd %(path)s`
    echo "md5sum:" `md5 -q %(path)s 2>/dev/null`
else
    echo "FILE NOT FOUND"

is replaced with:

PRIV_TEST -f %(path)s > /dev/null 2> /dev/null
if [ $? -eq 0 ]; then
    echo "ls:" `PRIV_LS -lTd %(path)s`
    echo "md5sum:" `md5 -q %(path)s 2>/dev/null`
else
    echo "FILE NOT FOUND"

HP-UX

The following code:

par_id=`/usr/sbin/parstatus -w 2> /dev/null | grep "The local partition number is" | sed 's/.*The local partition number is \([0-9]*\)\..*/\1/'`
if [ "$par_id" ]; then
    echo par_id: $par_id
    par_status=`/usr/sbin/parstatus -C -M | grep "$par_id"\$`
    for i in `echo "$par_status" | sed 's/^[Changes to Discovery Commands^:]*:[Changes to Discovery Commands^:]*:[Changes to Discovery Commands^:]*: *\([0-9]*\).*/\1/'`; do
        cores=$((cores + i))
    done
    for i in `echo "$par_status" | sed 's/^[Changes to Discovery Commands^:]*:[Changes to Discovery Commands^:]*:[Changes to Discovery Commands^:]*:[Changes to Discovery Commands^:]*: *\([0-9]*\).*/\1/'`; do
        ram=$((ram + i))
    done
    ram=`echo "$ram" '* 1048576 * 1024' | bc`
    echo ram: $ram
fi

is replaced with:

par_id=`/usr/sbin/parstatus -w 2> /dev/null | grep "The local partition number is" | sed 's/.*The local partition number is \([0-9]*\)\..*/\1/'`
if [ "$par_id" ]; then
    echo par_id: $par_id
    cpumem=`/usr/sbin/parstatus -C -M |awk -v PAR_ID=$par_id 'BEGIN{ FS=":" };{ if ($NF==PAR_ID) { split($4,cpuarray,"/"); split($5,memarray,"/"); cpu+=cpuarray[1]; mem+=int(memarray[1])} };END{ printf "%d %d\n",cpu,mem }'`
    cores=`echo "$cpumem" |awk '{print $1}'`
    ram=`echo "$cpumem" |awk '{print $2}'`
    ram=`echo "$ram" '* 1048576 * 1024' | bc`
    echo ram: $ram
fi

The following code:

interfaces=`netstat -in 2>/dev/null | cut -d\  -f 1 | grep -Ev '\*|^Name|^lo0|^IP|^$' | sort -u`
for interface in $interfaces
do
  ifconfig $interface 2>/dev/null

is replaced with:

netstat -inw > /tmp/addm.$$ 2>/dev/null
if [ $? -ne 0 ]; then
  netstat -in > /tmp/addm.$$ 2>/dev/null
fi
interfaces=`cat /tmp/addm.$$ | cut -d\  -f 1 | grep -Ev '\*|^Name|^lo0|^IP|^$' | sort -u`
rm /tmp/addm.$$
for interface in $interfaces
do
  ifconfig $interface 2>/dev/null

The following code:

if [ -d %(path)s -a -r %(path)s ]; then
    (cd %(path)s; ls -al)
else
    echo 'DIRECTORY NOT FOUND'
fi

is replaced with:

PRIV_TEST -d %(path)s -a -r %(path)s > /dev/null 2> /dev/null
if [ $? -eq 0 ]; then
    (cd %(path)s; PRIV_LS -al)
else
    echo 'DIRECTORY NOT FOUND'
fi

The following code:

# This function supports privilege testing of attributes of files.
# Used in conjunction with PRIV_CAT.
PRIV_TEST() {
  test "$@"
}

is replaced with:

# This function supports privilege testing of attributes of files.
# Used in conjunction with PRIV_CAT and PRIV_LS
PRIV_TEST() {
  test "$@"
}

# This function supports privilege listing of files and directories
# Used in conjunction with PRIV_TEST 
PRIV_LS() {
  ls "$@"
}

The following code:

if [ -f %(path)s ]; then
    echo "ls:" `ls -ld %(path)s`
    echo "md5sum:" `md5sum %(path)s 2>/dev/null | awk '{print $1;}'`
else        
    echo "FILE NOT FOUND"

is replaced with:

PRIV_TEST -f %(path)s > /dev/null 2> /dev/null
if [ $? -eq 0 ]; then
    echo "ls:" `PRIV_LS -ld %(path)s`
    echo "md5sum:" `md5sum %(path)s 2>/dev/null | awk '{print $1;}'`
else        
    echo "FILE NOT FOUND"

VMware ESXi

The following code is added:

# Get UUID as hostid if possible
uuid=`/sbin/smbiosDump | grep UUID | grep -v undefined`
if [ "$uuid" != "" ]; then
    # UUID from smbiosDump is not formated and bytes are reversed :(
    echo $uuid | awk '{
        sub(".*UUID: *","");
        printf("hostid: %s%s%s%s-%s%s-%s%s-%s%s-%s%s%s%s%s%s\n",
        substr($0,31,2), substr($0,29,2), substr($0,27,2), substr($0,25,2),
        substr($0,23,2), substr($0,21,2), substr($0,19,2), substr($0,17,2),
        substr($0,15,2), substr($0,13,2), substr($0,11,2), substr($0,9,2),
        substr($0,7,2),  substr($0,5,2),  substr($0,3,2),  substr($0,1,2));
    }'
else
    # Attempt to get UUID from slp.reg
    if [ -r /etc/slp.reg ]; then
        uuid=`grep hardwareUuid /etc/slp.reg | cut -f2 -d= | tr '[:upper:]' '[:lower:]' | sed -e 's/"//g'`
        if [ "${uuid}" != "" ]; then
            echo 'hostid:' ${uuid}
        fi
    fi
fi

The following code:

if [ -d %(path)s -a -r %(path)s ]; then
    (cd %(path)s; ls -lae --color=never)
else
    echo 'DIRECTORY NOT FOUND'
fi

is replaced with:

PRIV_TEST -d %(path)s -a -r %(path)s > /dev/null 2> /dev/null
if [ $? -eq 0 ]; then
    (cd %(path)s; PRIV_LS -lae --color=never)
else
    echo 'DIRECTORY NOT FOUND'
fi

The following code:

 # This function supports privilege testing of attributes of files.
-# Used in conjunction with PRIV_CAT.
 PRIV_TEST() {
   test "$@"
 }

is replaced with:

# This function supports privilege testing of attributes of files.
# Used in conjunction with PRIV_CAT and PRIV_LS
PRIV_TEST() {
  test "$@"
}

# This function supports privilege listing of files and directories
# Used in conjunction with PRIV_TEST 
PRIV_LS() {
  ls "$@"
}

The following code:

if [ -f %(path)s ]; then
    echo "ls:" `ls -ld %(path)s`
    echo "md5sum:" `md5sum %(path)s 2>/dev/null | awk '{print $1;}'`
else
    echo "FILE NOT FOUND"

is replaced with:

PRIV_TEST -f %(path)s > /dev/null 2> /dev/null
if [ $? -eq 0 ]; then
    echo "ls:" `PRIV_LS -ld %(path)s`
    echo "md5sum:" `md5sum %(path)s 2>/dev/null | awk '{print $1;}'`
else
    echo "FILE NOT FOUND"

The following code:

if [ -f %(path)s ]; then
    echo "ls:" `ls -ld %(path)s`
    echo "md5sum:" `md5sum %(path)s 2>/dev/null | awk '{print $1;}'`
else
    echo "FILE NOT FOUND"

is replaced with:

PRIV_TEST -f %(path)s > /dev/null 2> /dev/null
if [ $? -eq 0 ]; then
    echo "ls:" `PRIV_LS -ld %(path)s`
    echo "md5sum:" `md5sum %(path)s 2>/dev/null | awk '{print $1;}'`
else
    echo "FILE NOT FOUND"

The following code:

ihn=`hostname -s 2>/dev/null`
if [ "$ihn" = "localhost" ]; then
    ihn=`hostname 2>/dev/null`
fi
echo 'hostname:' $ihn

is replaced with:

ihn=`hostname -s 2>/dev/null`
if [ "$ihn" = "" -o "$ihn" = "localhost" ]; then
    ihn=`hostname 2>/dev/null`
fi
echo 'hostname:' $ihn

Discovery command changes from 8.2.02 to 8.2.03

There have been no discovery command changes between BMC Atrium Discovery 8.2.02 and 8.2.03.

Discovery command changes from 8.2.01 to 8.2.02

There have been no discovery command changes between BMC Atrium Discovery 8.2.01 and 8.2.02.

Discovery command changes from 8.2 to 8.2.01

Click this link to show the discovery command changes from 8.2 to 8.2.01

Solaris

The following code is added:

 
# This function supports privilege testing of attributes of files.
# Used in conjunction with PRIV_CAT.
PRIV_TEST() {
  test "$@"
}

The following code:

if [ -f "${P}" -a -r "${P}" ]; then

is replaced with:

 
PRIV_TEST -f "${P}" -a -r "${P}"
if [ $? -eq 0 ]; then
    echo "begin content:"
    if [ -x /usr/xpg4/bin/sed ]; then
        PRIV_CAT "${P}" | /usr/xpg4/bin/sed -e 's/[^[:print:][:blank:]]//g'

AIX

The following code is added:

 
# This function supports privilege testing of attributes of files.
# Used in conjunction with PRIV_CAT.
PRIV_TEST() {
  test "$@"
}

The following code:

if [ -f "${P}" -a -r "${P}" ]; then

is replaced with:

 
PRIV_TEST -f "${P}" -a -r "${P}"
if [ $? -eq 0 ]; then

The following code:

lslpp -L devices.pci.$adapter_type.* | grep devices.pci.$adapter_type

is replaced with:

 
lslpp -L devices.*.$adapter_type.*

OS X

The following code is added:

 
# This function supports privilege testing of attributes of files.
# Used in conjunction with PRIV_CAT.
PRIV_TEST() {
  test "$@"
}

The following code:

 cpucount=`grep "Number Of CPUs: " /tmp/tideway-hw-$$ | sed 's/^.*: \(.*\)$/\1/'`
if [ "$cpucount" = "" ]; then
    cpucount=`grep "Number Of Processors: " /tmp/tideway-hw-$$ | sed 's/^.*: \(.*\)$/\1/'`
    cputype=`grep "Processor Name: " /tmp/tideway-hw-$$ | sed 's/^.*: \(.*\)$/\1/'`
    cpuspeed=`grep "Processor Speed: " /tmp/tideway-hw-$$ | sed 's/^.*: \(.*\)$/\1/'`
    cores=`grep "Number Of Cores: " /tmp/tideway-hw-$$ | sed 's/^.*: \(.*\)$/\1/'`
    if [ "$cores" != "" ]; then
        echo "num_logical_processors: $cores"
        echo "cores_per_processor:" `expr $cores / $cpucount`
    fi
else
    cputype=`grep "CPU Type: " /tmp/tideway-hw-$$ | sed 's/^.*: \(.*\)$/\1/'`
    cpuspeed=`grep "CPU Speed: " /tmp/tideway-hw-$$ | sed 's/^.*: \(.*\)$/\1/'`
fi
echo "num_processors: $cpucount"
echo "processor_type: $cputype $cpuspeed"

is replaced with:

 
cpucount=`grep "Number Of CPUs: " /tmp/tideway-hw-$$ | sed 's/^.*: \(.*\)$/\1/'`
if [ "$cpucount" = "" ]; then
    cpucount=`grep "Number Of Processors: " /tmp/tideway-hw-$$ | sed 's/^.*: \(.*\)$/\1/'`
    if [ "$cpucount" = "" ]; then
        # On some OS versions, system_profiler will not report the number of
        # processors unless it is > 1 so if we have no value reported, there is
        # only one CPU
        cpucount=1
    fi
    cputype=`grep "Processor Name: " /tmp/tideway-hw-$$ | sed 's/^.*: \(.*\)$/\1/'`
    cpuspeed=`grep "Processor Speed: " /tmp/tideway-hw-$$ | sed 's/^.*: \(.*\)$/\1/'`
else
    cputype=`grep "CPU Type: " /tmp/tideway-hw-$$ | sed 's/^.*: \(.*\)$/\1/'`
    cpuspeed=`grep "CPU Speed: " /tmp/tideway-hw-$$ | sed 's/^.*: \(.*\)$/\1/'`
fi
cores=`grep "Number Of Cores: " /tmp/tideway-hw-$$ | sed 's/^.*: \(.*\)$/\1/'`
if [ "$cores" != "" ]; then
    echo "num_logical_processors: $cores"
    echo "cores_per_processor:" `expr $cores / $cpucount`
fi
echo "num_processors: $cpucount"
echo "processor_type: $cputype $cpuspeed"

The following code:

if [ -f "${P}" -a -r "${P}" ]; then

is replaced with:

 
PRIV_TEST -f "${P}" -a -r "${P}"
if [ $? -eq 0 ]; then

IRIX

The following code is added:

 
# This function supports privilege testing of attributes of files.
# Used in conjunction with PRIV_CAT.
PRIV_TEST() {
  test "$@"
}

The following code:

if [ -f "${P}" -a -r "${P}" ]; then

is replaced with:

 
PRIV_TEST -f "${P}" -a -r "${P}"
if [ $? -eq 0 ]; then

Tru64

The following code is added:

 
# This function supports privilege testing of attributes of files.
# Used in conjunction with PRIV_CAT.
PRIV_TEST() {
  test "$@"
}

The following code is added:

 
echo 'model:' `hwmgr get attr -cat platform -a name 2>/dev/null | grep name | sed 's/name =//'`

The following code:

if [ -f "${P}" -a -r "${P}" ]; then

is replaced with:

 
PRIV_TEST -f "${P}" -a -r "${P}"
if [ $? -eq 0 ]; then

OpenVMS

The following code:

WRITE SYS$OUTPUT "hostname: ", F$LOGICAL("TCPIP$INET_HOST")
WRITE SYS$OUTPUT "dns_domain: ", F$LOGICAL("TCPIP$INET_DOMAIN")

is replaced with:

 
WRITE SYS$OUTPUT "hostname: ", F$TRNLNM("TCPIP$INET_HOST")
WRITE SYS$OUTPUT "dns_domain: ", F$TRNLNM("TCPIP$INET_DOMAIN")

UnixWare

The following code is added:

 
# This function supports privilege testing of attributes of files.
# Used in conjunction with PRIV_CAT.
PRIV_TEST() {
  test "$@"
}

The following code:

if [ -f "${P}" -a -r "${P}" ]; then

is replaced with:

 
PRIV_TEST -f "${P}" -a -r "${P}"
if [ $? -eq 0 ]; then

FreeBSD

The following code is added:

 
# This function supports privilege testing of attributes of files.
# Used in conjunction with PRIV_CAT.
PRIV_TEST() {
  test "$@"
}

The following code:

if [ -f "${P}" -a -r "${P}" ]; then

is replaced with:

 
PRIV_TEST -f "${P}" -a -r "${P}"
if [ $? -eq 0 ]; then

Linux

The following code is added:

 
# This function supports privilege testing of attributes of files.
# Used in conjunction with PRIV_CAT.
PRIV_TEST() {
  test "$@"
}

The following code:

if [ -f "${P}" -a -r "${P}" ]; then

is replaced with:

 
PRIV_TEST -f "${P}" -a -r "${P}"
if [ $? -eq 0 ]; then

The following code:

opteron_cores=`echo ${opteron_number} | cut -c2`
if [ ${opteron_cores} -eq 2 ]; then
    cores_hint=2
    siblings=2
elif [ ${opteron_cores} -eq 3 ]; then
    cores_hint=4
    siblings=4
elif [ ${opteron_cores} -eq 4 ]; then
    cores_hint=6
    siblings=6
fi

is replaced with:

 
# 4 digit processor code. The second digit is the most significant
opteron_cores=`echo ${opteron_number} | cut -c2`
if [ ${opteron_cores} -eq 1 ]; then
    if [ `echo ${opteron_number} | cut -c1` -eq 4 ]; then
        if [ `echo ${opteron_number} | cut -c3` -lt 6 ]; then
            # 41xx where xx is lower than 60 are 4 cores
            core_hint=4
            sibling=4
        else
            # 41xx where xx is higher than 60 are 6 cores                    
            cores_hint=6
            siblings=6
        fi
     elif [ `echo ${opteron_number} | cut -c1` -eq 6 ]; then
         if [ `echo ${opteron_number} | cut -c3` -lt 6 ]; then
            # 61xx where xx is lower than 60 are 8 cores
            core_hint=8
            sibling=8
        else
            # 61xx where xx is higher than 60 are 12 cores                    
            core_hint=12
            sibling=12
        fi
    fi
elif [ ${opteron_cores} -eq 2 ]; then
     # x2xx are all dual-core
    cores_hint=2
    siblings=2
elif [ ${opteron_cores} -eq 3 ]; then
    # x3xx are all quad core
    cores_hint=4
    siblings=4
elif [ ${opteron_cores} -eq 4 ]; then
    # x4xx are 6 cores.
    cores_hint=6
    siblings=6
fi

OpenBSD

The following code is added:

 
# This function supports privilege testing of attributes of files.
# Used in conjunction with PRIV_CAT.
PRIV_TEST() {
  test "$@"
}

The following code:

if [ -f "${P}" -a -r "${P}" ]; then

is replaced with:

 
PRIV_TEST -f "${P}" -a -r "${P}"
if [ $? -eq 0 ]; then

NetBSD

The following code is added:

 
# This function supports privilege testing of attributes of files.
# Used in conjunction with PRIV_CAT.
PRIV_TEST() {
  test "$@"
}

The following code:

if [ -f "${P}" -a -r "${P}" ]; then

is replaced with:

 
PRIV_TEST -f "${P}" -a -r "${P}"
if [ $? -eq 0 ]; then

HP-UX

The following code is added:

 
# This function supports privilege testing of attributes of files.
# Used in conjunction with PRIV_CAT.
PRIV_TEST() {
  test "$@"
}

The following code:

if [ -f "${P}" -a -r "${P}" ]; then

is replaced with:

 
PRIV_TEST -f "${P}" -a -r "${P}"
if [ $? -eq 0 ]; then

The following code:

if [ "`getconf SC_KERNEL_BITS`" == "64" ]; then

is replaced with:

 
if [ "`getconf SC_KERNEL_BITS`" = "64" ]; then

VMware ESXi

The following code is added:

 
# This function supports privilege testing of attributes of files.
# Used in conjunction with PRIV_CAT.
PRIV_TEST() {
  test "$@"
}

The following code:

if [ -f "${P}" -a -r "${P}" ]; then

is replaced with:

 
PRIV_TEST -f "${P}" -a -r "${P}"
if [ $? -eq 0 ]; then

Discovery command changes from 8.1.1.1 to 8.2

Click this link to show the discovery command changes from 8.1.1.1 to 8.2

UnixWare

The following code is added:

 
PRIV_CAT() {
    cat "$@"
}

The following code is added:

 
echo 'os_arch:' `uname -p 2>/dev/null`

The following code:

if [ -f %(path)s -a -r %(path)s ]; then
    echo "begin content:"
    sed -e 's/[^[:print:][:blank:]]//g' %(path)s
fi

is replaced with:

 
P=%(path)s
if [ -f "${P}" -a -r "${P}" ]; then
    echo "begin content:"
    PRIV_CAT "${P}" | sed -e 's/[^[:print:][:blank:]]//g'
fi

The following code:

echo 'begin df:'
df -k 2>/dev/null
echo 'end df'

is replaced with:

 
echo begin df:
df -lk 2>/dev/null
echo end df:
echo begin mount:
if [ -f /etc/mnttab ]; then
    cat /etc/mnttab
fi
echo end mount:
echo begin xtab:
if [ -f /etc/xtab ]; then
    cat /etc/xtab
fi
echo end xtab:
echo begin smbclient:
smbclient -N -L localhost
echo end smbclient:
echo begin smbconf:
configfile=`smbstatus -v 2>/dev/null | grep "using configfile" | awk '{print $4;}'`
if [ "$configfile" != "" ]; then
    if [ -f $configfile ]; then
        cat $configfile
    fi
fi
echo end smbconf:

Tru64

The following code is added:

 
PRIV_CAT() {
    cat "$@"
}

The following code:

ihn=`hostname 2>/dev/null | cut -f1 -d.`

is replaced with:

 
ihn=`hostname 2>/dev/null`

The following code:

echo 'os:' `uname -sr`

is replaced with:

 
echo 'os:' `uname -sr 2>/dev/null`

The following code is added:

 
echo 'os_arch:' `uname -p 2>/dev/null`

The following code:

if [ -f %(path)s -a -r %(path)s ]; then
    echo "begin content:"
    sed -e 's/[^[:print:][:blank:]]//g' %(path)s
fi

is replaced with:

 
P=%(path)s
if [ -f "${P}" -a -r "${P}" ]; then
    echo "begin content:"
    PRIV_CAT "${P}" | sed -e 's/[^[:print:][:blank:]]//g'
fi

The following code:

echo 'begin df:'
df -k 2>/dev/null 
echo 'end df'

is replaced with:

 
echo begin df:
df -k -t nonfs,nfsv3 2>/dev/null
echo end df:
echo begin mount:
mount 2>/dev/null
echo end mount:
echo begin xtab:
if [ -f /etc/xtab ]; then
    cat /etc/xtab
fi
echo end xtab:
echo begin smbclient:
smbclient -N -L localhost
echo end smbclient:
echo begin smbconf:
configfile=`smbstatus -v 2>/dev/null | grep "using configfile" | awk '{print $4;}'`
if [ "$configfile" != "" ]; then
    if [ -f $configfile ]; then
        cat $configfile
    fi
fi
echo end smbconf:

The following code:

ifconfig -a

is replaced with:

 
ifconfig -av

Solaris

The following code is added:

 
PRIV_CAT() {
    cat "$@"
}

The following code:

ihn=`hostname 2>/dev/null | cut -f1 -d.`

is replaced with:

 
ihn=`hostname 2>/dev/null`

The following code:

echo 'os:' `uname -sr`

is replaced with:

 
echo 'os:' `uname -sr 2>/dev/null`

The following code is added:

 
echo 'os_arch:' `uname -p 2>/dev/null`

The following code:

if [ -d %(path)s -a -r %(path)s ]; then
    (cd %(path)s; ls -al)

is replaced with:

 
P=%(path)s
if [ -d "${P}" -a -r "${P}" ]; then
    (cd "${P}"; ls -al)

The following code:

if [ -f %(path)s -a -r %(path)s ]; then
    echo "begin content:"
    if [ -x /usr/xpg4/bin/sed ]; then
        /usr/xpg4/bin/sed -e 's/[^[:print:][:blank:]]//g' %(path)s
    else
        cat %(path)s
    fi
fi

is replaced with:

 
P=%(path)s
if [ -f "${P}" -a -r "${P}" ]; then
    echo "begin content:"
    if [ -x /usr/xpg4/bin/sed ]; then
        PRIV_CAT "${P}" | /usr/xpg4/bin/sed -e 's/[^[:print:][:blank:]]//g'
    else
        PRIV_CAT "${P}"
    fi
fi

The following code:

if [ -f %(path)s ]; then
    echo "ls:" `ls -ld %(path)s`
    if [ -x `which digest` ]; then
        echo "md5sum:" `digest -a md5 %(path)s 2>/dev/null`
    fi
else

is replaced with:

 
P=%(path)s
if [ -f "${P}" ]; then
    echo "ls:" `ls -ld "${P}"`
    if [ -x `which digest` ]; then
        echo "md5sum:" `digest -a md5 "${P}" 2>/dev/null`
    fi
else

The following code:

/usr/sbin/smbios -i 1 2>/dev/null 

is replaced with:

 
/usr/sbin/smbios -t SMB_TYPE_SYSTEM 2>/dev/null

The following code:

physical=""
[...]
physical=`grep -c "cpus, instance" /tmp/tideway.$$`
[...]
if [ "$physical" = "" -o "$physical" = "0" ]; then
    physical=`/usr/sbin/psrinfo -p 2>/dev/null`
    if [ "$physical" = "" ]; then
        physical=`kstat cpu_info 2>/dev/null | grep chip_id | sort | uniq | wc -l`
        if [ $physical -eq 0 ]; then
            echo "__discovery_errors: Unable to determine physical processor count"
            physical=""
        fi
    fi
fi

is replaced with:

 
physical=`/usr/sbin/psrinfo -p 2>/dev/null`
if [ "$physical" = "" ]; then
    physical=`kstat cpu_info 2>/dev/null | grep chip_id | sort | uniq | wc -l`
    if [ $physical -eq 0 ]; then
        physical=""
    fi
fi
[...]
if [ "$physical" = "" -o "$physical" = "0" ]; then
    physical=`grep -c "cpus, instance" /tmp/tideway.$$`
fi

The following code:

cores=`kstat cpu_info 2>/dev/null | grep core_id | sort | uniq | wc -l`

is replaced with:

 
cores=`kstat cpu_info 2>/dev/null | grep -w core_id | sort | uniq | wc -l`

The following code:

echo 'begin df:'
df -k -F ufs 2>/dev/null 
df -k -F vxfs 2>/dev/null  | grep -v Filesystem
df -k -F zfs 2>/dev/null  | grep -v Filesystem
df -k -F pcfs 2>/dev/null  | grep -v Filesystem
df -k -F cachefs 2>/dev/null  | grep -v Filesystem
echo 'end df'

is replaced with:

 
echo begin df:
df -lk 2>/dev/null 
echo end df:
echo begin mount:
if [ -f /etc/mnttab ]; then
    cat /etc/mnttab
fi
echo end mount:
echo begin xtab:
if [ -f /etc/xtab ]; then
    cat /etc/xtab
fi
echo end xtab:
echo begin smbclient:
smbclient -N -L localhost
echo end smbclient:
echo begin smbconf:
configfile=`smbstatus -v 2>/dev/null | grep "using configfile" | awk '{print $4;}'`
if [ "$configfile" != "" ]; then
    if [ -f $configfile ]; then
        cat $configfile
    fi
fi
echo end smbconf:

OpenBSD

The following code is added:

 
PRIV_CAT() {
    cat "$@"
}

The following code:

ihn=`hostname 2>/dev/null | cut -f1 -d.`

is replaced with:

 
ihn=`hostname 2>/dev/null`

The following code is added:

 
echo 'os_arch:' `uname -m 2>/dev/null`

The following code:

if [ -f %(path)s -a -r %(path)s ]; then
    echo "begin content:"
    sed -e 's/[^[:print:][:blank:]]//g' %(path)s
fi

is replaced with:

 
P=%(path)s
if [ -f "${P}" -a -r "${P}" ]; then
    echo "begin content:"
    PRIV_CAT "${P}" | sed -e 's/[^[:print:][:blank:]]//g'
fi

The following code:

echo 'begin df:'
df -k 2>/dev/null 
echo 'end df'

is replaced with:

 
echo begin df:
df -lk 2>/dev/null
echo end df:
echo begin mount:
mount 2>/dev/null
echo end mount:
echo begin xtab:
if [ -f /etc/xtab ]; then
    cat /etc/xtab
fi
echo end xtab:
echo begin smbclient:
smbclient -N -L localhost
echo end smbclient:
echo begin smbconf:
configfile=`smbstatus -v 2>/dev/null | grep "using configfile" | awk '{print $4;}'`
if [ "$configfile" != "" ]; then
    if [ -f $configfile ]; then
        cat $configfile
    fi
fi
echo end smbconf:

NetBSD

The following code is added:

 
PRIV_CAT() {
    cat "$@"
}

The following code:

ihn=`hostname 2>/dev/null | cut -f1 -d.`

is replaced with:

 
ihn=`hostname 2>/dev/null`

The following code is added:

 
echo 'os_arch:' `uname -m 2>/dev/null`

The following code:

if [ -f %(path)s -a -r %(path)s ]; then
    echo "begin content:"
    sed -e 's/[^[:print:][:blank:]]//g' %(path)s
fi

is replaced with:

 
P=%(path)s
if [ -f "${P}" -a -r "${P}" ]; then
    echo "begin content:"
    PRIV_CAT "${P}" | sed -e 's/[^[:print:][:blank:]]//g'
fi

The following code:

echo 'begin df:'
df -k 2>/dev/null 
echo 'end df'

is replaced with:

 
echo begin df:
df -lk 2>/dev/null
echo end df:
echo begin mount:
mount 2>/dev/null
echo end mount:
echo begin xtab:
if [ -f /etc/xtab ]; then
    cat /etc/xtab
fi
echo end xtab:
echo begin smbclient:
smbclient -N -L localhost
echo end smbclient:
echo begin smbconf:
configfile=`smbstatus -v 2>/dev/null | grep "using configfile" | awk '{print $4;}'`
if [ "$configfile" != "" ]; then
    if [ -f $configfile ]; then
        cat $configfile
    fi
fi
echo end smbconf:

Mac OS X

The following code is added:

 
PRIV_CAT() {
    cat "$@"
}

The following code is added:

 
echo 'os_arch:' `uname -p 2>/dev/null`

The following code:

if [ -f %(path)s -a -r %(path)s ]; then
    echo "begin content:"
    sed -e 's/[^[:print:][:blank:]]//g' %(path)s
fi

is replaced with:

 
P=%(path)s
if [ -f "${P}" -a -r "${P}" ]; then
    echo "begin content:"
    PRIV_CAT "${P}" | sed -e 's/[^[:print:][:blank:]]//g'
fi

The following code:

echo 'begin df:'
df -k 2>/dev/null 
echo 'end df'

is replaced with:

 
echo begin df:
df -lk 2>/dev/null
echo end df:
echo begin mount:
mount 2>/dev/null
echo end mount:
echo begin xtab:
if [ -f /etc/xtab ]; then
    cat /etc/xtab
fi
echo end xtab:
echo begin smbclient:
smbclient -N -L localhost
echo end smbclient:
echo begin smbconf:
configfile=`smbstatus -v 2>/dev/null | grep "using configfile" | awk '{print $4;}'`
if [ "$configfile" != "" ]; then
    if [ -f $configfile ]; then
        cat $configfile
    fi
fi
echo end smbconf:

Linux

The following code is added:

 
PRIV_CAT() {
  cat "$@"
}

The following code:

ihn=`hostname 2>/dev/null | cut -f1 -d.`

is replaced with:

 
ihn=`hostname 2>/dev/null`

The following code is removed:

 
if [ "$os" = "" -a -x /usr/bin/vmware ]; then
    os=`/usr/bin/vmware -v 2>/dev/null | grep ESX`
fi

The following code is added:

 
echo 'os_arch:' `uname -m 2>/dev/null`

The following code:

if [ -f %(path)s -a -r %(path)s ]; then
    echo "begin content:"
    sed -e 's/[^[:print:][:blank:]]//g' %(path)s
fi

is replaced with:

 
P=%(path)s
if [ -f "${P}" -a -r "${P}" ]; then
    echo "begin content:"
    PRIV_CAT "${P}" | sed -e 's/[^[:print:][:blank:]]//g'
fi

The following code, and a number of similar instances:

if [ "${cputype:0:2}" = "PA" ]; then

are replaced in this manner:

 
if [ "`echo $cputype | cut -c-2`" = "PA" ]; then

The following code:

PRIV_ESXCFG /usr/sbin/esxcfg-info > ${file} 2>/dev/null

is replaced with:

 
PRIV_ESXCFG /usr/sbin/esxcfg-info --hardware > ${file} 2>/dev/null

The following code, and a number of similar instances:

physical=`grep "Num Packages." ${file} | sed -e "s/[Changes to Discovery Commands^0-9]//g"`

are replaced in this manner:

 
physical=`grep "Num Packages\." ${file} | sed -e "s/[Changes to Discovery Commands^0-9]//g"`

The following code:

logical=`grep "Num Cores." ${file} | sed -e "s/[Changes to Discovery Commands^0-9]//g"`

is replaced with:

 
logical=`grep "Num Cores." ${file} | head -n 1 | sed -e "s/[Changes to Discovery Commands^0-9]//g"`

The following code:

    PRIV_DMIDECODE /usr/sbin/dmidecode 2>/dev/null | awk '/DMI type 1,/,/^Handle 0x0*[2-9]+0*/ {
        if( $1 ~ /Manufacturer:/ ) { sub(".*Manufacturer: *","");  printf( "vendor: %s\n", $0 ); }
        if( $1 ~ /Vendor:/ ) { sub(".*Vendor: *","");  printf( "vendor: %s\n", $0 ); }
        if( $1 ~ /Product/ && $2 ~ /Name:/ ) { sub(".*Product Name: *",""); printf( "model: %s\n", $0 ); }
        if( $1 ~ /Product:/ ) { sub(".*Product: *",""); printf( "model: %s\n", $0 ); }
        if( $1 ~ /Serial/ && $2 ~ /Number:/ ) { sub(".*Serial Number: *",""); printf( "serial: %s\n", $0 ); }
    }'

is replaced with:

 
    PRIV_DMIDECODE /usr/sbin/dmidecode 2>/dev/null | sed -n '/DMI type 1,/,/^Handle 0x0/p' | awk '
    $1 ~ /Manufacturer:/ { sub(".*Manufacturer: *",""); printf( "vendor: %s\n", $0); } 
    $1 ~ /Vendor:/ { sub(".*Vendor: *",""); printf( "vendor: %s\n", $0 ); } 
    $1 ~ /Product/ && $2 ~ /Name:/ { sub(".*Product Name: *",""); printf( "model:  %s\n", $0 ); } 
    $1 ~ /Product:/ { sub(".*Product: *",""); printf( "model: %s\n", $0 ); } 
    $1 ~ /Serial/ && $2 ~ /Number:/ { sub(".*Serial Number: *",""); printf( "serial: %s\n", $0 ); } ' 

The following code:

    PRIV_HWINFO /usr/sbin/hwinfo --bios 2>/dev/null | awk 'BEGIN { flag=0; }
    /System Info: #[0-9]/ { flag=1; }
    /Manufacturer:/ { if (flag) { sub(".*Manufacturer: *","");  gsub( "\"", ""); printf( "vendor: %s\n", $0 ); } }
    /Product:/ { if (flag) { sub(".*Product: *","");  gsub( "\"", ""); printf( "model: %s\n", $0 ); } }
    /Serial:/ { if (flag) { sub(".*Serial: *","");  gsub( "\"", ""); printf( "serial: %s\n", $0 ); } }
    /Board Info: #[0-9]/ { exit; }'

is replaced with:

 
    PRIV_HWINFO /usr/sbin/hwinfo --bios 2>/dev/null | sed -n '/System Info:/,/Info:/p' | awk ' 
    $1 ~ /Manufacturer:/ { sub(".*Manufacturer: *",""); gsub( "\"", ""); printf( "vendor: %s\n", $0 ); } 
    $1 ~ /Product:/ { sub(".*Product: *",""); gsub( "\"", ""); printf( "model: %s\n", $0 ); } 
    $1 ~ /Serial:/ { sub(".*Serial: *",""); gsub( "\"", ""); printf( "serial: %s\n", $0 ); }' 

The following code is added:

 
if [ -f /proc/sysinfo -a -d /proc/dasd ]; then
    echo "vendor:" `egrep '^Manufacturer:' /proc/sysinfo | awk '{print $2;}'`
    type=`egrep '^Type:' /proc/sysinfo | awk '{print $2;}'`
    model=`egrep '^Model:' /proc/sysinfo | awk '{print $2;}'`
    echo "model: $type-$model"
    echo "zlinux_seqence:" `egrep '^Sequence Code:' /proc/sysinfo | awk '{print $3;}'`
    echo "zlinux_vm_name:" `egrep '^VM00 Name:' /proc/sysinfo | awk '{print $3;}'`
    echo "zlinux_vm_software:" `egrep '^VM00 Control Program:' /proc/sysinfo | awk '{print $4, $5;}'`
fi

The following code:

echo 'begin df:'
df -k -x nfs 2>/dev/null
echo 'end df'

is replaced with:

 
echo begin df:
df -lk 2>/dev/null
echo end df:
echo begin mount:
mount 2>/dev/null
echo end mount:
echo begin xtab:
if [ -s /var/lib/nfs/xtab ]; then
    cat /var/lib/nfs/xtab
else
    if [ -s /var/lib/nfs/etab ]; then
        cat /var/lib/nfs/etab
    fi
fi
echo end xtab:
echo begin smbclient:
smbclient -N -L localhost
echo end smbclient:
echo begin smbconf:
configfile=`smbstatus -v 2>/dev/null | grep "using configfile" | awk '{print $4;}'`
if [ "$configfile" != "" ]; then
    if [ -f $configfile ]; then
        cat $configfile
    fi
fi
echo end smbconf:

IRIX

The following code is added:

 
PRIV_CAT() {
  cat "$@"
}

The following code:

ihn=`hostname | cut -f1 -d.`

is replaced with:

 
ihn=`hostname 2>/dev/null`

The following code is added:

 
echo 'os_arch:' `uname -p 2>/dev/null`

The following code:

if [ -f %(path)s -a -r %(path)s ]; then
    echo "begin content:"
    sed -e 's/[^[:print:][:blank:]]//g' %(path)s
fi

is replaced with:

 
P=%(path)s
if [ -f "${P}" -a -r "${P}" ]; then
    echo "begin content:"
    PRIV_CAT "${P}" | sed -e 's/[^[:print:][:blank:]]//g'
fi

The following code:

echo 'begin df:'
df -k 2>/dev/null 
echo 'end df'

is replaced with:

 
echo begin df:
df -lk 2>/dev/null
echo end df:
echo begin mount:
mount 2>/dev/null
echo end mount:
echo begin xtab:
if [ -f /etc/xtab ]; then
    cat /etc/xtab
fi
echo end xtab:
echo begin smbclient:
smbclient -N -L localhost
echo end smbclient:
echo begin smbconf:
configfile=`smbstatus -v 2>/dev/null | grep "using configfile" | awk '{print $4;}'`
if [ "$configfile" != "" ]; then
    if [ -f $configfile ]; then
        cat $configfile
    fi
fi
echo end smbconf:

HPUX

The following code is added:

 
PRIV_CAT() {
  cat "$@"
}

The following code:

ihn=`hostname 2>/dev/null | cut -f1 -d.`

is replaced with:

 
ihn=`hostname 2>/dev/null`

The following code:

echo 'os:' `uname -sr`
echo 'series:' `uname -m | cut -d/ -f2 | cut -c1`

is replaced with:

 
echo 'os:' `uname -sr 2>/dev/null`
echo 'series:' `uname -m 2>/dev/null | cut -d/ -f2 | cut -c1`

The following code is added:

 
arch=""
case "`uname -m 2>/dev/null`" in
    ia64)
        arch="ia64" ;;
    9000/31?)
        arch="m68000" ;;
    9000/[34]??)
        arch="m68k" ;;
    9000/[678][0-9][0-9])
        case "`getconf SC_CPU_VERSION`" in
            523)
                arch="pa-risc 1.0" ;;
            528)
                arch="pa-risc 1.1" ;;
            532)
                if [ "`getconf SC_KERNEL_BITS`" == "64" ]; then
                    arch="pa-risc 2.0w"
                else
                    arch="pa-risc 2.0n"
                fi
                ;;
        esac ;;
esac
if [ "$arch" != "" ]; then
    echo "os_arch: $arch"
fi

The following code:

if [ -f %(path)s -a -r %(path)s ]; then
    echo "begin content:"
    sed -e 's/[^[:print:][:blank:]]//g' %(path)s
fi

is replaced with:

 
P=%(path)s
if [ -f "${P}" -a -r "${P}" ]; then
    echo "begin content:"
    PRIV_CAT "${P}" | sed -e 's/[^[:print:][:blank:]]//g'
fi

FreeBSD

The following code is added:

 
PRIV_CAT() {
cat "$@"
}

The following code:

ihn=`hostname 2>/dev/null | cut -f1 -d.`

is replaced with:

 
ihn=`hostname 2>/dev/null`

The following code is added:

 
echo 'os_arch:' `uname -m 2>/dev/null`

The following code:

if [ -f %(path)s -a -r %(path)s ]; then
    echo "begin content:"
    sed -e 's/[^[:print:][:blank:]]//g' %(path)s
fi

is replaced with:

 
P=%(path)s
if [ -f "${P}" -a -r "${P}" ]; then
    echo "begin content:"
    PRIV_CAT "${P}" | sed -e 's/[^[:print:][:blank:]]//g'
fi

The following code:

echo 'begin df:'
df -k 2>/dev/null 
echo 'end df'

is replaced with:

 
echo begin df:
df -lk 2>/dev/null
echo end df:
echo begin mount:
mount 2>/dev/null
echo end mount:
echo begin xtab:
if [ -f /etc/xtab ]; then
    cat /etc/xtab
fi
echo end xtab:
echo begin smbclient:
smbclient -N -L localhost
echo end smbclient:
echo begin smbconf:
configfile=`smbstatus -v 2>/dev/null | grep "using configfile" | awk '{print $4;}'`
if [ "$configfile" != "" ]; then
    if [ -f $configfile ]; then
        cat $configfile
    fi
fi
echo end smbconf:

The following code:

 
echo 'begin df:'
bdf 2>/dev/null 
echo 'end df'

is replaced with:

 
echo begin df:
bdf -l 2>/dev/null
echo end df:
echo begin mount:
mount -p 2>/dev/null
echo end mount:
echo begin xtab:
if [ -f /etc/xtab ]; then
    cat /etc/xtab
fi
echo end xtab:
echo begin smbclient:
smbclient -N -L localhost
echo end smbclient:
echo begin smbconf:
configfile=`smbstatus -v 2>/dev/null | grep "using configfile" | awk '{print $4;}'`
if [ "$configfile" != "" ]; then
    if [ -f $configfile ]; then
        cat $configfile
    fi
fi
echo end smbconf:

The following code:

par_id=`/usr/sbin/parstatus -w 2> /dev/null | sed 's/.*The local partition number is \([0-9]*\)\..*/\1/'`

is replaced with:

 
par_id=`/usr/sbin/parstatus -w 2> /dev/null | grep "The local partition number is" | sed 's/.*The local partition number is \([0-9]*\)\..*/\1/'`

The following code:

echo 'begin lanadmin:'
for interface in $interfaces
do
  echo Begin-interface: $interface
  PRIV_LANADMIN lanadmin -x $interface 2>/dev/null | grep -v 'NO LINK'
  lanscan -ia 2>/dev/null | awk "\$2==\"$interface\" {printf(\"Hardware Address: %s\\n\", \$1);}"
  echo End-interface: $interface
done
echo 'end lanadmin:'

is replaced with:

 
echo 'begin lanscan:'
lanscan -pia 2>/dev/null
echo 'end lanscan:'
echo 'begin lanadmin:'
for interface in `lanscan -p 2>/dev/null`
do
  echo begin-interface: $interface
  PRIV_LANADMIN lanadmin -x $interface 2>/dev/null | grep -v 'NO LINK'
  echo end-interface: $interface
done
echo 'end lanadmin:'

AIX

The following code is added:

 
PRIV_CAT() {
cat "$@"
}

The following code:

ihn=`hostname 2>/dev/null | cut -f1 -d.`

is replaced with:

 
ihn=`hostname 2>/dev/null`

The following code is added:

 
echo 'os_arch:' `uname -p 2>/dev/null`

The following code:

if [ -f %(path)s -a -r %(path)s ]; then
    echo "begin content:"
    sed -e 's/[^[:print:][:blank:]]//g' %(path)s
fi

is replaced with:

 
P=%(path)s
if [ -f "${P}" -a -r "${P}" ]; then
    echo "begin content:"
    PRIV_CAT "${P}" | sed -e 's/[^[:print:][:blank:]]//g'
fi

The following code:

echo 'begin df:'
df -k  2>/dev/null 
echo 'end df'

is replaced with:

 
echo begin df:
if [ -x /usr/sysv/bin/df ]; then
    /usr/sysv/bin/df -lg 2>/dev/null
fi
echo end df:
echo begin mount:
mount 2>/dev/null
echo end mount:
echo begin xtab:
if [ -f /etc/xtab ]; then
    cat /etc/xtab
fi
echo end xtab:
echo begin smbclient:
smbclient -N -L localhost
echo end smbclient:
echo begin smbconf:
configfile=`smbstatus -v 2>/dev/null | grep "using configfile" | awk '{print $4;}'`
if [ "$configfile" != "" ]; then
    if [ -f $configfile ]; then
        cat $configfile
    fi
fi
echo end smbconf:

The following code is added:

 
for i in `lsdev -Cc adapter -F name:status:type | grep "^fcs"`
do
    adapter_name=`echo $i | cut -f1 -d:`
    adapter_status=`echo $i | cut -f2 -d:`
    adapter_type=`echo $i | cut -f3 -d:`
    if [ $adapter_status = "Available" ]; then
        echo begin lscfg-vl-$adapter_name:
        lscfg -vl $adapter_name
        echo end lscfg-vl-$adapter_name:
        echo begin lslpp-$adapter_name:
        lslpp -L devices.pci.$adapter_type.* | grep devices.pci.$adapter_type
        echo end lslpp-$adapter_name:
    fi
done

Discovery command changes from 8.1.1 to 8.1.1.1

There have been no discovery command changes from 8.1.1 to 8.1.1.1.

Discovery command changes from 8.1 to 8.1.1

There have been no discovery command changes from 8.1 to 8.1.1.

Discovery command changes from 7.3.1 to 8.1

Click this link to show the discovery command changes from 7.3.1 to 8.1

Windows

The only discovery command changes come from the addition of the getServices commands to Windows discovery.

The commands added are:

Run locally
SC \\<ip-addr> QUERYEX state= all
Run remotely via psexec, remcom or rcmd
SC QUERYEX state= all
WMI query
SELECT * FROM Win32_Service

Discovery command changes from 7.3 to 7.3.1

Click this link to show the discovery command changes from 7.3 to 7.3.1

Tru64

The getPackageList command is changed. This fixes bug 12481. The following code:

# getPackageList
echo --- START setld
PRIV_SETLD setld -l 2>/dev/null
echo --- END setld

is replaced with:

# getPackageList
echo --- START setld
PRIV_SETLD setld -i 2>/dev/null
echo --- END setld
Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Feb 02, 2012

    I think there's some new code documentation missing.....
    For Solaris....

    echo begin fcinfo_hba:
    PRIV_FCINFO fcinfo hba-port
    echo end fcinfo_hba: