I''m working on a script to take a snapshot of Lustre tunable values in /proc. I''d rather not hard code a list of files that will have to be updated every time a tunable is added or removed. One strategy that has been suggested to me is to look for files that contain "min" or "max" as part of the name. I think there some that this strategy will miss, though, like "lru_size" in the namespaces area. The approach I have tentatively settled on is to look for files with at least one write bit turned on. Is this a reasonable approach? Will it find all the tunable files? Does it select files that are not tunable? Can anyone suggest a better way of doing this? Thanks, -- Tom Barron tbarron@ornl.gov 865.576.1620 Oak Ridge National Laboratory
Nathaniel Rutman
2007-Feb-01 17:31 UTC
[Lustre-devel] How to identify Lustre tunables in /proc?
Tom Barron wrote:> I''m working on a script to take a snapshot of Lustre tunable values in > /proc. > > I''d rather not hard code a list of files that will have to be updated > every time a tunable is added or removed. > > One strategy that has been suggested to me is to look for files that > contain "min" or "max" as part of the name. I think there some that > this strategy will miss, though, like "lru_size" in the namespaces area. > > The approach I have tentatively settled on is to look for files with > at least one write bit turned on. > > Is this a reasonable approach? Will it find all the tunable files? > Does it select files that are not tunable? Can anyone suggest a better > way of doing this?Using the permissions bits is a reasonable way to go. Tunables would have root rw permission. There are some write-only files that perform specific actions; these are not tunables and should probably be avoided by your script. cfs21:~# ll /proc/fs/lustre/mds/lustre-MDT0000/ total 0 -rw-r--r-- 1 root root 0 Feb 1 16:04 atime_diff -r--r--r-- 1 root root 0 Feb 1 16:04 blocksize --w------- 1 root root 0 Feb 1 16:04 evict_client dr-xr-xr-x 2 root root 0 Feb 1 16:04 exports/ -r--r--r-- 1 root root 0 Feb 1 16:04 filesfree -r--r--r-- 1 root root 0 Feb 1 16:04 filestotal -r--r--r-- 1 root root 0 Feb 1 16:04 fstype -rw-r--r-- 1 root root 0 Feb 1 16:04 group_acquire_expire -rw-r--r-- 1 root root 0 Feb 1 16:04 group_expire_interval --w------- 1 root root 0 Feb 1 16:04 group_flush --w------- 1 root root 0 Feb 1 16:04 group_info -rw-r--r-- 1 root root 0 Feb 1 16:04 group_upcall
Andreas Dilger
2007-Feb-02 00:19 UTC
[Lustre-devel] How to identify Lustre tunables in /proc?
On Feb 01, 2007 17:01 -0500, Tom Barron wrote:> I''m working on a script to take a snapshot of Lustre tunable values > in /proc.Is this for data gathering purposes (e.g. record parameters for a test), or is it to restore these values at a later time? If it is the latter, then in 1.6 this can be done with "tunefs.lustre" in a persistent manner. Cheers, Andreas -- Andreas Dilger Principal Software Engineer Cluster File Systems, Inc.