X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fmdc%2Flproc_mdc.c;h=54d1d4c25565ae4095044160c19b0e2dc06f7bc8;hp=1497b9ed174b8d5f32662ead99f6514adaab0c5b;hb=400b0681017091fab9cef9bd00e0f536e1793dcc;hpb=c3b5a88ed42538afd3db8d67cb5171546174eefa diff --git a/lustre/mdc/lproc_mdc.c b/lustre/mdc/lproc_mdc.c index 1497b9e..54d1d4c 100644 --- a/lustre/mdc/lproc_mdc.c +++ b/lustre/mdc/lproc_mdc.c @@ -20,11 +20,10 @@ * */ #define DEBUG_SUBSYSTEM S_CLASS -#include -#include -#include -#include -#include + +#include +#include + int rd_uuid(char* page, char **start, off_t off, int count, int *eof, void *data) @@ -40,16 +39,11 @@ int rd_uuid(char* page, char **start, off_t off, int rd_blksize(char* page, char **start, off_t off, int count, int *eof, void *data) { - return 0; -} -int rd_blktotal(char* page, char **start, off_t off, - int count, int *eof, void *data) -{ return 0; -} -int rd_blkfree(char* page, char **start, off_t off, +} +int rd_kbtotal(char* page, char **start, off_t off, int count, int *eof, void *data) { return 0; @@ -61,19 +55,20 @@ int rd_kbfree(char* page, char **start, off_t off, return 0; } -int rd_numobjects(char* page, char **start, off_t off, + +int rd_files(char* page, char **start, off_t off, int count, int *eof, void *data) { return 0; } -int rd_objfree(char* page, char **start, off_t off, +int rd_filesfree(char* page, char **start, off_t off, int count, int *eof, void *data) { return 0; } -int rd_objgroups(char* page, char **start, off_t off, +int rd_filegroups(char* page, char **start, off_t off, int count, int *eof, void *data) { return 0; @@ -106,16 +101,28 @@ int rd_server_name(char* page, char **start, off_t off, } -lprocfs_vars_t snmp_var_nm_1[]={ - {"snmp/uuid", rd_uuid, 0}, - {"snmp/f_blocksize",rd_blksize, 0}, - {"snmp/f_blockstotal",rd_blktotal, 0}, - {"snmp/f_blocksfree",rd_blkfree, 0}, - {"snmp/f_kbytesfree", rd_kbfree, 0}, - {"snmp/f_objects", rd_numobjects, 0}, - {"snmp/f_objectsfree", rd_objfree, 0}, - {"snmp/f_objectgroups", rd_objgroups, 0}, - {"snmp/server_uuid", rd_server_uuid, 0}, - {"snmp/conn_uuid", rd_conn_uuid, 0}, +lprocfs_vars_t status_var_nm_1[]={ + {"status/uuid", rd_uuid, 0}, + {"status/blocksize",rd_blksize, 0}, + {"status/kbytestotal",rd_kbtotal, 0}, + {"status/kbytesfree", rd_kbfree, 0}, + {"status/files", rd_files, 0}, + {"status/filesfree", rd_filesfree, 0}, + {"status/filegroups", rd_filegroups, 0}, + {"status/server_uuid", rd_server_uuid, 0}, + {"status/conn_uuid", rd_conn_uuid, 0}, + {0} +}; +int rd_numdevices(char* page, char **start, off_t off, + int count, int *eof, void *data) +{ + struct obd_type* class=(struct obd_type*)data; + int len=0; + len+=snprintf(page, count, "%d\n", class->typ_refcnt); + return len; +} + +lprocfs_vars_t status_class_var[]={ + {"status/num_devices", rd_numdevices, 0}, {0} };