I am trying to get output for fcs0 fcs1 side by side with "Date" "FCAdapter_Name" "Last Reset" "DMA_Res" "Adapter_Count" "Command_Res" for all the captured output in fcstat.out
Am I missing any thing below, as its just showing same values all the coloums:
#!/usr/bin/ksh
head -30 fcstat.out |awk -F: '/2014$/ {ts=$0} /fcs/{f1=$1} /DMA Resource/{d1=$2} /Adapter Elements/{a1=$2} /Command Resource/{c1=$2}
/fcs/{f2=$1} /DMA Resource/{d2=$2} /Adapter Elements/{a2=$2} /Command Resource/{print ts,f1,d1,a1,c1,f2,d2,a2,$2}'
File fcstat.out contains below:
Mon Mar 3 18:20:00 EST 2014
fcs0
Seconds Since Last Reset: 114730
FC SCSI Adapter Driver Information
No DMA Resource Count: 78
No Adapter Elements Count: 0
No Command Resource Count: 1309
fcs1
Seconds Since Last Reset: 114730
FC SCSI Adapter Driver Information
No DMA Resource Count: 107
No Adapter Elements Count: 0
No Command Resource Count: 1531
Mon Mar 3 18:30:00 EST 2014
fcs0
Seconds Since Last Reset: 115330
FC SCSI Adapter Driver Information
No DMA Resource Count: 98
No Adapter Elements Count: 0
No Command Resource Count: 9309
fcs1
Seconds Since Last Reset: 115330
FC SCSI Adapter Driver Information
No DMA Resource Count: 807
No Adapter Elements Count: 0
No Command Resource Count: 8531