1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2 * vim:expandtab:shiftwidth=8:tabstop=8:
4 * Copyright (C) 2002 Cluster File Systems, Inc.
6 * This file is part of Lustre, http://www.lustre.org.
8 * Lustre is free software; you can redistribute it and/or
9 * modify it under the terms of version 2 of the GNU General Public
10 * License as published by the Free Software Foundation.
12 * Lustre is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Lustre; if not, write to the Free Software
19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 #define DEBUG_SUBSYSTEM S_CLASS
23 #include <linux/obd_support.h>
24 #include <linux/obd_class.h>
25 #include <linux/lprocfs.h>
26 #include <linux/string.h>
27 #include <linux/lustre_lib.h>
32 int rd_uuid(char* page, char **start, off_t off,
33 int count, int *eof, void *data)
36 len+=snprintf(page, count, "%s\n", \
37 ((struct obd_device*)data)->obd_uuid);
42 int rd_blksize(char* page, char **start, off_t off,
43 int count, int *eof, void *data)
48 int rd_blktotal(char* page, char **start, off_t off,
49 int count, int *eof, void *data)
54 int rd_blkfree(char* page, char **start, off_t off,
55 int count, int *eof, void *data)
60 int rd_kbfree(char* page, char **start, off_t off,
61 int count, int *eof, void *data)
66 int rd_numobjects(char* page, char **start, off_t off,
67 int count, int *eof, void *data)
72 int rd_objfree(char* page, char **start, off_t off,
73 int count, int *eof, void *data)
78 int rd_objgroups(char* page, char **start, off_t off,
79 int count, int *eof, void *data)
85 int rd_fs_type(char* page, char **start, off_t off,
86 int count, int *eof, void *data)
91 int rd_other(char* page, char **start, off_t off, int count, int *eof,
97 int rd_string(char* page, char **start, off_t off, int count, int *eof,
100 printk("Hello string");
104 int lprocfs_ll_wr(struct file* file, const char *buffer, unsigned long count,
110 int wr_other(struct file* file, const char *buffer, unsigned long count,
116 int wr_string(struct file* file, const char *buffer, unsigned long count,
121 lprocfs_vars_t snmp_var_nm_1[]={
122 {"snmp/uuid", rd_uuid, 0},
123 {"snmp/f_blocksize",rd_blksize, 0},
124 {"snmp/f_blockstotal",rd_blktotal, 0},
125 {"snmp/f_blocksfree",rd_blkfree, 0},
126 {"snmp/f_kbytesfree", rd_kbfree, 0},
127 {"snmp/f_objects", rd_numobjects, 0},
128 {"snmp/f_objectsfree", rd_objfree, 0},
129 {"snmp/f_objectgroups", rd_objgroups, 0},