May be this question is noobish but I am not well versed with unix environment and profiling.
I want to profile a server code written in C running on Ubuntu as a service (I start it with service command). Once it is started it listens for request and then performs some operation.
I am not able to understand how exactly to do the profiling using the tools like gprof, valgrind and sprof.
I have tried all three but not able to generate any log.
I tried valgrind but it just executes, doesn't wait for the actual request to come.
Used gprof and sprof but no files are being generated.
I looked at several examples on SO and other sites but they talk about a sample code which generates an executable which is then run.
I really need some help now.
Thanks