'\" t
.\"     Title: STAT
.\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL-NS Stylesheets v1.76.1 <http://docbook.sf.net/>
.\"      Date: 08/28/2023
.\"    Manual: BRL-CAD
.\"    Source: BRL-CAD
.\"  Language: English
.\"
.TH "STAT" "nged" "08/28/2023" "BRL\-CAD" "BRL\-CAD"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
stat \- report information about objects in a BRL\-CAD database
.SH "SYNOPSIS"
.HP \w'\fBstat\fR\ 'u
\fBstat\fR [\-h] [\-?] [\-r] [\-F\ \fIstring\fR] [\-C\ \fItype1[,type2]\&.\&.\&.\fR] [\-S\ \fItype1[,type2]\&.\&.\&.\fR] [\-o\ \fIfilename\fR] {glob\ pattern}
.SH "OVERVIEW"
.PP
The GED
\fBstat\fR
command reports information about objects in a BRL\-CAD \&.g file\&. It produces a tabular output, with options for user configurability and sorting\&.
.PP
Available types reflect geometry object data:
.PP
.B Table\ \&1.\ \&STAT Information Keys - Core Object Info
.sp -1n
.TS
allbox tab(:);
l l
l l
l l
l l
l l
l l
l l
l l.
T{
name
T}:T{
Object database name (for example, "primitive\&.s")
T}
T{
uses
T}:T{
Number of uses, from instancing
T}
T{
size
T}:T{
Size of database object
T}
T{
refs
T}:T{
Number of times object is referenced by COMBs
T}
T{
flags
T}:T{
Flags
T}
T{
major_type
T}:T{
Object major type
T}
T{
minor_type
T}:T{
Object minor type
T}
T{
type
T}:T{
Object type (short name)
T}
.TE
.PP
In addition to the above standard keys, attributes may also be specified\&. If the desired attribute happens to have the same name as one of the above standard keys, the prefix "attr:" may be added to denote an attribute\&.
.SH "OPTIONS"
.PP
\fB\-h or \-?\fR
.RS 4
Print help and exit\&.
.RE
.PP
\fB\-r\fR
.RS 4
Print raw values, instead of human friendly strings (for example, 5195952 for a size instead of 5\&.0M)\&.
.RE
.PP
\fB\-F\fR
.RS 4
Specify
\fBsearch\fR
style filters to trim down what is reported in
\fBstat\fR
output\&.
.RE
.PP
\fB\-C\fR
.RS 4
Supply a comma separated list of column specifiers or attribute keys to define the table layout for
\fBstat\fR\&.
.RE
.PP
\fB\-S\fR
.RS 4
Supply a comma separated list of column specifiers or attribute keys to specify a sorting priority for
\fBstat\fR\&. Priority is left to right \- sorting will be performed first based on the leftmost specifier, and subsequent specifiers will be used to resolve any ties\&. To reverse the ordering decisions for a given column, prefix the specifier with a "!" character\&.
.RE
.PP
\fB\-o\fR
.RS 4
Write output to
\fIfilename\fR
instead of the command prompt\&.
.RE
.SH "EXAMPLES"
.PP
\fBExample\ \&1.\ \&Default Output\fR
.PP

\fBstat *\fR
.sp
.if n \{\
.RS 4
.\}
.nf
 Object Name             uses   References   Flags   Type     Size 
\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\- \-\-\-\-\-\-\-\- \-\-\-\-\-\-
 Default                 0      1            2       comb     288B 
 NIST_MBE_PMI_7\-10\&.3dm   0      0            2       comb     264B 
 Solid1\&.r                0      1            6       region   280B 
 Solid1\&.r\&.s              0      1            1       brep     859K 
 Solid1_2\&.r              0      1            6       region   280B 
 Solid1_2\&.r\&.s            0      1            1       brep     672K 
 Solid1_3\&.r              0      1            6       region   280B 
 Solid1_3\&.r\&.s            0      1            1       brep     431K 
 Solid1_4\&.r              0      1            6       region   280B 
 Solid1_4\&.r\&.s            0      1            1       brep     771K 
 _GLOBAL                 0      0            8                96B 
      
.fi
.if n \{\
.RE
.\}
.PP
\fBExample\ \&2.\ \&Sorting by Size\fR
.PP

\fBstat \-S "size" *\fR
.sp
.if n \{\
.RS 4
.\}
.nf
 Object Name             uses   References   Flags   Type     Size 
\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\- \-\-\-\-\-\-\-\- \-\-\-\-\-\-
 _GLOBAL                 0      0            8                96B  
 NIST_MBE_PMI_7\-10\&.3dm   0      0            2       comb     264B 
 Solid1_2\&.r              0      1            6       region   280B 
 Solid1_3\&.r              0      1            6       region   280B 
 Solid1\&.r                0      1            6       region   280B 
 Solid1_4\&.r              0      1            6       region   280B 
 Default                 0      1            2       comb     288B 
 Solid1_3\&.r\&.s            0      1            1       brep     431K 
 Solid1_2\&.r\&.s            0      1            1       brep     672K 
 Solid1_4\&.r\&.s            0      1            1       brep     771K 
 Solid1\&.r\&.s              0      1            1       brep     859K 
      
.fi
.if n \{\
.RE
.\}
.PP
\fBExample\ \&3.\ \&Sorting by Size, Reversed Order\fR
.PP

\fBstat \-S "!size" *\fR
.sp
.if n \{\
.RS 4
.\}
.nf
 Object Name             uses   References   Flags   Type     Size 
\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\- \-\-\-\-\-\-\-\- \-\-\-\-\-\-
 Solid1\&.r\&.s              0      1            1       brep     859K 
 Solid1_4\&.r\&.s            0      1            1       brep     771K 
 Solid1_2\&.r\&.s            0      1            1       brep     672K 
 Solid1_3\&.r\&.s            0      1            1       brep     431K 
 Default                 0      1            2       comb     288B 
 Solid1_3\&.r              0      1            6       region   280B 
 Solid1\&.r                0      1            6       region   280B 
 Solid1_2\&.r              0      1            6       region   280B 
 Solid1_4\&.r              0      1            6       region   280B 
 NIST_MBE_PMI_7\-10\&.3dm   0      0            2       comb     264B 
 _GLOBAL                 0      0            8                96B 
      
.fi
.if n \{\
.RE
.\}
.PP
\fBExample\ \&4.\ \&Filtering by Type\fR
.PP

\fBstat \-F "\-type brep" *\fR
.sp
.if n \{\
.RS 4
.\}
.nf
 Object Name    uses   References   Flags   Type   Size 
\-\-\-\-\-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\- \-\-\-\-\-\- \-\-\-\-\-\-
 Solid1\&.r\&.s     0      1            1       brep   859K 
 Solid1_2\&.r\&.s   0      1            1       brep   672K 
 Solid1_3\&.r\&.s   0      1            1       brep   431K 
 Solid1_4\&.r\&.s   0      1            1       brep   771K
      
.fi
.if n \{\
.RE
.\}
.PP
\fBExample\ \&5.\ \&Custom Columns\fR
.PP

\fBstat \-C "name,type,size,color" *\fR
.sp
.if n \{\
.RS 4
.\}
.nf
 Object Name             Type     Size   color       
\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\- \-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\-\-\-\-
 Default                 comb     288B   0/0/0       
 NIST_MBE_PMI_7\-10\&.3dm   comb     264B   0/0/0       
 Solid1\&.r                region   280B   153/231/254 
 Solid1\&.r\&.s              brep     859K               
 Solid1_2\&.r              region   280B   255/206/142 
 Solid1_2\&.r\&.s            brep     672K               
 Solid1_3\&.r              region   280B   237/255/168 
 Solid1_3\&.r\&.s            brep     431K               
 Solid1_4\&.r              region   280B   178/178/178 
 Solid1_4\&.r\&.s            brep     771K               
 _GLOBAL                          96B                
      
.fi
.if n \{\
.RE
.\}

