Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Using Valgrind with already running process Post 302856883 by Praveen_218 on Wednesday 25th of September 2013 03:01:25 AM
Old 09-25-2013
Ok. Yes seems to be memory leak case.
But then what is the trigger or is it always expanding in every run?

If you know the trigger which is causing the issue, you would easily zero in on to the affected code area.

So far I'm not aware if Valgrind could be attached to a running process like gdb but I know that it could generate good enough stats with function wise memory usage reports.

Need to look at the Valgrind manual.

Why, btw, you wanted to attach the daemon when you could have just run the same in the Valgrind environment from the command line itself?

Last edited by Praveen_218; 09-25-2013 at 04:03 AM.. Reason: Typo
This User Gave Thanks to Praveen_218 For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

How to create a dummy process of a process already running?

Hi Everybody, I want to create a shell script named as say "jip" and it is runned. And i want that when i do ps + grep for the process than this jip should be shown as process. Infact there might be process with name jip which is already running. (3 Replies)
Discussion started by: shambhu
3 Replies

2. Shell Programming and Scripting

script to monitor process running on server and posting a mail if any process is dead

Hello all, I would be happy if any one could help me with a shell script that would determine all the processes running on a Unix server and post a mail if any of the process is not running or aborted. Thanks in advance Regards, pradeep kulkarni. :mad: (13 Replies)
Discussion started by: pradeepmacha
13 Replies

3. Programming

Valgrind error

I get this Valgrind error while using malloc but if I use calloc then there is no error. I allocate 8 bytes for the string inside sprintf, 12 for the ip and 1 for the string terminator. This totals 21, so why is it talking about 20 bytes and 18 bytes ? Partial code: char ip =... (3 Replies)
Discussion started by: cyler
3 Replies

4. Ubuntu

valgrind

Hello, I want to install and run a tool called Daikon on my Ubuntu(latest version) While compiling I got this error--------> checking the GLIBC_VERSION version... unsupported version configure: error: Valgrind requires glibc version 2.2 - 2.11 make: *** Error 1 make: Leaving directory... (3 Replies)
Discussion started by: paramad
3 Replies

5. UNIX for Dummies Questions & Answers

Running different process from current process?

I have been having some trouble trying to get some code working, so I was wondering...what system calls are required to execute a different program from an already running process? (1 Reply)
Discussion started by: Midwest Product
1 Replies

6. UNIX for Dummies Questions & Answers

How a process can check if a particular process is running on different machine?

I have process1 running on one machine and generating some log file. Now another process which can be launched on any machine wants to know if process1 is running or not and also in case it is running it wants to stream the logs file generated by process1 on terminal from which process2 is... (2 Replies)
Discussion started by: saurabhnsit2001
2 Replies

7. BSD

Process remians in Running state causing other similar process to sleep and results to system hang

Hi Experts, I am facing one problem here which is one process always stuck in running state which causes the other similar process to sleep state . This causes my system in hanged state. On doing cat /proc/<pid>wchan showing the "__init_begin" in the output. Can you please help me here... (0 Replies)
Discussion started by: naveeng
0 Replies

8. UNIX for Advanced & Expert Users

Process remians in Running state causing other similar process to sleep and results to system hang

Hi Experts, I am facing one problem here which is one process always stuck in running state which causes the other similar process to sleep state . This causes my system in hanged state. On doing cat /proc/<pid>wchan showing the "__init_begin" in the output. Can you please help me here... (1 Reply)
Discussion started by: naveeng
1 Replies

9. UNIX for Advanced & Expert Users

Process remians in Running state causing other similar process to sleep and results to system hang

Hi Experts, I am facing one problem here which is one process always stuck in running state which causes the other similar process to sleep state . This causes my system in hanged state. On doing cat /proc/<pid>wchan showing the "__init_begin" in the output. Can you please help me here... (6 Replies)
Discussion started by: naveeng
6 Replies

10. Shell Programming and Scripting

Command to get exact tomcat process I am running ignoring other java process

Team, I have multiple batchjobs running in VM, if I do ps -ef |grep java or tomcat I am getting multiple process list. How do I get my exact tomcat process running and that is unique? via shell script? (4 Replies)
Discussion started by: Ghanshyam Ratho
4 Replies
DAEMON(8)						    BSD System Manager's Manual 						 DAEMON(8)

NAME
daemon -- run detached from the controlling terminal SYNOPSIS
daemon [-cfr] [-p child_pidfile] [-P supervisor_pidfile] [-u user] command arguments ... DESCRIPTION
The daemon utility detaches itself from the controlling terminal and executes the program specified by its arguments. Privileges may be low- ered to the specified user. The options are as follows: -c Change the current working directory to the root (``/''). -f Redirect standard input, standard output and standard error to /dev/null. -p child_pidfile Write the ID of the created process into the child_pidfile using the pidfile(3) functionality. The program is executed in a spawned child process while the daemon waits until it terminates to keep the child_pidfile locked and removes it after the process exits. The child_pidfile owner is the user who runs the daemon regardless of whether the -u option is used or not. -P supervisor_pidfile Write the ID of the daemon process into the supervisor_pidfile using the pidfile(3) functionality. The program is executed in a spawned child process while the daemon waits until it terminates to keep the supervisor_pidfile locked and removes it after the process exits. The supervisor_pidfile owner is the user who runs the daemon regardless of whether the -u option is used or not. -r Supervise and restart the program if it has been terminated. -u user Login name of the user to execute the program under. Requires adequate superuser privileges. If the -p, -P or -r option is specified the program is executed in a spawned child process. The daemon waits until it terminates to keep the pid file(s) locked and removes them after the process exits or restarts the program. In this case if the monitoring daemon receives software termination signal (SIGTERM) it forwards it to the spawned process. Normally it will cause the child to exit, remove the pidfile(s) and then terminate. The -P option is useful combined with the -r option as supervisor_pidfile contains the ID of the supervisor not the child. This is especially important if you use -r in an rc script as the -p option will give you the child's ID to signal when you attempt to stop the service, causing daemon to restart the child. EXIT STATUS
The daemon utility exits 1 if an error is returned by the daemon(3) library routine, 2 if child_pidfile or supervisor_pidfile is requested, but cannot be opened, 3 if process is already running (pidfile exists and is locked), otherwise 0. DIAGNOSTICS
If the command cannot be executed, an error message is displayed on standard error unless the -f flag is specified. SEE ALSO
setregid(2), setreuid(2), daemon(3), exec(3), pidfile(3), termios(4), tty(4) HISTORY
The daemon utility first appeared in FreeBSD 4.7. BSD
September 13, 2013 BSD
All times are GMT -4. The time now is 04:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy