mco_disk_info

Return information about the current state of the Disk Manager.

Prototype

    MCO_RET mco_disk_info(    /*IN*/ mco_db_h db, /*OUT*/ mco_disk_info_t* info );

Arguments

Description

This function returns the information about the current state of the Disk Manager in the mco_disk_info_t structure.

Return Codes

Example

    const char * dbname = "SimpleDb";

    int main(int argc, char* argv[])
    {
        mco_db_h db;
        MCO_RET rc;
        mco_device_t       dev[4];
        mco_db_params_t    db_params;
        mco_disk_info_t    info;
        ...
        rc = mco_db_open_dev( dbname, simple_get_dictionary(), dev, 4, &db_params );

        if ( MCO_S_OK != rc )
        {
            rc = mco_db_connect(  dbname, &db );
            ...
            info = mco_disk_info( db, &info);

            printf("\n\n\t Disk usage:\n");
            printf("\t Data file %d Kb\n", info.data_file_size / 1000);
            printf("\t Log file %d Kb\n", info.log_file_size / 1000);
            printf("\t Used data %d Kb\n", info.used_database_size / 1000);
            ...
        }
    }

Files

Header file:
mco.h
Source file:
mcodisk.c
Library:
libmcovtdsk.a
Header file:
mco.h
Source file:
mcovtmem.c
Library:
libmcovtmem.a