#!/bin/sh

OUTPUT=ZBX-5168.log

> $OUTPUT
for cmd in					\
  'oslevel -s'					\
  'iostat -d'					\
  'iostat -d 2'					\
  'lsattr -E -l sys0 -a iostat'			\
  'lslpp -l *perfstat*'				\
  'lslpp -f bos.perf.libperfstat'		\
  'lslpp -f bos.perf.perfstat'			\
  'lslpp -w /usr/lib/libperfstat.a'		\
  'lslpp -w /usr/include/libperfstat.h'		\
  'find /usr /opt /lib -name libperfstat.a'	\
  'find /usr /opt -name libperfstat.h'		\
  'ldd perfstat_disk'				\
  'ar -t /usr/lib/libperfstat.a'
do
    echo "running: $cmd"
    (
	echo '------------------------------------------------------------------------------------------'
	echo 'CMD    : '$cmd
	echo 'OUTPUT :'
	sh -f -c "$cmd" 2>&1
    ) >> $OUTPUT
done
echo "done. See the output in $OUTPUT."
