Sponsored Content
Top Forums Programming Need C program for monitoring a processes that are running in different nodes Post 302281102 by vigneshinbox on Wednesday 28th of January 2009 07:50:02 AM
Old 01-28-2009
Need C program for monitoring a processes that are running in different nodes

Hey,
I am doing a high availability project. I need coding(socket programming using C) to monitor processes that are running in different nodes with in a network cluster.At last if u could give me a program in C to monitor the process(whether it is running or failed),it would be very heplfull.Plz help me.

thanx for ur valuable support.
 

9 More Discussions You Might Find Interesting

1. Programming

C program to kill root processes

Hello, First let me start by saying I have searched the forum and read all the SUID stuff but it is not in the neighborhood I am looking for. Here is the problem. We want to grant a non super-user permission to kill root processes but only if the process matches certain criteria. ... (8 Replies)
Discussion started by: TioTony
8 Replies

2. Shell Programming and Scripting

Monitoring processes of another host

Does anyone have a script, which monitors the processes of another host? (5 Replies)
Discussion started by: Andimotz80
5 Replies

3. Shell Programming and Scripting

monitoring running processes

I have a script that runs continuously and will deliver a file to multiple servers via scp. On occasions one of the scp's will hang and as a result not complete in sending the remaining files and not loop around again. If I run the scp commands with a & they'll complete, but I want to make sure... (2 Replies)
Discussion started by: nhatch
2 Replies

4. UNIX for Advanced & Expert Users

Monitoring Processes - Killing hung processes

Is there a way to monitor certain processes and if they hang too long to kill them, but certain scripts which are expected to take a long time to let them go? Thank you Richard (4 Replies)
Discussion started by: ukndoit
4 Replies

5. UNIX for Dummies Questions & Answers

monitoring 'waiting' processes

Is it possible to monitor processes whether they are waiting or active? Basically I would like to know since which TIME the process has been running and the state. :confused: (3 Replies)
Discussion started by: jon80
3 Replies

6. Programming

Program to spawn multiple processes

I'm trying to make a program that will spawn multiple child processes then exit. I'm having trouble figuring out how to do this since after I fork, the child process begins running the program again (never ending). int main(void){ for(int i = 0; i < 3; i++){ fork(); }... (1 Reply)
Discussion started by: cagney58
1 Replies

7. Shell Programming and Scripting

Cron job for monitoring processes

I have to monitor several processes in my application . i get the listing of these processes using the command ps -ax i want to write a shell script that will monitor the processes and if a process goes missing then it will send an email to my gmail account. I want to run this... (6 Replies)
Discussion started by: asalman.qazi
6 Replies

8. UNIX for Advanced & Expert Users

Monitoring cpu usage of mysql processes/threads/queries without any tool

hi all, i want to monitor mysql processes/threads/queries with respect to cpu usage.how can i do it? show processlist is of no use as no information abt cpu usage is given. plz help (7 Replies)
Discussion started by: rohitmahambre
7 Replies

9. Shell Programming and Scripting

Remote nodes - login and find number of processes

Hello all, This is my requirement: 1. I have 6 VMs running Apache (for Oracle EBS) as Linux user oracle. 2. From a central server (VM), I need to login to all the 6 VMs as oracle user (I have already set up ssh equivalence, so it is password less authentication). 3. Find the number of... (4 Replies)
Discussion started by: sunpraveen
4 Replies
scds_pmf_start(3HA)					 Sun Cluster HA and Data Services				       scds_pmf_start(3HA)

NAME
scds_pmf_start, scds_pmf_start_env - execute a program under PMF control SYNOPSIS
cc [flags...] -I /usr/cluster/include file -L /usr/cluster/lib -l dsdev #include <rgm/libdsdev.h> scha_err_t scds_pmf_start(scds_handle_t handle, scds_pmf_type_t program_type, int instance, const char *command, int child_monitor_level) scha_err_t scds_pmf_start_env(scds_handle_t handle, scds_pmf_type_t program_type, int instance, const char *command, int child_monitor_level, char ** env) DESCRIPTION
The scds_pmf_start() function executes a program, specified by command, under PMF control. This function is equivalent to the pmfadm(1M) command with the -c option. The command argument contains a command line and command line arguments that are passed to the function. When you start a data service application or other process (program type SCDS_PMF_TYPE_SVC or SCDS_PMF_TYPE_OTHER) under PMF with scds_pmf_start(), you choose the level of child processes to monitor by using the child_monitor_level argument. Values for the child_moni- tor_level argument are none, some or all. The child_monitor_level argument specifies that children up to and including level child_moni- tor_level will be monitored. The original process is executed at level 0, its children at level 1, their children at level 2, and so on. Any new fork operation produces a new level of children. Specify -1 to monitor all levels of children. For example, if the command to start is a daemon, the appropriate child_monitor_level is 1. If the command to start is a script that starts a daemon, the appropriate value for child_monitor_level is 2. For a fault monitor (program type SCDS_PMF_TYPE_MON), the child_monitor_level argument is ignored and 0 is used. If the underlying application process is already running, scds_pmf_start() prints a syslog() error and returns SCHA_ERR_INTERNAL because the RGM guarantees that two calls to a START function on a node must have an intervening STOP function. PARAMETERS
The following parameters are supported: handle The handle returned from scds_initialize(3HA) program_type Type of program to execute. Valid types are: SCDS_PMF_TYPE_SVC Data service application SCDS_PMF_TYPE_MON Fault monitor SCDS_PMF_TYPE_OTHER Other instance For resources with multiple instances, this integer, starting at 0, uniquely identifies the instance. For single instance resources, use 0. command Command, including command line arguments, to execute under PMF control. child_monitor_level For program_type SCDS_PMF_TYPE_SVC and SCDS_PMF_TYPE_OTHER, this argument specifies the level of child processes to be monitored (equivalent to the -C option to pmfadm). Use -1 to specify all levels of child processes. For pro- gram_type SCDS_PMF_TYPE_MON, this argument is ignored. env Specifies an array of character pointers to environment strings, which are described in the execve(2) man page. When the program that the command parameter specifies is executed, this environment is passed to this program. RETURN VALUES
The scds_pmf_start() function returns the following: 0 The function succeeded. non-zero The function failed. ERRORS
SCHA_ERR_INTERNAL The underlying application process is already running. SCHA_ERR_NOERR The function succeeded. Other values The function failed. See scha_calls(3HA) for a description of other error codes. FILES
/usr/cluster/include/rgm/libdsdev.h Include file /usr/cluster/lib/libdsdev.so Library ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWscdev | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ SEE ALSO
pmfadm(1M), scds_initialize(3HA), scds_pmf_stop(3HA), scds_svc_wait(3HA), scha_calls(3HA), execve(2), attributes(5) Sun Cluster 3.2 24 Sep 2007 scds_pmf_start(3HA)
All times are GMT -4. The time now is 02:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy