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
_______________________________________________
Lustre-devel mailing list
[email protected]
https://mail.clusterfs.com/mailman/listinfo/lustre-devel