- Page restrictions apply
- Added by Duncan Tweed, last edited by Duncan Tweed on Apr 17, 2009 (view change)
|
Space Search
Table of Contents
|
The following sections show the discovery command changes between Tideway Foundation versions. The following changes are not shown:
Changes that are limited to comments have been excluded. Discovery Command Changes from 7.2 to 7.2.1Removal of the Linux hostid attributeThe hostid attribute has been removed from nodes representing Linux hosts. The Linux discovery script has had the following line removed: echo 'hostid:' `hostid` The hostid attribute is removed from existing Linux hosts in the upgrade procedure. The changed discovery script must be merged before any scan take place or the hostid attribute will be reset. The following warning is shown in the upgrade section:
Re-directing errors to /dev/nullIn the UNIX discovery script, errors in the output from the lputil and hbacmd commands are redirected to /dev/null max_count=`echo 0 | lputil count` becomes max_count=`echo 0 | lputil count 2>/dev/null` and for WWPN in `PRIV_HBACMD hbacmd ListHBAs | awk '/Port WWN/ {print $4;}'`
becomes for WWPN in `PRIV_HBACMD hbacmd ListHBAs 2>/dev/null | awk '/Port WWN/ {print $4;}'`
Discovery Command Changes from 7.1.7 to 7.2Re-directing stderr to /dev/nullIn order to prevent error messages being interpreted as valid discovery command results, a global change was made to add the the following to each executed command 2>/dev/null/ This change was made to all platforms, apart from Windows. Moving control of privilege escalation method into Platform init blocks.Prior to 7.2, if a particular command benefited from being executed with escalated privileges then this had to be handled withing each discovery command. This has been improved in 7.2 by wrapping all commands that require escalated privileges in a function, defined in the init block, that can be managed centrally. See Viewing or Disabling the Scripts Used for more details. AIXThe init block now has the following added: # replace the following PRIV_XXX functions with one that has the path to a
# program to run the commands as super user, e.g. sudo. For example
# PRIV_LSOF() {
# /usr/bin/sudo "$@"
# }
# lsof requires superuser privileges to display information on processes
# other than those running as the current user
PRIV_LSOF() {
"$@"
}
# This function supports running privileged commands from patterns
PRIV_RUNCMD() {
"$@"
}
# lslpp requires superuser privileges to list all installed packages
PRIV_LSLPP() {
"$@"
}
The following individual commands have been modified to use this
FreeBSDThe init block now has the following added: # replace the following PRIV_XXX functions with one that has the path to a
# program to run the commands as super user, e.g. sudo. For example
# PRIV_LSOF() {
# /usr/bin/sudo "$@"
# }
# lsof requires superuser privileges to display information on processes
# other than those running as the current user
PRIV_LSOF() {
"$@"
}
# This function supports running privileged commands from patterns
PRIV_RUNCMD() {
"$@"
}
# dmidecode requires superuser privileges to read data from the system BIOS
PRIV_DMIDECODE() {
"$@"
}
HPUXThe init block now has the following added: # replace the following PRIV_XXX functions with one that has the path to a
# program to run the commands as super user, e.g. sudo. For example
# PRIV_LSOF() {
# /usr/bin/sudo "$@"
# }
# lsof requires superuser privileges to display information on processes
# other than those running as the current user
PRIV_LSOF() {
"$@"
}
# This function supports running privileged commands from patterns
PRIV_RUNCMD() {
"$@"
}
# lanadmin requires superuser privileges to display any interface speed
# and negotiation settings
PRIV_LANADMIN() {
"$@"
}
# swlist requires superuser privileges to list all installed packages
PRIV_SWLIST() {
"$@"
}
IRIXThe init block now has the following added: # replace the following PRIV_XXX functions with one that has the path to a
# program to run the commands as super user, e.g. sudo. For example
# PRIV_LSOF() {
# /usr/bin/sudo "$@"
# }
# lsof requires superuser privileges to display information on processes
# other than those running as the current user
PRIV_LSOF() {
"$@"
}
# This function supports running privileged commands from patterns
PRIV_RUNCMD() {
"$@"
}
LinuxThe init block now has the following added: # replace the following PRIV_XXX functions with one that has the path to a
# program to run the commands as super user, e.g. sudo. For example
# PRIV_LSOF() {
# /usr/bin/sudo "$@"
# }
# lsof requires superuser privileges to display information on processes
# other than those running as the current user
PRIV_LSOF() {
"$@"
}
# This function supports running privileged commands from patterns
PRIV_RUNCMD() {
"$@"
}
# dmidecode requires superuser privileges to read data from the system BIOS
PRIV_DMIDECODE() {
"$@"
}
# hwinfo requires superuser privileges to read data from the system BIOS
PRIV_HWINFO() {
"$@"
}
# mii-tool requires superuser privileges to display any interface speed
# and negotiation settings
PRIV_MIITOOL() {
"$@"
}
# ethtool requires superuser privileges to display any interface speed
# and negotiation settings
PRIV_ETHTOOL() {
"$@"
}
# netstat requires superuser privileges to display process identifiers (PIDs)
# for ports opened by processes not running as the current user
PRIV_NETSTAT() {
"$@"
}
# lputil requires superuser privileges to display any HBA information
PRIV_LPUTIL() {
"$@"
}
# hbacmd requires superuser privileges to display any HBA information
PRIV_HBACMD() {
"$@"
}
# Xen's xe command requires superuser privileges
PRIV_XE(){
"$@"
}
MACOSXThe init block now has the following added: # replace the following PRIV_XXX functions with one that has the path to a
# program to run the commands as super user, e.g. sudo. For example
# PRIV_LSOF() {
# /usr/bin/sudo "$@"
# }
# lsof requires superuser privileges to display information on processes
# other than those running as the current user
PRIV_LSOF() {
"$@"
}
# This function supports running privileged commands from patterns
PRIV_RUNCMD() {
"$@"
}
NETBSDThe init block now has the following added: # replace the following PRIV_XXX functions with one that has the path to a
# program to run the commands as super user, e.g. sudo. For example
# PRIV_LSOF() {
# /usr/bin/sudo "$@"
# }
# lsof requires superuser privileges to display information on processes
# other than those running as the current user
PRIV_LSOF() {
"$@"
}
# This function supports running privileged commands from patterns
PRIV_RUNCMD() {
"$@"
}
# dmidecode requires superuser privileges to read data from the system BIOS
PRIV_DMIDECODE() {
"$@"
}
OPENBSDThe init block now has the following added: # replace the following PRIV_XXX functions with one that has the path to a
# program to run the commands as super user, e.g. sudo. For example
# PRIV_LSOF() {
# /usr/bin/sudo "$@"
# }
# lsof requires superuser privileges to display information on processes
# other than those running as the current user
PRIV_LSOF() {
"$@"
}
# This function supports running privileged commands from patterns
PRIV_RUNCMD() {
"$@"
}
# dmidecode requires superuser privileges to read data from the system BIOS
PRIV_DMIDECODE() {
"$@"
}
SolarisThe init block now has the following added: # replace the following PRIV_XXX functions with one that has the path to a
# program to run the commands as super user, e.g. sudo. For example
# PRIV_LSOF() {
# /usr/bin/sudo "$@"
# }
# lsof requires superuser privileges to display information on processes
# other than those running as the current user
PRIV_LSOF() {
"$@"
}
# This function supports running privileged commands from patterns
PRIV_RUNCMD() {
"$@"
}
# dmidecode requires superuser privileges to read data from the system BIOS
# on Solaris X86 platforms only
PRIV_DMIDECODE() {
"$@"
}
# ifconfig requires superuser privileges to display the MAC address of each
# interface
PRIV_IFCONFIG() {
"$@"
}
# ndd requires superuser privileges to display any interface speed
# and negotiation settings
PRIV_NDD() {
"$@"
}
# /usr/ucb/ps requires superuser privileges to display full command line
# information (without this, command lines will be limited to 80 characters).
# This affects Solaris 10 and Solaris 8 & 9 with certain patches
PRIV_PS() {
"$@"
}
# lputil requires superuser privileges to display any HBA information
PRIV_LPUTIL() {
"$@"
}
# hbacmd requires superuser privileges to display any HBA information
PRIV_HBACMD() {
"$@"
}
# pfiles requires superuser privileges to display open port information
# for processes not running as the current user
PRIV_PFILES() {
"$@"
}
TRU64The init block now has the following added: # replace the following PRIV_XXX functions with one that has the path to a
# program to run the commands as super user, e.g. sudo. For example
# PRIV_LSOF() {
# /usr/bin/sudo "$@"
# }
# lsof requires superuser privileges to display information on processes
# other than those running as the current user
PRIV_LSOF() {
"$@"
}
# This function supports running privileged commands from patterns
PRIV_RUNCMD() {
"$@"
}
UNIXWAREThe init block now has the following added: # replace the following PRIV_XXX functions with one that has the path to a
# program to run the commands as super user, e.g. sudo. For example
# PRIV_LSOF() {
# /usr/bin/sudo "$@"
# }
# lsof requires superuser privileges to display information on processes
# other than those running as the current user
PRIV_LSOF() {
"$@"
}
# This function supports running privileged commands from patterns
PRIV_RUNCMD() {
"$@"
}
Enabling capture of command exit statusIn 7.2 the ability to capture the exit status of commands has been re-introduced. See Viewing or Disabling the Scripts Used for more details. All UNIX discovery scripts have had their init blocks extended in the same way. AIX FreeBSD HPUX IRIX Linux MacOSX NetBSD OpenBSD Solaris TRU64 Unixwarestty kill ^U
# - some systems have the kill character set to @ - changed
# it to something harmless
if [ -w /tmp ]
then
# use a /tmp file to capture stderr
TW_CAPTURE_FILE=/tmp/tideway_status_$$
export TW_CAPTURE_FILE
rm -f $TW_CAPTURE_FILE
tw_capture(){
TW_NAME=$1
shift
echo begin cmd_status_err_$TW_NAME >>$TW_CAPTURE_FILE
$@ 2>>$TW_CAPTURE_FILE
RETURN_VAL=$?
echo end cmd_status_err_$TW_NAME >>$TW_CAPTURE_FILE
echo cmd_status_$TW_NAME=$RETURN_VAL >>$TW_CAPTURE_FILE
return $RETURN_VAL
}
tw_report(){
if [ -f $TW_CAPTURE_FILE ]
then
cat $TW_CAPTURE_FILE 2>/dev/null
rm -f $TW_CAPTURE_FILE 2>/dev/null
fi
}
else
# can't write to /tmp - do not capture anything
tw_capture(){
shift
$@ 2>/dev/null
}
tw_report(){
echo "cmd_status_err_status_unavailable=Unable to write to /tmp"
}
fi
Bug 10096 - CPU speed units incorrectly capitalised.7.1.7cpuspeed="$cpuspeed Mhz" 7.2cpuspeed="$cpuspeed MHz" Improve parsing of AIX LPAR 6 hosts7.1.7
7.2
Bug 10395 - AIX process list truncation issue7.1.7if [ `uname -v` -ge 6 ]; then
COLUMNS=2047 ps -eo pid,ppid,uid,user,wpar,args | grep Global | sed -e 's/Global //'
else
COLUMNS=2047 ps -eo pid,ppid,uid,user,args
fi
7.2if [ `uname -v` -ge 6 ]; then
ps -eo pid,ppid,uid,user,wpar,args | egrep "Global|PID" | sed -e 's/Global //'
else
# pipe through cat to remove tty columns limit
ps -eo pid,ppid,uid,user,args | cat
fi
Bug 9920 - Discovery fails due to long line in disco script on some hostsReformatting of awk script that gets uptime. On some platforms the single long line was overflowing a buffer and causing it to fail. 7.1.7uptime | awk '{ if ( $4 ~ /day/ ) { print "uptime:", $3; z = split($5,t,":"); printf( "uptimeSeconds: %d\n", ($3 * 86400) + (t[1] * 3600) + (t[2] * 60) ); } else { print "uptime: 0"; z = split($3,t,":"); print "uptimeSeconds:", (t[1] * 3600) + (t[2] * 60); } }'
7.2uptime | awk '
{
if ( $4 ~ /day/ ) {
print "uptime:", $3;
z = split($5,t,":");
printf( "uptimeSeconds: %d\n", ($3 * 86400) + (t[1] * 3600) + (t[2] * 60) );
} else {
print "uptime: 0";
z = split($3,t,":");
print "uptimeSeconds:", (t[1] * 3600) + (t[2] * 60);
}
}'
Bug 9967 - FreeBSD hosts can sometimes return a blank hostnameIn this scenario we report the hostname to be localhost. 7.1.7ihn=`hostname 2>/dev/null` 7.2ihn=`hostname 2>/dev/null`
if [ "$ihn" = "" ]; then
# Its possible for the host name to be blank on FreeBSD ...
ihn=localhost
fi
Enhance HP-UX Platform Script to identify nPars.7.1.7hostid=`uname -i 2>/dev/null`
if [ "$hostid" = "" ]; then
hostid=`getconf CS_MACHINE_IDENT 2>/dev/null`
fi
7.2hostid=`getconf CS_MACHINE_IDENT 2>/dev/null`
partition_id=`getconf CS_PARTITION_IDENT 2>/dev/null`
if [ "$partition_id" != "" ]; then
echo 'partition_id:' $partition_id
if [ "$hostid" = "" ]; then
hostid="$partition_id"
fi
if [ "$partition_id" != "$hostid" ]; then
hostid="$hostid:$partition_id"
fi
Multiple improvements to HPUX hardware discovery.The following bugs were contained in this change block:
7.1.7KERNEL=/stand/vmunix
MEMDEV=/dev/mem
if [ -r $MEMDEV ]; then
if [ "$kernel_bits" -eq 64 ]; then
ADB="adb64 -k"
else
ADB="adb -k"
fi
echo "begin hpux_chip_info:"
cat <<EOF > /tmp/tw_chip_info.$$
cpu_revision_number/X
cpu_arch_is_2_0/D
cpu_arch_is_1_1/D
cpu_arch_is_1_0/D
cpu_is_a_PCXS/D
cpu_is_a_PCXT/D
cpu_is_a_PCXT_PRIME/D
cpu_is_a_PCXL/D
cpu_is_a_PCXL2/D
cpu_is_a_PCXU/D
cpu_is_a_PCXU_PLUS/D
cpu_is_a_PCXW/D
cpu_is_a_PCXW_PLUS/D
cpu_is_a_PIRANHA/D
cpu_is_a_MAKO/D
itick_per_usec/D
processor_count/D
EOF
cat /tmp/tw_chip_info.$$ | $ADB $KERNEL $MEMDEV 2>/dev/null | egrep -v ':$'
rm -f /tmp/tw_chip_info.$$
echo "end hpux_chip_info"
if [ "$OSVER" -ge 1100 ]; then
PAGES=`echo phys_mem_pages/D | $ADB $KERNEL $MEMDEV 2>/dev/null | egrep -v '^phys_mem_pages:$' | cut -f2`
else
PAGES=`echo physmem/D | $ADB $KERNEL $MEMDEV 2>/dev/null | egrep -v '^physmem:$' | cut -f2`
fi
eval $(grep "define *PAGESIZE" /usr/include/limits.h | sed 's/# *define *//;s/ /=/;s/ *//g')
if [ -z "$PAGESIZE" ]; then
echo "__discovery_errors: HP-UX getDeviceInfo(): PAGESIZE not explicitly defined; assuming 4 MB"
PAGESIZE=4096
fi
echo "ram:" `echo "scale=1; $PAGES * $PAGESIZE" | bc`
else
echo "__discovery_errors: HP-UX getDeviceInfo(): could not read kernel memory"
echo "begin hpux_cpu_info:"
echo "cpu_count:" `ioscan -kC processor | grep processor | wc -l`
echo "cpu_version:" `getconf CPU_VERSION`
if [ "$OSVER" -ge 1100 ]; then
typeset -i2 bin
bin=`getconf CPU_CHIP_TYPE`
typeset -i16 hex
hex=2#`echo $bin | sed -e 's/2#//' -e 's/.....$//'`
echo "cpu_chip_type:" `echo $hex | cut -c4-`
else
echo 'cpu_model:' `model 2>/dev/null`
fi
echo "end hpux_cpu_info"
RAM=`echo "selclass qualifier memory;infolog" | cstm 2>/dev/null | grep 'System Total'`
if [ "$RAM" != "" ]; then
echo $RAM | sed -e 's/^.*(\(.*\))[^0-9]*\([0-9]*\).*$/ram: \2\1/'
fi
if [ "$RAM" = "" ]; then #cstm not installed or do not have suitable credentials, try another method
# first try to check the Ignite-UX manifest
MANIFEST_PATH="/var/opt/ignite/local/manifest/manifest"
if [ -r $MANIFEST_PATH ]; then
RAM=`grep "Main Memory" $MANIFEST_PATH | cut -d: -f2 | sed 's/ //g'`
if [ "$RAM" != "" ]; then
echo "ram: $RAM"
fi
fi
fi
if [ "$RAM" = "" ]; then #cannot read manifest or cannot extract RAM info, try to read syslog
SYSLOG_PATH="/var/adm/syslog/syslog.log"
if [ -r $SYSLOG_PATH ]; then
RAM=`grep "Physical" $SYSLOG_PATH | sed 's/^.*Physical: *\([0-9]*\).*\([GMK]\)bytes.*$/\1\2B/'`
if [ "$RAM" != "" ]; then
echo "ram: $RAM"
fi
fi
fi
fi
7.2# machinfo indicates Itanium based system
if [ -x /usr/contrib/bin/machinfo ]; then
tpc=1 # Assume single thread per core
MACHINFO=/tmp/tideway-machinfo-$$
/usr/contrib/bin/machinfo > $MACHINFO
nlp=`cat $MACHINFO | grep "Number of CPUs =" | cut -d= -f2 | tr -d '[:cntrl:]'`
type=`cat $MACHINFO | grep "processor model:" | cut -d: -f2 | cut -c18- | tr -d '[:cntrl:]'`
speed=`cat $MACHINFO | grep "Clock speed =" | cut -d= -f2 | tr -d '[:cntrl:]'`
ram=`cat $MACHINFO | egrep "^Memory = " | cut -d= -f2 | awk '{print$1;}'`
rm -f $MACHINFO
# Work out cores per processor using series info
cpp=1
echo $type | grep "9000 series" 1>/dev/null 2>&1
if [ $? -eq 0 ]; then
# 9000 series, Montecito processor = dual core
cpp=2
fi
echo $type | grep "9100 series" 1>/dev/null 2>&1
if [ $? -eq 0 ]; then
# 9100 series, Montvale processor = dual core
cpp=2
fi
np=`expr $nlp / $cpp`
echo num_logical_processors: $nlp
echo num_processors: $np
echo processor_type: $type $speed
echo processor_speed: $speed
echo cores_per_processor: $cpp
echo threads_per_core: $tpc
echo ram: $ram MB
else
cores=0
ram=0
if [ -x /usr/sbin/parstatus ]; then
par_id=`/usr/sbin/parstatus -w 2> /dev/null | 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/^[^:]*:[^:]*:[^:]*: *\([0-9]*\).*/\1/'`; do
cores=$((cores + i))
done
for i in `echo "$par_status" | sed 's/^[^:]*:[^:]*:[^:]*:[^:]*: *\([0-9]*\).*/\1/'`; do
ram=$((ram + i))
done
ram=`echo "$ram" '* 1048576 * 1024' | bc`
echo ram: $ram
fi
fi
if [ $cores -eq 0 ]; then
cores=`/usr/sbin/ioscan -kC processor 2>/dev/null | grep processor | wc -l`
fi
if [ "$OSVER" -ge 1100 ]; then
typeset -i2 bin
bin=`getconf CPU_CHIP_TYPE`
typeset -i16 hex
hex=2#`echo $bin | sed -e 's/2#//' -e 's/.....$//'`
chip_type=`echo $hex | cut -c4-`
fi
if [ "$chip_type" -eq 14 ]; then
cores_per_processor=2
else
cores_per_processor=1
fi
echo cores_per_processor: $cores_per_processor
echo num_logical_processors: $cores
echo "begin hpux_cpu_info:"
echo "cpu_count:" `expr $cores / $cores_per_processor`
echo "cpu_version:" `getconf CPU_VERSION`
if [ "$chip_type" ]; then
echo "cpu_chip_type:" $chip_type
else
echo 'cpu_model:' `model 2>/dev/null`
fi
KERNEL=/stand/vmunix
MEMDEV=/dev/mem
if [ -r $MEMDEV ]; then
if [ "$kernel_bits" -eq 64 ]; then
ADB="adb64 -k"
else
ADB="adb -k"
fi
echo itick_per_usec/D | $ADB $KERNEL $MEMDEV 2>/dev/null | egrep -v ':$'
fi
echo "end hpux_cpu_info"
if [ $ram -eq 0 ]; then
ram=`echo "selclass qualifier memory;infolog" | cstm 2>/dev/null | grep 'System Total'`
if [ "$ram" != "" ]; then
echo $ram | sed -e 's/^.*(\(.*\))[^0-9]*\([0-9]*\).*$/ram: \2\1/'
fi
if [ "$ram" = "" ]; then #cstm not installed or do not have suitable credentials, try another method
# first try to check the Ignite-UX manifest
MANIFEST_PATH="/var/opt/ignite/local/manifest/manifest"
if [ -r $MANIFEST_PATH ]; then
ram=`grep "Main Memory" $MANIFEST_PATH | cut -d: -f2 | sed 's/ //g'`
if [ "$ram" != "" ]; then
echo "ram: $ram"
fi
fi
fi
if [ "$ram" = "" ]; then #cannot read manifest or cannot extract RAM info, try to read syslog
SYSLOG_PATH="/var/adm/syslog/syslog.log"
if [ -r $SYSLOG_PATH ]; then
ram=`grep "Physical" $SYSLOG_PATH | sed 's/^.*Physical: *\([0-9]*\).*\([GMK]\)bytes.*$/\1\2B/'`
if [ "$ram" != "" ]; then
echo "ram: $ram"
fi
fi
fi
fi
fi
Improve HP-UX interface discovery on both Itanium and PA-RISC.7.1.7lanscan -ia | grep $interface | awk '{printf("Hardware Address: %s\n", $1);}'
7.2 lanscan -ia 2>/dev/null | awk "\$2==\"lan$interface\" {printf(\"Hardware Address: %s\\n\", \$1);}"
Implemented missing IRIX platform commandsIfconfig, netstat, ps and showprods commands were not implemented in 7.1.7 and have been added. ifconfigecho --- START ifconfig ifconfig -av echo 'begin netstat-ian:' netstat -ian echo 'end netstat-ian:' echo --- END ifconfig netstatecho --- START netstat netstat -an -f inet 2>/dev/null echo --- END netstat psecho --- START ps ps -eo pid,ppid,uid,user,args 2>/dev/null echo --- END ps showprodsecho --- START showprods showprods -M -1 echo --- END showprods Bug 10975 - IRIX path should include /usr/bsd and /usr/etc7.1.7PATH=/bin:/usr/bin:/sbin:/usr/sbin 7.2PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/etc:/usr/bsd IRIX OS discovery improvement7.1.7echo 'os:' `uname -sr` 7.2echo 'os:' `uname -s 2>/dev/null` `uname -R | awk '{print $2;}'`
Bug 8166 - hostid not reported on IRIXThis bug fix extended to include discovering more than just hostid, greatly improving hardware information on IRIX. 7.1.7Not implemented 7.2echo vendor: `sysconf | egrep '^VENDOR' | sed -e 's/VENDOR//' `
echo model: `sysconf | egrep '^HW_NAME' | sed -e 's/HW_NAME//'`
echo hostid: `sysconf | egrep '^HOSTID' | sed -e 's/HOSTID//'`
echo serial: `sysconf | egrep '^HW_SERIAL' | sed -e 's/HW_SERIAL//'`
num_procs=`sysconf | egrep '^NUM_PROCESSORS' | sed -e 's/NUM_PROCESSORS//'`
echo num_processors: $num_procs
echo num_logical_processors: $num_procs
hinv -t cpu | head -1 | sed -e 's/^CPU/processor_type/'
echo processor_speed: `hinv -c processor | head -1 | awk '{print $2;}'`
echo cores_per_processor: 1
echo threads_per_core: 1
echo ram: `hinv -t memory | grep "Main memory size" | awk '{print $4;}'` MB
Linux hostname, two bug-fixes
7.1.7ihn=`hostname 2>/dev/null` 7.2ihn=`hostname --short 2>/dev/null`
if [ $? -ne 0 -o "$ihn" = "localhost" ]; then
ihn=`hostname 2>/dev/null`
fi
Improving discovery of SuSe and Ubuntu Linux7.1.7if [ "$os" = "" -a -f /etc/debian_version ]; then
ver=`cat /etc/debian_version`
os="Debian Linux $ver"
fi
if [ "$os" = "" -a -f /etc/SuSE-release ]; then
os=`cat /etc/SuSE-release | head -1`
fi
7.2if [ "$os" = "" -a -f /etc/SuSE-release ]; then
os=`head -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"
fi
Linux on POWER, fixes to cpu speed discovery7.1.7if [ "$procarch" = "ppc64" ]; then
# POWER6 is dual core
cores=2
physical=`expr $logical / $cores`
cputype=`egrep '^cpu' /proc/cpuinfo | sort -u | head -1 | awk '{print $3;}' | sed -e 's/,//'`
7.2if [ "$procarch" = "ppc64" ]; then
# POWER6 is dual core
cores=2
physical=`expr $logical / $cores`
cpuspeed=`egrep '^clock' /proc/cpuinfo | sort -u | head -1 | awk '{print $3;}' | sed -e 's/\.[0-9]*//'`
cputype=`egrep '^cpu' /proc/cpuinfo | sort -u | head -1 | awk '{print $3;}' | sed -e 's/,//'`
cputype="PowerPC $cputype $cpuspeed"
Bug 9346 - Xen Server installation report incorrect Memory and CPU Info7.1.7Not implemented. 7.2if [ -f /opt/xensource/bin/xe ]; then
print=0
if [ -x /opt/xensource/bin/xe ]; then
# /proc/cpuinfo reports incorrectly for Xen domains, use "xe"
# However, this can only tell us the logical processor count, not
# physical, core count or threads per core
XE=/opt/xensource/bin/xe
cores=""
threads_per_core=""
physical=""
cpu_list=`PRIV_XE $XE host-cpu-list 2>/dev/null`
if [ $? -eq 0 ]; then
logical=`echo "$cpu_list" | grep uuid | wc -l`
uuid=`echo "$cpu_list" | grep uuid | head -1 | cut -f2 -d: | awk '{print $1;}'`
cputype=`PRIV_XE $XE host-cpu-param-get uuid=$uuid param-name=modelname`
cpuspeed=`PRIV_XE $XE host-cpu-param-get uuid=$uuid param-name=speed`
# /proc/meminfo reports incorrectly for Xen domains, use "xe"
uuid=`PRIV_XE $XE host-list | grep uuid | head -1 | cut -f2 -d: | awk '{print $1;}'`
ram=`PRIV_XE $XE host-param-get uuid=$uuid param-name=memory-total`
print=1
fi
fi
fi
Bug 4819 - Linux NIC Discovery script does not counter for ethtool failing but mii-tool suceeding.7.1.7if [ "$ETHTOOL" != "" ]; then
echo 'begin ethtool:'
for i in `ifconfig -a 2>/dev/null | egrep '^[a-z]' | awk '{print $1;}'`
do
echo Begin-interface: $i
PRIV_ETHTOOL $ETHTOOL $i 2>/dev/null
echo End-interface: $i
done
echo 'end ethtool:'
else
if [ "$MIITOOL" != "" ]; then
echo 'begin mii-tool:'
for i in `ifconfig -a | egrep '^[a-z]' | awk '{print $1;}'`
do
echo Begin-interface: $i
PRIV_MIITOOL $MIITOOL -v $i 2>/dev/null
echo End-interface: $i
done
echo 'end mii-tool:'
fi
7.2if [ "$ETHTOOL" != "" ]; then
echo 'begin ethtool:'
for i in `ifconfig -a 2>/dev/null | egrep '^[a-z]' | awk '{print $1;}'`
do
echo Begin-interface: $i
PRIV_ETHTOOL $ETHTOOL $i 2>/dev/null
echo End-interface: $i
done
echo 'end ethtool:'
fi
if [ "$MIITOOL" != "" ]; then
echo 'begin mii-tool:'
for i in `ifconfig -a | egrep '^[a-z]' | awk '{print $1;}'`
do
echo Begin-interface: $i
PRIV_MIITOOL $MIITOOL -v $i 2>/dev/null
echo End-interface: $i
done
echo 'end mii-tool:'
fi
Bug 10759 - Linux discovery script 'ps' output limited to 4096 chars7.1.7 ps -eo pid,ppid,uid,user,cmd --no-headers --cols 4096 7.2ps -eo pid,ppid,uid,user,cmd --no-headers -ww 2>/dev/null Bug 10730 - Mac OS X ps command breaks on Leopard due to use of g flag7.1.7ps -agxwww -o pid,ppid,uid,logname,command 7.2ps -axwww -o pid,ppid,uid,logname,command 2>/dev/null Bug 10222 - Duplicated processor string in Solaris7.1.7cpucount=`grep -c "cpu, instance" /tmp/tideway.$$`
if [ $cpucount -gt 0 ]; then
echo "num_processors:" ${cpucount}
cputype=`awk 'BEGIN { s=0 } /brand-string/ { s=1 } /value=/ { if (s) { s=0; print $0 } }' /tmp/tideway.$$ | sed -e "s/value='//" -e "s/'\$//"`
echo "processor_type:" ${cputype}
fi
7.2if [ $cpucount -gt 0 ]; then
cputype=`awk 'BEGIN { s=0 } /brand-string/ { s=1 } /value=/ { if (s) { print $0; exit } }' /tmp/tideway.$$ | sed -e "s/value='//" -e "s/'\$//"`
fi
Various changes to cpu discovery on Solaris
7.1.7 # Solaris SPARC
if [ -x /usr/platform/`uname -m`/sbin/prtdiag ]; then
platdir=/usr/platform/`uname -m`/sbin
else
platdir=/usr/platform/`uname -i`/sbin
fi
if [ -x $platdir/prtdiag ]; then
echo 'begin prtdiag:'
$platdir/prtdiag -v
echo 'end prtdiag'
fi
7.2 # Solaris SPARC - use prtdiag if possible
run_prtdiag=1
if [ -x /usr/bin/zonename ]; then
# Solaris 10 or later, check this is the global zone before attempting
# to run prtdiag
if [ `/usr/bin/zonename 2>/dev/null` != "global" ]; then
# Non global zone, don't run prtdaig
run_prtdiag=0
fi
fi
if [ $run_prtdiag -eq 1 ]; then
if [ -x /usr/platform/`uname -m`/sbin/prtdiag ]; then
platdir=/usr/platform/`uname -m`/sbin
else
platdir=/usr/platform/`uname -i`/sbin
fi
if [ -x $platdir/prtdiag ]; then
echo 'begin prtdiag:'
$platdir/prtdiag -v 2>/dev/null
echo 'end prtdiag'
fi
fi
if [ -x $platdir/eeprom ]; then
serial=`$platdir/eeprom 2>/dev/null | grep system-board-serial | cut -f2 -d= | grep -v 'data not available'`
if [ "$serial" != "" ]; then
echo "serial: $serial"
fi
fi
fi
physical=`/usr/sbin/psrinfo -p 2>/dev/null`
if [ "$physical" = "" ]; then
physical=`kstat cpu_info | grep chip_id | sort | uniq | wc -l`
if [ $physical -eq 0 ]; then
physical=1
fi
fi
logical=`/usr/sbin/psrinfo -v 2>/dev/null | grep -i virtual | wc -l`
if [ $logical -eq 0 ]; then
logical=$physical
fi
cores_pp=`kstat -p -m cpu_info -s '/(chip|core)_id/' | awk '{cpu=$2; getline; core=$2; print cpu, core}' | sort | uniq | cut -f1 -d\ | sort | uniq -c | awk '{print $1}' | sort | tail -1`
cores=`kstat cpu_info 2>/dev/null | grep core_id | sort | uniq | wc -l`
if [ "$cores" -eq 0 ]; then
cores=$physical
cores_pp=1
fi
speed=`kstat cpu_info 2>/dev/null | grep clock_MHz | sort | uniq | awk '{print $2;}'`
if [ "$cputype" = "" ]; then
cputype=`kstat cpu_info | grep implementation | sort | uniq | awk '{print $2;}' | head -1`
cputype="$cputype ${speed}MHz"
fi
echo 'processor_type:' $cputype
echo 'processor_speed:' $speed
echo 'num_processors:' $physical
echo 'num_logical_processors:' $logical
echo 'cores:' $cores
echo 'cores_per_processor:' $cores_pp
echo 'threads_per_core:' `expr $logical / $cores`
Pfiles command removed (Solaris)It is still possible to call pfiles from patterns if required 7.1.7pfiles /proc/* 7.2Removed Unixware discovery updated and extendedSeveral enhancements to unixware discovery have been made including adding netstat, lsof and pkginfo commands 7.1.7
7.2
Discovery Command Changes from 7.1.6 to 7.1.7There have been no discovery command changes in this release. Discovery Command Changes from 7.1.5 to 7.1.6There have been no discovery command changes in this release. Discovery Command Changes from 7.1.1 to 7.1.5There have been no discovery command changes in this release though it should be noted that an additional echo statement is used which creates the new processor_speed attribute. The information was discovered in previous versions but was not used. Discovery Command Changes from 7.1 to 7.1.1There have been no discovery command changes in this release. Discovery Command Changes from 7.0.2 to 7.1The following sections show the discovery command changes from Tideway Foundation version 7.0.2 to version 7.1. New INIT Commands in Tideway Foundation Version 7.1The table below lists the new INIT commands for each platform. AIX FreeBSD HP-UX IRIX Linux NetBSD OpenBSD Solaris Tru64 and Unixwaretw_locale=`locale -a | grep -i en_us | grep -i "utf.*8" | head -n 1 2>/dev/null` LANGUAGE="" if [ "$tw_locale" != "" ]; then LANG=$tw_locale LC_ALL=$tw_locale else LANG=C LC_ALL=C fi export LANG LC_ALL Appleexport LC_ALL=C tw_locale=`locale -a | grep -i en_us | grep -i "utf.*8" | head -n 1 2>/dev/null` LANGUAGE="" if [ "$tw_locale" != "" ]; then LANG=$tw_locale LC_MESSAGES=$tw_locale else LANG=C LC_MESSAGES=C fi export LANG LC_MESSAGES New LPAR commands added to AIX and LinuxThe command changes here are complex, so changed portions of new versions are shown rather then individual changes. The command changes are shown in the table below. AIX Netstatif [ `uname -v` -ge 6 ]; then
if [ `uname -W` -eq 0 ]; then
netstat -an -f inet -@ | grep Global
else
netstat -an -f inet
fi
else
netstat -an -f inet
fi
AIX Ifconfigwparaddrs=""
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
echo 'begin lparstat:'
lparstat -i
echo 'end lparstat'
wparid=0
if [ `uname -v` -ge 6 ]; then
# AIX 6 WPAR support
wparid=`uname -W`
echo "wparid: $wparid"
if [ $wparid -eq 0 -a -x /usr/sbin/lswpar ]; then
echo 'begin lswpar:'
/usr/sbin/lswpar -cqa name,state,type,hostname,directory,key,owner,application
echo 'end lswpar'
fi
fi
if [ -x /usr/sbin/prtconf ]; then
/usr/sbin/prtconf > /tmp/tideway.$$ 2>/dev/null
echo 'model:' `egrep '^System Model:' /tmp/tideway.$$ | cut -f2 -d:`
echo 'kernel:' `egrep '^Kernel Type:' /tmp/tideway.$$ | cut -f2 -d:`
if [ $wparid -eq 0 ]; then
echo 'serial:' `egrep '^Machine Serial Number:' /tmp/tideway.$$ | cut -f2 -d:`
cpucount=`egrep '^Number Of Processors:' /tmp/tideway.$$ | cut -f2 -d:`
cputype=`egrep '^Processor Type:' /tmp/tideway.$$ | cut -f2 -d: | sed -e 's/_/ /'`
cpuspeed=`egrep '^Processor Clock Speed:' /tmp/tideway.$$ | cut -f2 -d:`
fi
rm -f /tmp/tideway.$$
AIX hostinfoelse
lsattr -E -l sys0 -a modelname 2>/dev/null | awk '{print "model: " $2;}'
lsattr -E -l sys0 -a systemid 2>/dev/null | awk '{print "serial: " $2;}'
cpucount=`lscfg -lproc\* | wc -l`
cputype=`lsattr -E -l proc0 -a type 2>/dev/null | awk '{print $2;}' | sed -e 's/_/ /'`
hz=`lsattr -E -l proc0 -a frequency 2>/dev/null | awk '{print $2;}'`
cpuspeed=`expr $hz / 1000000 2>/dev/null`
cpuspeed="$cpuspeed Mhz"
fi
if [ $wparid -eq 0 ]; then
# Get SMT information
smt_enabled=`lsattr -E -l proc0 -a smt_enabled 2>/dev/null | awk '{print $2;}'`
if [ "$smt_enabled" = "true" ]; then
# SMT is enabled, get threads per core
threads_per_core=`lsattr -E -l proc0 -a smt_threads 2>/dev/null | awk '{print $2;}'`
else
# SMT not enabled, one thread per core then
threads_per_core=1
fi
# POWER4 and POWER5 chips are actually dual core but this is not exposed
# to the OS (it simple sees a single physical CPU). In terms of reporting
# the number of logical processors, we can ignore this value ...
cores_per_processor=1
lpppp=`expr $cores_per_processor \* $threads_per_core`
echo "num_logical_processors:" `expr $cpucount \* $lpppp`
echo "threads_per_core:" $threads_per_core
echo "cores_per_processor:" $cores_per_processor
echo "num_processors:" $cpucount
echo "processor_type:" $cputype $cpuspeed
fi
lsattr -E -l sys0 -a realmem 2>/dev/null | awk '{print "ram: " $2 "KB";}'
if [ -x /usr/sbin/hostid ]; then
echo 'hostid:' `/usr/sbin/hostid`
fi
echo 'systemid:' `uname -F`
Linux device infoif [ -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
New PS command on AIXThe PS command on AIX has been changed to support AIX version 6. The command changes are shown in the table below. 7.0.2COLUMNS=2047 ps -eo pid,ppid,uid,user,args 7.1if [ `uname -v` -ge 6 ]; then
COLUMNS=2047 ps -eo pid,ppid,uid,user,wpar,args |
grep Global | sed -e 's/Global //'
else
COLUMNS=2047 ps -eo pid,ppid,uid,user,args
fi
Bug 8380 - HP-UX Truncates Process ListThe PS command on HP-UX has been changed to fix bug 8380. The command changes are shown in the table below. 7.0.2env UNIX95=1 ps -eo pid,ppid,uid,user,args 7.1if [ `uname -r | cut -d. -f2` -eq 11 ]; then
if [ `uname -r | cut -d. -f3` -ge 11 ]; then
PS_X_OPT=x
fi
fi
env UNIX95=1 ps -e${PS_X_OPT}o pid,ppid,uid,user,args
Bug 8571 – MAC Address Not Captured on AIXThe command to capture MAC addresses on AIX has been changed to fix bug 8571. The command changes are shown in the table below. 7.0.2entstat -d ${adapter} | grep "Media Speed" 2>/dev/null
7.1entstat -d ${adapter} | egrep "(Media Speed)|(Hardware Address)" 2>/dev/null
Bug 8573 - MAC Address Not Captured on HP-UXThe command to capture MAC addresses on HP-UX has been changed to fix bug 8571. The command changes are shown in the table below. 7.0.2No command 7.1lanscan -ia | grep $interface | awk '{printf("Hardware Address: %s\\n", $1);}'
Bug 8576 - FreeBSD, OpenBSD, NetBSD in VM Cannnot be Linked - no serial numberThe command to capture VM serial numbers has been changed to fix bug 8576. The command changes are shown in the table below. 7.0.2No command 7.1if [-x /usr/sbin/dmidecode]; then
/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 ~ /Product/ && $2 ~ /Name:/ )
{ sub(".*Product Name: *","");
printf( "model: %s\n", $0 ); }
if( $1 ~ /Serial/ && $2 ~ /Number:/ )
{ sub(".*Serial Number: *","");
printf( "serial: %s\n", $0 ); }
}'
fi
Bug 8728 - A Virtual Machine which hosts other Virtual Machines is not listed as a Virtual MachineThe command to identify Virtual Machines which host other Virtual Machines is not listed as a Virtual Machine. The command changes are shown in the table below. 7.0.2if [ -x /usr/sbin/smbios ]; then
/usr/sbin/smbios -i 1 2>/dev/null | nawk '{
if( $1 ~ /Manufacturer:/ ) { sub(".*Manufacturer:
*",""); printf( "vendor: %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 ); }
}'
fi
7.1if [ -x /usr/sbin/smbios ]; then
/usr/sbin/smbios -i 1 2>/dev/null | nawk '{
if( $1 ~ /Manufacturer:/ ) { sub(".*Manufacturer: *",""); printf( "vendor: %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 ); }
}'
else
if [ -x /usr/sbin/dmidecode ]; then
/usr/sbin/dmidecode 2>/dev/null | nawk '/DMI type 1,/,/^Handle 0x0*[2-9]+0*/ {
if( $1 ~ /Manufacturer:/ ) { sub(".*Manufacturer: *",""); printf( "vendor: %s\n", $0 ); }
if( $1 ~ /Product/ && $2 ~ /Name:/ ) { sub(".*Product Name: *",""); printf( "model: %s\n", $0 ); }
if( $1 ~ /Serial/ && $2 ~ /Number:/ ) { sub(".*Serial
Number: *",""); printf( "serial: %s\n", $0 ); }
}'
fi
fi
Bug 8375 - Two Host Attributes Always Set to Same ValueTwo host attributes have always been set to the same value. This has been fixed to address bug 8375. The command changes are shown in the table below. 7.0.2series=`uname -m | cut -d/ -f2 | cut -c1`
if [ "$series" = 7 ]; then
echo "host_type: Unix Workstation"
elif [ "$series" = 8 ]; then
echo "host_type: Unix Server"
fi
7.1echo 'series:' `uname -m | cut -d/ -f2 | cut -c1` Bug 7637 - Discovery Should Return the Architecture of PackagesDiscovery should always return the architecture of packages. This has been fixed to address bug 7637. The command changes are shown in the table below. 7.0.2No command. 7.1rpm -qa --queryformat 'begin\nname: %{NAME}\nversion: %{VERSION}\nrelease:
%{RELEASE}\narch: %{ARCH}\ninstall_time: %{INSTALLTIME}\nend\n' 2>/dev/null
Improved core detection and ESX memory reportingCore detection and memory reporting has been improved on VMware ESX platforms. The command changes are shown in the table below. 7.0.2# Count cores if possible
cores=`egrep '^core id' /proc/cpuinfo | sort -u | wc -l`
if [ $cores -eq 0 ]; then
# Cores not reported, assume one per processor
cores=1
[...........]
physical=`egrep '^(physical id)|(Physical processor ID)' /proc/cpuinfo | sort -u | wc -l`
if [ $physical -eq 0 ]; then
# Could not determine number of physical CPUs so we fail back on the
# number of logical CPUs divided by the number of cores
physical=`expr ${logical} / ${cores}`
fi
[..............]
cputype=`egrep '^(model name)|^(family)' /proc/cpuinfo | cut -f2 -d: | sed -e 's/^ //' | sort -u`
if [ "$cputype" = "" ]; then
cputype="Unknown"
7.1# Handle the output of /proc/cpuinfo based on processor architecture
if [ `uname -p` = ppc64 ]; then
# POWER6 is dual core
cores=2
physical=`expr $logical / $cores`
cputype=`egrep '^cpu' /proc/cpuinfo | sort -u | head -1 | awk '{print $3;}' | sed -e 's/,//'`
else
# Assume x86 based processor
# Use "cpu cores" if possible
cores=`egrep '^cpu cores' /proc/cpuinfo | head -1 | awk '{print $4}' | tr -d '[:space:]'`
if [ -z $cores ]; then
# Count "core id" if possible
cores=`egrep '^core id' /proc/cpuinfo | sort -u | wc -l`
if [ $cores -eq 0 ]; then
# Cores not reported, assume one per processor
cores=1
fi
fi
# Check if the number of physical CPUs can be determined
physical=`egrep '^(physical id)|(Physical processor ID)' /proc/cpuinfo | sort -u | wc -l`
if [ $physical -eq 0 ]; then
# Could not determine number of physical CPUs so we fail
# back on the number of logical CPUs divided by the number of cores
physical=`expr ${logical} / ${cores}`
fi
cputype=`egrep '^(model name)|^(family)' /proc/cpuinfo | cut -f2 -d: | sed -e 's/^ //' | sort -u`
fi
[..........]
# Did we determine the processor type?
if [ "$cputype" = "" ]; then
cputype="Unknown"
[............]
threads_per_core=`expr ${lpppp} / ${cores}`
cpuspeed=""
ram=`awk '/^MemTotal:/ {print $2 "KB"}' /proc/meminfo 2>/dev/null`
[.............]
print=1
if [ -f /usr/sbin/esxcfg-info ]; then
if [ -x /usr/sbin/esxcfg-info ]; then
# On a VMWare ESX controller, report the *real* hardware information
file=/tmp/tideway-hw-$$
/usr/sbin/esxcfg-info > ${file}
physical=`grep "Num Packages." ${file} | sed -e "s/[Changes to Discovery Commands^0-9]//g"`
logical=`grep "Num Cores." ${file} | sed -e "s/[Changes to Discovery Commands^0-9]//g"`
cores=`expr ${logical} / ${physical}`
total_threads=`grep "Num Threads." ${file} | sed -e "s/[Changes to Discovery Commands^0-9]//g"`
threads_per_core=`expr ${total_threads} / ${logical}`
cpuspeed=`egrep "[cC]puSpeed\." ${file} | head -n 1 | sed 's/[Changes to Discovery Commands^0-9]*//g' | awk '{printf( " @ %.1f GHz\n", $1/1024**3)}'`
cputype=`echo ${cputype} | sed 's/ @.*$//'`
ram=`grep "Physical Mem." ${file} | sed 's/[Changes to Discovery Commands^0-9]*//g'`B
rm -f ${file}
else
print=0
fi
fi
Bug 8687 - UNIX HBA Command Script Contains a Syntax Error if Commands are not InstalledUNIX HBA command script contains a syntax error if the HBA commands are not installed. The command changes are shown in the table below. 7.0.2while [ $i -lt "$max_count" ]
do
echo Board $i
echo 0 | lputil fwlist $i | grep "Functional Firmware" || echo "Functional Firmware: None"
i=`expr $i + 1`
done
7.1if [ $? -eq 0 ]; then
while [ $i -lt "$max_count" ]
do
echo Board $i
echo 0 | lputil fwlist $i | grep "Functional Firmware" || echo "Functional Firmware: None"
i=`expr $i + 1`
done
fi
Discovery Command Changes from 7.0.1 to 7.0.2New Discovery Platform in 7.0.2 - UnixWareUnixWare is a new discovery platform and all of the discovery commands used are shown below. getDeviceInfoecho 'hostname:' `uname -n`
if [ -f /etc/resolv.conf ]; then
echo 'dns_domain:' `awk '/^(domain|search)/ { print $2; exit }' /etc/resolv.conf2>/dev/null`
fi
echo 'os:' `uname -sr`
getFileInfo if [ -f %(path)s ]; then
echo "ls:" `ls -lTd %(path)s`
echo "begin content:"
sed -e 's/[[:cntrl:]]//g' %(path)s
else
echo "FILE NOT FOUND"
fi
getHostInfoecho 'kernel:' `uname -v` echo 'begin df:' df -k 2>/dev/null echo 'end df' getInterfaceListifconfig -a 2>/dev/null getProcessList ps -A -l -o pid,ppid,user,comm /usr/ucb/ps -axww Retrieve patch information on HP-UX 10.20 (defect 8366)7.0.1swlist -l patch 2>/dev/null | egrep -v '^#' | grep applied | awk '{print $1, $2;}'
7.0.2swlist -l product 2>/dev/null | egrep -v '^#' | egrep 'PH[A-Z]{2}_[0-9]+' | awk '{print $1, $2;}'
Retrieve package information on HP-UX 10.20 (defect 8366)7.0.1swlist -l product 2>/dev/null | egrep -v '^#' 7.0.2swlist -l product 2>/dev/null | egrep -v '^#|PH[A-Z]{2}_[0-9]+'
Add support for emlxadm utility for discovering Emulex HBA cards on Linux and Solaris platforms.7.0.1PATH=/usr/sbin/hbanyware:/usr/sbin/lpfc:/usr/sbin/lpfs:$PATH [...] 7.0.2PATH=/usr/sbin/hbanyware:/usr/sbin/lpfc:/usr/sbin/lpfs:/opt/EMLXemlxu/bin:$PATH [...] echo begin emlxadm_get_port_attrs emlxadm devctl -y get_port_attrs wwn echo end emlxadm_get_port_attrs echo begin emlxadm_get_fw_rev emlxadm devctl -y get_fw_rev echo end emlxadm_get_fw_rev Discovery Command Changes from 7.0 to 7.0.1The tables below show the discovery command changes from Tideway Foundation version 7.0 to Tideway Foundation version 7.0.1. Add SMT processor detection to AIX (defect 8057)7.0lsattr -E -l sys0 -a modelname 2>/dev/null | awk '{print "model: " $2 "KB";}'
7.0.1lsattr -E -l sys0 -a modelname 2>/dev/null | awk '{print "model: " $2;}'
lsattr -E -l sys0 -a systemid 2>/dev/null | awk '{print "serial: " $2;}'
[...]
# Get SMT information
smt_enabled=`lsattr -E -l proc0 -a smt_enabled 2>/dev/null | awk '{print $2;}'`
if [ "$smt_enabled" = "true" ]; then
# SMT is enabled, get threads per core
threads_per_core=`lsattr -E -l proc0 -a smt_threads 2>/dev/null | awk '{print $2;}'`
else
# SMT not enabled, one thread per core then
threads_per_core=1
fi
# POWER4 and POWER5 chips are actually dual core but this is not exposed
# to the OS (it simple sees a single physical CPU). In terms of reporting
# the number of logical processors, we can ignore this value ...
cores_per_processor=1
lpppp=`expr $cores_per_processor \* $threads_per_core`
echo "num_logical_processors:" `expr $cpucount \* $lpppp`
echo "threads_per_core:" $threads_per_core
echo "cores_per_processor:" $cores_per_processor
Remove Processor attribute (defect 8074)The following lines were removed from discovery commands in version 7.0.1: AIXecho "processor:" $cpucount '*' $cputype $cpuspeed MacOSXecho "processor: $cpucount * $cputype $cpuspeed" Linuxecho 'processor:' ${physical} '*' ${cputype}
Solarisecho 'processor:' `uname -p`
echo "processor:" ${cpucount} '*' ${cputype}
|
