Managing ObjectStore

ossize: Displaying Database Size

The ossize utility displays the size of the specified database and the sizes of its segments and clusters.

Syntax

ossize [options] pathname 
pathname 
Specifies the file or rawfs database whose size you want to display.

Options
-A 
Displays access control information.

-c 
Displays the type contents for each segment.

-C 
Displays the type contents for the entire database.

-f 
Displays information about the location of all free blocks of storage in a segment.

-L server-log-name
Displays the size of the server log file server-log-name. Meaningful only when ossize is run as an ObjectStore/Single utility.

-n segment-number 
Displays information only about the segment specified as segment-number. segment-number is a data segment number such as those displayed by the -a (/INFO) option. This option is useful with the -o (/DEBUG) and -c (/SEGMENT) options because it reduces the amount of output.

-o (the letter)
Displays a complete table of every object in the segment, showing its offset and size. The data in this table can be useful in debugging. Do not confuse this with the -0 option, described later in this list.

-sn 
Displays the type summaries by the number of instances of each type.

-ss 
Displays the type summaries by the space used by the instances of each type. (This is the default.)

-st 
Displays the type summaries alphabetically by type name.

-0 (zero)

Causes ossize to include the internal segment 0 in type summaries. On UNIX, this implies -c if neither -c nor -C is set.

Description

The ossize utility does not distinguish persistently allocated pointers (that is, pointers to pointers, such as new(db) thing* or new(db) thing*[100]) as separate types. They are displayed together.

The ossize utility displays the comment for each segment that has a comment with a nonzero length. See os_segment::set_comment() in the C++ API Reference.

Schema protection

When developing an application, if you are running this utility on a protected schema database, ensure that the correct key is specified for the environment variables OS_SCHEMA_KEY_LOW and OS_SCHEMA_KEY_HIGH. If the correct key is not specified for these variables, the utility fails. ObjectStore signals

err_schema_key _CT_invalid_schema_key,
"<err-0025-0151> The schema is protected and the key provided did not 
match the one in the schema."

Examples

Rawfs database

$ ossize readers.db
Name: /h/handcuff/2/ebailey/release/library/ug2/readers.db
Size: 57344 bytes (56 Kbytes)
Created: Fri Feb  5 16:23:17 1999
There is 1 root:
Name: readers   Type: Reader
Affiliated databases:
/h/handcuff/2/ebailey/release/library/ug2/books.db
The schema is local.
There is 1 segment:
Data segment 2:
Size: 512 bytes (1 Kbytes)
Segment 2 has 1 cluster:
Cluster 0 size: 512 bytes (1 Kbytes)

-o

Specifying the -o option (the lowercase letter) displays fixed cluster locations for each segment. For example:
Fixed Offset

Cluster Size

0

4096

0x1000

8192

0x3000

16384

0x7000

32768

0xf000

4096

0x10000

65536

0x20000

8192

0x22000

16384

0x26000

32768

0x30000

65536

API

Class: os_dbutil
Method: ossize



[previous] [next]

Copyright © 1999 Object Design, Inc. All rights reserved.

Updated: 03/11/99 11:19:07