[Lustre-discuss] programmatic access to parameters
Andreas Dilger
adilger at sun.com
Fri Mar 26 00:11:57 PDT 2010
On 2010-03-25, at 22:04, Jason Rappleye wrote:
> On Mar 25, 2010, at 6:25 PM, Christopher J. Morrone wrote:
>> Cliff White wrote:
>>> I don't know what your constraints are, but should note that this
>>> sort
>>> of information (number of OSTs) can be obtained rather trivially
>>> from
>>> any lustre client via shell prompt, to wit:
>>> # lctl dl |grep OST |wc -l
>>> 2
>>> or:
>>> # ls /proc/fs/lustre/osc | grep OST |wc -l
>>> 2
>>
>> IF you only have one lustre filesystem mounted on that node.
>
> How about /proc/fs/lustre/lov/<filesystem-*/numobd
>
> $ cat /proc/fs/lustre/lov/nbp10-clilov-ffff81007e33b800/numobd
> 120
Please don't access /proc/fs/lustre files directly. It is preferable
to access them like "lctl get_param -n lov.$fsname-clilov-*.numobd".
We are adding an llapi_get_param() interface for a future release of
Lustre, but it wouldn't be too hard for someone to create a wrapper
for this in 1.8.x either,
Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.
More information about the lustre-discuss
mailing list