Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

my SysAudit script does not report Partition Table

Status
Not open for further replies.

robwall7

IS-IT--Management
Sep 25, 2001
17
0
0
US
I downloaded SysAudit from and the logging of the Partition Table is commented out due to some error problem in the script. Does anyone know where I can get a version of SysAudit that will log the Partition Table? I hate to think I will need to log it manually.

Robert
unix sys admin just long enough to be dangerous
 
I don't know what code is in "SysAudit", but for partition table information you can use something like:

#!/usr/bin/ksh

disk_list()
{
format <<-EOF | grep &quot;^ *[0-9][0-9]*\. &quot; | awk '{print $2}'
EOF
}
disk_info()
{
format -d $1 <<-EOF | sed '1,/format> /d' | sed 's/format> //g'
veri
quit
EOF
}

for dev in `disk_list`
do
echo &quot;Disk info for ${dev}&quot;
disk_info ${dev} 2>/dev/null
done

#End of file

Regards,

Carlos Almeida


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top