Sponsored Content
Full Discussion: current processes
Top Forums Programming current processes Post 40730 by jalburger on Monday 22nd of September 2003 02:27:11 PM
Old 09-22-2003
current processes

Hi all,

I'm running AIX 4.3.3.

Is there a way in C++ to get a list of all current processes running on the processor? I have a manager daemon tracking all the software applications. They're using a system of healthchecks to update status. One intermittently is missing its healthcheck, which in turn causes the manager daemon to bring down all the relevant software processes on the box. I'm looking for a backup method of checking to see if the application is still alive or not, before having the manager daemon bring everything down. I remember I did this before, but I cannot locate the header file for it or any info about it.

Thanks in advance!!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

I need some example of Co-Processes

I want to know how to work the Co-Processes in kornshell scripts. So, I very need some script about Co-Processes! thanks ...:) (3 Replies)
Discussion started by: javalee
3 Replies

2. Filesystems, Disks and Memory

processes

write a program create two processes to run a for loop which adds numbers 1 to n , say one process adds odd numbers and other adds even numbers (1 Reply)
Discussion started by: jayaram_miryabb
1 Replies

3. UNIX for Dummies Questions & Answers

Processes

Can someone tell how to find out how long a process has been running? I want to find something that is usually there that the paging system can check on. Thanks (4 Replies)
Discussion started by: Beetlejuice
4 Replies

4. Shell Programming and Scripting

Processes

I have a file like this. No. State Query Times User Processed Syslog 1 ready idle 973s 0 /Application/ugsvols/bldata01/logs/imanscript1562.syslog 2 ready idle 803s 83997 13 /Application/ugsvols/bldata01/logs/imanscript1542.syslog 3 ready idle 2954s 106641... (17 Replies)
Discussion started by: Krrishv
17 Replies

5. UNIX for Dummies Questions & Answers

How to check the status of the processes running for the current user?

Hi All, I am new to unix. Can anyone tell me "How to check the status of the processes running for the current user?" Regards, Ravindaran S (1 Reply)
Discussion started by: ravind27
1 Replies

6. 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

7. Solaris

Identifying and grouping OS processes and APP processes

Hi Is there an easy way to identify and group currently running processes into OS processes and APP processes. Not all applications are installed as packages. Any free tools or scripts to do this? Many thanks. (2 Replies)
Discussion started by: wilsonee
2 Replies

8. Shell Programming and Scripting

Finding files in current directory when 100,000's files in current directory

Hi All I was wondering what is the most efficient way to find files in the current directory(that may contain 100,000's files), that meets a certain specified file type and of a certain age. I have experimented with the find command in unix but it also searches all sub directories. I have... (2 Replies)
Discussion started by: kewong007
2 Replies

9. Programming

How to stop other processes and kernel from printing output on current virtual term

Hello All, Background ======== I am creating a virtual appliance console for a software stack on VMware ESXi. I am using Centos 5.x as the Linux distro (Guest OS). I have created a ncurses based application that does the user authentication and present him with some basic controls to do basic... (2 Replies)
Discussion started by: ku@ntum
2 Replies

10. Shell Programming and Scripting

Finding the age of a unix process, killing old processes, killing zombie processes

I had issues with processes locking up. This script checks for processes and kills them if they are older than a certain time. Its uses some functions you'll need to define or remove, like slog() which I use for logging, and is_running() which checks if this script is already running so you can... (0 Replies)
Discussion started by: sukerman
0 Replies
pset_bind(2)							System Calls Manual						      pset_bind(2)

NAME
pset_bind() - bind process or thread to a processor set SYNOPSIS
DESCRIPTION
The function binds thread(s) or process(es) specified by idtype and id to the processor set pset. If idtype is then id specifies the pid of the process to be assigned, and the binding affects all threads of the process. If idtype is then id specifies the lwpid of the thread to be assigned, and the binding affects only the specified thread. You cannot spec- ify a pthread ID for pthreads in id, an lwpid is required. See in pthread_processor_bind_np(3T) for information on binding pthreads to processor sets. If idtype is then id specifies the effective user ID of all processes to be assigned, and the binding affects all threads in these pro- cesses. The operation is not a "success is all or none" type, because it rebinds as many processes as possible without error. If idtype is then id specifies the process group ID of all processes to be assigned, and the binding affects all threads in these pro- cesses. The operation is not a "success is all or none" type, because it rebinds as many processes as possible without error. All pro- cesses in a process group need not have same access permissions to target processor set. If opset is not it contains the previous processor set binding of the specified thread or process upon successful operation. However, opset is ignored if idtype is or All threads of a process need not be assigned to the same processor set. If id is then idtype identifies the target process(es) or thread(s) to be assigned to pset. The identifies the calling process, whereas identifies the calling thread. The identifies all processes with the effective user ID of the calling process, and identifies all pro- cesses in the process group of the calling process. If pset is or the system default processor set is the target processor set. If pset is the processor set binding is not changed, the current processor set's processor set ID is returned in opset. If idtype is or request has no meaning. No special access privileges are needed for operation. If pset is the same as the current processor set for the specified process or thread, the operation is considered a request. The system daemon processes are not restricted to any user defined processor sets. They may execute on any processor in the system irre- spective of the processor set configuration a user may have set up. The processor set binding of system daemon processes may not be changed. The operation on system daemon processes returns a special processor set ID of to indicate they are treated differently. Note: The system daemon processes are created in the kernel for kernel activities, and not the user daemon processes that execute in user space. A user with the privilege, or a user with EXEC permission for the processor set pset may affect the binding change. The and functions may be used to set and query the processor set access permissions. See pset_getattr(2)). If the thread or process being assigned to pset has binding to a processor or a locality domain in its current processor set, the binding is reassigned to a processor or locality domain in the new processor set pset. If pset is empty (no processors are assigned as yet), the behavior of function depends on the value of attribute. The default behavior on an attempt to bind a thread or a process to an empty processor set is to fail the request. The child process and its first thread created by a or function inherits the processor set binding from the parent process. The new threads in the multi-threaded process inherits their processor set binding from the creator thread. Security Restrictions Some or all of the actions associated with this system call require the privilege. Processes owned by the superuser have this privilege. Processes owned by other users may have this privilege, depending on system configuration. See privileges(5) for more information about privileged access on systems that support fine-grained privileges. RETURN VALUE
returns the following values: Successful completion. Failure. is set to indicate the error. ERRORS
sets to one of the following values if the corresponding condition occurs. The memory location pointed to by opset is not writable by the user. pset is not valid. idtype or id is not valid. pset is empty and the current setting of processor set attributes does not allow this operation on an empty processor set. The memory location pointed to by opset is NULL and the operation is requested. The processor set functionality is not supported by the underlying HP-UX version. User does not have necessary permissions to bind a thread or a process to specified processor set. The specified thread or process is a system daemon. The specified thread, process, user ID, or process group does not exist. EXAMPLES
Migrate the current thread to another processor set new_pset, and retrive its current processor set in old_pset. SEE ALSO
psrset(1M), fork(2), pset_assign(2), pset_create(2), pset_ctl(2), pset_destroy(2), pset_getattr(2), pset_setattr(2), vfork(2), privgrp(4), privileges(5). pset_bind(2)
All times are GMT -4. The time now is 02:05 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy