Thanks very much for all the response!
Based on Martin’s response! The clone(16) consumes lots of time and do you have any suggestions what the cause is?
I use “strace -f -r -o /tmp/strace netconf-console -h” to get the log below:
300 0.000025 fstat(17, {st_mode=S_IFREG|0644, st_size=4510, ...}) = 0 300 0.000022 read(17, "m_addR\33\0\0\0(\5\0\0\0t\1\0\0\0at\1\0\0\0bR\23\0\0\0"..., 4096) = 414 300 0.000022 read(17, "", 4096) = 0 300 0.000048 close(17) = 0 300 0.000021 munmap(0x7fca661aa000, 4096) = 0 300 0.000046 close(16) = 0 300 0.000064 open("/dev/random", O_RDONLY) = 16 300 0.000037 poll([{fd=16, events=POLLIN}], 1, -1) = 1 ([{fd=16, revents=POLLIN}]) 300 560.227922 close(16) = 0 300 0.000040 open("/dev/urandom", O_RDONLY) = 16 300 0.000059 fstat(16, {st_mode=S_IFCHR|0666, st_rdev=makedev(1, 9), ...}) = 0 300 0.000039 fcntl(16, F_GETFD) = 0 300 0.000021 fcntl(16, F_SETFD, FD_CLOEXEC) = 0 300 0.000060 read(16, "U\322\314\2>\300\0\344&\375\256\362\37\225\222a", 16) = 16 300 0.000377 close(15) = 0
ps: Now I use the netconf-console in confd as the netconf client and connect to some remote netconf server, it also has the same issue and after use strace to trace, the 5347 consumes lots of time and the two logs are similar:
5333 9167 0.000025 open("/usr/lib64/python2.7/site-packages/nacl/bindings/utils.py", O_RDONLY) = 8 5334 9167 0.000027 fstat(8, {st_mode=S_IFREG|0644, st_size=4420, ...}) = 0 5335 9167 0.000023 open("/usr/lib64/python2.7/site-packages/nacl/bindings/utils.pyc", O_RDONLY) = 9 5336 9167 0.000032 fstat(9, {st_mode=S_IFREG|0644, st_size=4510, ...}) = 0 5337 9167 0.000022 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f2097432000 5338 9167 0.000022 read(9, "\3\363\r\n\20\234\311[c\0\0\0\0\0\0\0\0\2\0\0\0@
\1\0s\222\0\0\0d\0"…, 4096) = 4096
5339 9167 0.000026 fstat(9, {st_mode=S_IFREG|0644, st_size=4510, ...}) = 0 5340 9167 0.000023 read(9, "m_addR\33\0\0\0(\5\0\0\0t\1\0\0\0at\1\0\0\0bR\23\0\0\0"..., 4096) = 414 5341 9167 0.000021 read(9, "", 4096) = 0 5342 9167 0.000054 close(9) = 0 5343 9167 0.000043 munmap(0x7f2097432000, 4096) = 0 5344 9167 0.000050 close(8) = 0 5345 9167 0.000051 open("/dev/random", O_RDONLY) = 8 5346 9167 0.000035 poll([{fd=8, events=POLLIN}], 1, -1) = 1 ([{fd=8, revents=POLLIN}]) 5347 9167 524.278281 close(8) = 0 5348 9167 0.000027 open("/dev/urandom", O_RDONLY) = 8 5349 9167 0.000076 fstat(8, {st_mode=S_IFCHR|0666, st_rdev=makedev(1, 9), ...}) = 0 5350 9167 0.000027 fcntl(8, F_GETFD) = 0 5351 9167 0.000021 fcntl(8, F_SETFD, FD_CLOEXEC) = 0 5352 9167 0.000057 read(8, "ZkR\237\276=\323?\213@\373\261\231{\205\33", 16) = 16 5353 9167 0.000574 close(7) = 0 5354 9167 0.000185 stat("/usr/lib64/python2.7/site-packages/nacl/encoding", 0x7ffea8081b90) = -1 ENOENT (No such file or directory) 5355 9167 0.000064 open("/usr/lib64/python2.7/site-packages/nacl/encoding.so", O_RDONLY) = -1 ENOENT (No such file or directory) 5356 9167 0.000055 open("/usr/lib64/python2.7/site-packages/nacl/encodingmodule.so", O_RDONLY) = -1 ENOENT (No such file or directory) 5357 9167 0.000046 open("/usr/lib64/python2.7/site-packages/nacl/encoding.py", O_RDONLY) = 7 5358 9167 0.000072 fstat(7, {st_mode=S_IFREG|0644, st_size=1928, ...}) = 0 5359 9167 0.000034 open("/usr/lib64/python2.7/site-packages/nacl/encoding.pyc", O_RDONLY) = 9 5360 9167 0.000051 fstat(9, {st_mode=S_IFREG|0644, st_size=3847, ...}) = 0 5361 9167 0.000025 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f2097432000