[LU-17237] option for 'lctl list_param' to print parameter pathname Created: 28/Oct/23  Updated: 01/Feb/24

Status: Open
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.15.3
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Andreas Dilger Assignee: WC Triage
Resolution: Unresolved Votes: 0
Labels: easy

Issue Links:
Related
is related to LU-14442 lctl get_param '-w' option to dump on... Open
is related to LU-16931 add lctl mechanism (list_param?) to r... Open
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

For monitoring tools that are accessing a large number of parameters repeatedly, using the globbing of "lctl get_param" can generate a considerable number of incorrect pathnames for each lookup:

# strace -o /tmp/lctl-set_param.txt lctl set_param *.*.job_stats=Expire.500
mdt.myth-MDT0000.job_stats=Expire.500
error: set_param: setting /proc/fs/lustre/obdfilter/myth-OST0000/job_stats=Expire.500: Invalid argument
error: set_param: setting /proc/fs/lustre/obdfilter/myth-OST0001/job_stats=Expire.500: Invalid argument
error: set_param: setting /proc/fs/lustre/obdfilter/myth-OST0002/job_stats=Expire.500: Invalid argument
error: set_param: setting /proc/fs/lustre/obdfilter/myth-OST0003/job_stats=Expire.500: Invalid argument
error: set_param: setting /proc/fs/lustre/obdfilter/myth-OST0004/job_stats=Expire.500: Invalid argument
# grep -c ENOENT /tmp/lctl-set_param.txt
147

This is about 25 wrong pathname lookups for each of the 6 parameter files found in this case (though admittedly using a double wildcard is uncommon). Even for a single parameter there are 8 incorrect pathname lookups due to the globbing, which could be avoided.

There should be an option for "lctl list_param PARAMS" to print out the actual pathname(s) for PARAMS one time at startup, and then these pathnames could be accessed directly afterward. Perhaps "-P" and "--pathname" would be suitable.

The pathnames for most parameters will be constant for the lifetime of the running service, though software upgrades might potentially change them, so they shouldn't be saved into a file and should only be generated at runtime. Also, starting and stopping services on the local machine would change which parameter names are present on the local machine.


Generated at Sat Feb 10 03:33:46 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.