Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lsmd: optimization when execute lsmd help generate a process #399

Merged
merged 1 commit into from
Oct 31, 2019

Conversation

tasleson
Copy link
Member

Execute lsmd --help every time, The command will generate a process.
As a help I think that should not produce a process.

[root@localhost ~]# lsmd --help
libStorageMgmt plug-in daemon.
lsmd [--plugindir ] [--socketdir

] [-v] [-d]
--plugindir = The directory where the plugins are located
--socketdir = The directory where the Unix domain sockets will be created
--confdir = The directory where the config files are located
-v = Verbose logging
-d = New style daemon (systemd)

[root@localhost ~]# ps -ef | grep lsmd
libstor+ 3854 1 0 Oct21 ? 00:00:02 /usr/bin/lsmd -d
libstor+ 6112 1 0 21:18 ? 00:00:00 lsmd --help
libstor+ 6305 1 0 21:18 ? 00:00:00 lsmd --help
libstor+ 6340 1 0 21:18 ? 00:00:00 lsmd --help
libstor+ 6373 1 0 21:18 ? 00:00:00 lsmd --help

Optimization is modified as follows:
Return EXIT_SUCCESS when executing lsmd --help

Signed-off-by: Bo wu wubo40@huawei.com
Reviewed-by: Zhiqiang Liu liuzhiqiang26@huawei.com

Execute lsmd --help every time, The command will generate a process.
As a help I think that should not produce a process.

[root@localhost ~]# lsmd --help
libStorageMgmt plug-in daemon.
lsmd [--plugindir <directory>] [--socketdir <dir>] [-v] [-d]
     --plugindir = The directory where the plugins are located
     --socketdir = The directory where the Unix domain sockets will be created
     --confdir   = The directory where the config files are located
     -v          = Verbose logging
     -d          = New style daemon (systemd)

[root@localhost ~]# ps -ef | grep lsmd
libstor+  3854     1  0 Oct21 ?        00:00:02 /usr/bin/lsmd -d
libstor+  6112     1  0 21:18 ?        00:00:00 lsmd --help
libstor+  6305     1  0 21:18 ?        00:00:00 lsmd --help
libstor+  6340     1  0 21:18 ?        00:00:00 lsmd --help
libstor+  6373     1  0 21:18 ?        00:00:00 lsmd --help

Optimization is modified as follows:
Return EXIT_SUCCESS when executing lsmd --help

Signed-off-by: Bo wu <wubo40@huawei.com>
Reviewed-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
@tasleson tasleson merged commit ad75793 into libstorage:master Oct 31, 2019
@tasleson tasleson deleted the lsmd_help branch October 31, 2019 20:04
@tasleson tasleson mentioned this pull request Dec 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant