Re: crs_stat formatting questions and comments

  • From: amit bansal <amit.bansal82@xxxxxxxxx>
  • To: ChrisDavid.Taylor@xxxxxxxxxxxxxxx
  • Date: Wed, 11 Jul 2012 15:40:50 +0530

If you are on 11Gr2, try using
crsctl status res |grep -v "^$"|awk -F "=" 'BEGIN {print " "}
{printf("%s",NR%4 ? $2"|" : $2"\n")}'|sed -e 's/  *, /,/g' -e 's/, /,/g'|\awk
-F "|" 'BEGIN { printf "%-40s%-35s%-20s%-50s\n","Resource Name","Resource
Type","Target ","State" }{ split ($3,trg,",") split ($4,st,",")}{for (i in
trg) {printf "%-40s%-35s%-20s%-50s\n",$1,$2,trg[i],st[i]}}'


http://askdba.org/weblog/2012/06/11gr2-formatted-crsctl-output/

Cheers
Amit
http://askdba.org/weblog/

On Mon, Jul 9, 2012 at 8:48 PM, Taylor, Chris David <
ChrisDavid.Taylor@xxxxxxxxxxxxxxx> wrote:

> So, why does "crs_stat -t" formatting not adjust correctly to my terminal
> size?
> (I'm using the default gnome-terminal in Oracle Linux so any suggestions
> along that line are also appreciated)
>
> $ crs_stat -t
>
> Name           Type           Target    State     Host
> ------------------------------------------------------------
> ora.GRID.dg    ora....up.type ONLINE    ONLINE    rac1
> ora....ER.lsnr ora....er.type ONLINE    ONLINE    rac1
> ora....N1.lsnr ora....er.type ONLINE    ONLINE    rac2
> ora....N2.lsnr ora....er.type ONLINE    ONLINE    rac1
> ora....N3.lsnr ora....er.type ONLINE    ONLINE    rac1
> ora.asm        ora.asm.type   ONLINE    ONLINE    rac1
> ora.cvu        ora.cvu.type   ONLINE    ONLINE    rac1
> ora.gsd        ora.gsd.type   OFFLINE   OFFLINE
> ora....network ora....rk.type ONLINE    ONLINE    rac1
> ..
> ..
>
> I downloaded
> http://blog.enkitec.com/wp-content/uploads/2012/04/crsstat.v1.2.1.zipwritten 
> by Paul Elbow @ Enkitec but it seems (to me) that I should be able
> to set up my default user profile so that crs_stat -t always displays
> correctly but perhaps I'm mistaken.
>
> I don't understand why crs_stat is formatting so badly.
>
> Chris Taylor
>
> "Quality is never an accident; it is always the result of intelligent
> effort."
> -- John Ruskin (English Writer 1819-1900)
>
> Any views and/or opinions expressed herein are my own and do not
> necessarily reflect the views of Ingram Industries, its affiliates, its
> subsidiaries or its employees.
>
>
>
>
> --
> //www.freelists.org/webpage/oracle-l
>
>
>


--
//www.freelists.org/webpage/oracle-l


Other related posts: