The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > AIX
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #7 (permalink)  
Old 08-18-2008
pagink pagink is offline
Registered User
  
 

Join Date: Mar 2006
Posts: 10
cd /etc/perf/daily
ls -lrt
topasout -a <<xmwlm>>.file
sort -o <<file>>.csv <<file>>.csv
ftp off and open in nmon

shrug

x='/etc/perf/daily'
cd $x
error=$?
if [[ $error != '0' ]] then
echo "There was an error running script: $0 $(date) please trouble shoot"
echo "This script could not cd to $x to convert the files to the nmon format"
exit
fi
#LIST=$(ls)
LIST=$(ls | grep -v csv | grep xmwlm) #Do not grab any files that have been
#coverted already

for f in $LIST; do
# make the file.csv files here "man topasout" for help
topasout -a $f
sleep 3

# sort the file and set back as the same file name
# so the time stamps are right in nmon
sort -o $f.csv $f.csv
sleep 3

# encode so you can attach the file, and then send it to the exe person
# checking the .forward file if it exists.
uuencode $x/$f.csv $x/$f.csv | mail -s "Your-weekly-$f.csv-file" $USER
error=$?
sleep 3
if [[ $error == '0' ]] then
rm $f.csv
else
echo "There were errors running script $0 at $(date) you will need to clean u
p the CSV files"
fi
done