I have a C++ library (sort of server) hosted on Apache server. I want to run valgrind on it. So please guide on me how can I do so.
我有一个托管在Apache服务器上的C ++库(一种服务器)。我想在上面运行valgrind。所以请指导我如何才能这样做。
I have tried below command. Does this looks fine because I can't see valgrind checking my C++ module hosted on apache. Please be noted that all the required module name details are already provided and below command is what i am using to run valgrind while starting apache server.
我试过下面的命令。这看起来不错,因为我看不到valgrind检查我在apache上托管的C ++模块。请注意,已经提供了所有必需的模块名称详细信息,以下命令是我在启动apache服务器时运行valgrind所使用的命令。
valgrind --leak-check=full --show-reachable=yes --tool=memcheck --log-file=val.log /etc/init.d/httpd24-httpd start
valgrind --leak-check = full --show-reachable = yes --tool = memcheck --log-file = val.log /etc/init.d/httpd24-httpd start
1 个解决方案
#1
0
valgrind --leak-check=full --show-reachable=yes --tool=memcheck --log-file=val.log /etc/init.d/httpd24-httpd start
valgrind --leak-check = full --show-reachable = yes --tool = memcheck --log-file = val.log /etc/init.d/httpd24-httpd start
Valgrind must be executed with a binary file to inspect. `httpd24-httpd' here is simply a wrapper which starts Apache in the background mode. That's why the way you start valgrind will show you nothing.
必须使用二进制文件执行Valgrind才能进行检查。 `httpd24-httpd'这里只是一个在后台模式下启动Apache的包装器。这就是为什么你启动valgrind的方式什么都不会给你看。
For being able to achieve your task, you should start Apache in a foreground. I am not familiar with Apache well but seems your command line should look smth like this:
为了能够完成任务,您应该在前台启动Apache。我不熟悉Apache,但似乎你的命令行应该看起来像这样:
valgrind --leak-check=full --show-reachable=yes --tool=memcheck --log-file=val.log /usr/sbin/httpd -DFOREGROUND
Here `/usr/sbin/httpd' is a binary of Apache.
这里`/ usr / sbin / httpd'是Apache的二进制文件。
#1
0
valgrind --leak-check=full --show-reachable=yes --tool=memcheck --log-file=val.log /etc/init.d/httpd24-httpd start
valgrind --leak-check = full --show-reachable = yes --tool = memcheck --log-file = val.log /etc/init.d/httpd24-httpd start
Valgrind must be executed with a binary file to inspect. `httpd24-httpd' here is simply a wrapper which starts Apache in the background mode. That's why the way you start valgrind will show you nothing.
必须使用二进制文件执行Valgrind才能进行检查。 `httpd24-httpd'这里只是一个在后台模式下启动Apache的包装器。这就是为什么你启动valgrind的方式什么都不会给你看。
For being able to achieve your task, you should start Apache in a foreground. I am not familiar with Apache well but seems your command line should look smth like this:
为了能够完成任务,您应该在前台启动Apache。我不熟悉Apache,但似乎你的命令行应该看起来像这样:
valgrind --leak-check=full --show-reachable=yes --tool=memcheck --log-file=val.log /usr/sbin/httpd -DFOREGROUND
Here `/usr/sbin/httpd' is a binary of Apache.
这里`/ usr / sbin / httpd'是Apache的二进制文件。