List of Thread IDs of a process

Thread Tools Search this Thread
Top Forums Programming List of Thread IDs of a process
# 1  
Old 06-04-2002
Data List of Thread IDs of a process


Can some one tell how to read the thread IDs of the current process in Sun Solaris.

Any help will be appreciated.

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

List of all ids,groups, privilege ids

I wish to pull out a list of all user ids on the system, including the privileged ids, the groups to which they belong to. Sometimes after deleting an id also, its home dir does not get deleted or an entry is left behind in /etc/passwd. Can someone help me with a script to achieve both. (2 Replies)
Discussion started by: ggayathri
2 Replies

2. Shell Programming and Scripting

List out Process ids restarted today

Hi, I need to list out the processes which are started/restarted today in my Solaris box. If not possible need to convert the process uptime in minutes or seconds and compare it with a configurable value to list out those process ids for further processing in my scripting. Can any one guide... (7 Replies)
Discussion started by: ananan
7 Replies

3. Shell Programming and Scripting

Search process ids

Hi, I have four tomcat instances named PNK, PNK1, PNK2, PNK3. All are running on the same server. To kill tomcat instance I usually do below for PNK1,PNK2,PNK3 kill -9 `ps -ef|grep tomcat|grep PNK1|grep -v grep|awk '{print $2}'` But the above command does not work for PNK. Can some... (7 Replies)
Discussion started by: lpprasad321
7 Replies

4. Shell Programming and Scripting

ps returning more process ids

Please help me with this question I have a under /home/mydir which is a caller to another script "" under /home/anotherdir ----------------------------------------------------------- /home/mydir/ ------------------------------------------------------------... (6 Replies)
Discussion started by: guruincredible
6 Replies

5. Shell Programming and Scripting

Script for to kill the process Ids when restarting the unix server

Hi, I need a script to kill the process Ids for the user ABC. I prepared the following script after that while logging with user therough script i am not sure how to pass the user name and password.Can ou modify the script and help me out. #!/bin/bash for filesize in $(ls -ltr | grep... (4 Replies)
Discussion started by: victory
4 Replies

6. AIX

Process ids consuming huge resources ?

Hi All what is the command to check process ids , which are running from long time and which are consuming more cpu? Also how to check, what a particular PID is running what For Ex: i have a pid :3223722 which is running since from long time, if i want to check what is this... (1 Reply)
Discussion started by: sidharthmellam
1 Replies

7. UNIX for Dummies Questions & Answers

Scripting - process and user ids...Help please

Hello all: Working on a job I was asked get a simple script to perform the following task and would like to ask for some help. I'm looking forward to learning more and diving deeper into the World of Open Source servers. I need a script for a Unix server, using as few lines as possible, that... (4 Replies)
Discussion started by: moahten
4 Replies

8. Shell Programming and Scripting

script to loop all process ids and take pmap

Hi all, I need a script that will loop around all the current processes and take a pmap -x <process id> and output each pmap to a separate file. Would anyone have a quick command to do this? (2 Replies)
Discussion started by: borderblaster
2 Replies

9. Programming

Creating an array to hold posix thread ids: Only dynamic array works

I am facing a strange error while creating posix threads: Given below are two snippets of code, the first one works whereas the second one gives a garbage value in the output. Snippet 1 This works: -------------- int *threadids; threadids = (int *) malloc (num_threads * sizeof(int)); ... (4 Replies)
Discussion started by: kmehta
4 Replies

10. UNIX for Advanced & Expert Users

Problem to track process IDs in HP-UX machine

Hello All, I need to track the exact process ID related to a particular application running on HP-UX machine. i.e. the exact functionality of fuser unix command. fuser application.log // It gives the exact process ID for application.log Since there is no provision for 'fuser' in HP-UX... (13 Replies)
Discussion started by: abhishek0071
13 Replies
Login or Register to Ask a Question
P_CANDEBUG(9)						   BSD Kernel Developer's Manual					     P_CANDEBUG(9)

p_candebug -- determine debuggability of a process SYNOPSIS
#include <sys/param.h> #include <sys/proc.h> int p_candebug(struct thread *td, struct proc *p); DESCRIPTION
This function can be used to determine if a given process p is debuggable by the thread td. SYSCTL VARIABLES
The following sysctl(8) variables directly influence the behaviour of p_candebug(): kern.securelevel Debugging of the init process is not allowed if this variable is 1 or greater. security.bsd.unprivileged_proc_debug Must be set to a non-zero value to allow unprivileged processes access to the kernel's debug facilities. RETURN VALUES
The p_candebug() function returns 0 if the process denoted by p is debuggable by thread td, or a non-zero error return value otherwise. ERRORS
[EACCESS] The MAC subsystem denied debuggability. [EAGAIN] Process p is in the process of being exec()'ed. [EPERM] Thread td lacks super-user credentials and process p is executing a set-user-ID or set-group-ID executable. [EPERM] Thread td lacks super-user credentials and process p's group set is not a subset of td's effective group set. [EPERM] Thread td lacks super-user credentials and process p's user IDs do not match thread td's effective user ID. [EPERM] Process p denotes the initial process initproc() and the sysctl(8) variable kern.securelevel is greater than zero. [ESRCH] Process p is not visible to thread td as determined by cr_seeotheruids(9) or cr_seeothergids(9). [ESRCH] Thread td has been jailed and process p does not belong to the same jail as td. [ESRCH] The MAC subsystem denied debuggability. SEE ALSO
jail(2), sysctl(8), cr_seeothergids(9), cr_seeotheruids(9), mac(9), p_cansee(9), prison_check(9) BSD
November 19, 2006 BSD