I run OSX servers with Filemaker and Terascript (formerly Witango, before that Tango). Terascript talks to Filemaker via JDBC so I have installed the Filemaker Xdbc extensions (JDBC, ODBC). It is a listener process that waits for JDBC commands and interprets them and passes them on to Filemaker and returns the results.
The process is xdbc_listener and in both the Server and Client version of Filemaker it has a memory leak and slowly grows in memory footprint until it reaches the limit of the server and then crashes. In FMP (client) it brings up a dialog box with an option to click Reopen. On Server there is no outward sign, just that JDBC calls fail.
I am trying to write a script to test if xdbc_listener is running. If it is, the script should just write to a log file and die nicely. If not, it should trigger a restart of the process.
I have edited an old script that I use on older servers to test if FileMaker has crashed but it doesn't seem to correctly ascertain whether or not the process is running:
Any assistance with this would be greatly appreciated.
I am running:
OSX 10.6.8 on Mac mini with 2Gb RAM
Terascript Server 6.07
Filemaker Server 11.0.3 w/XDBC plug-in 11.3.81 (on one server)
Filemaker Client 11.0.4 w/XDBC plug-in 11.3.76 (on the other)
Last edited by fpmurphy; 10-24-2011 at 02:27 AM..
Reason: code tags please!
Why don't you recuperate the processID ($$) when you launch xdbc_listener ?
You can use it as a suffix for a file name e.g. xdbc_listener_proc.$$ you put in /tmp, and then just use ps to grep processID value
How long does it take before it goes bezeurk?
I for those apps or software with issues tend to use cron to schedule a stop/start at 11 PM...
But shouldn't I be able to find out if a process is running by it's name?
Yes...
But is it the one You launched?...
That said, here is for you:
There are so called Special shell Variables such as
$0 which is Filename of the script
$1-9 are known as positional parameters
..
$? return value (e.g. exit values...)
$$ ProcessID (PID) of script
$! Process ID of last job run in background
etc..
The only problem I see with this is that I don't initially launch the process. It is a part of FileMaker's start up. So getting the initial PID might be a problem.
Any chance I could get some help with this line:
I guess the intention is that it returns 0 then the process is running and if not, then the process is not running. Any idea why it is not behaving this way?
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)
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)
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)
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)
Hello All,
We are running a process in unix box. This is how we will do
1.our process name is Runprojectprocess <ID> configuration
2.We will be running upto 500 id at once. So we are populating a text file as Runprojectprocess 1 configuration to Runprojectprocess 500 configuration
3.... (2 Replies)
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)
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)
please suggest me a way to write c program that takes pattern of the process and returns true or false
my case is i need to keep track of dhcpcd
dhcpcd -d eth1
so i tried popen("ps -ef | grep dhcpcd | grep eth1 | wc -l", "r");
but pipe is storing 1 or 2 when not running
and 2 or 3... (7 Replies)
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)
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)