get Thread information from process


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting get Thread information from process
# 1  
Old 02-12-2007
get Thread information from process

Hello all
im trying to build small script in tcsh that will monitor some process
that are making some api calles to some server .
first of all im trying to find way to see how many threads each process is using , and else how can i print each
Thread id .
can it be done ? ( using sunOs )
# 2  
Old 02-12-2007
ok i found out that :
ps -ef -o "args lwp" | grep "MyProcess" will give me number of Threads
but it scans me all the mechine , how can i scan only my account ?

ps -efu myAccount -o "args lwp" | grep "MyProcess"

do not work
# 3  
Old 02-12-2007
Try:

Code:
ps -fu `whoami`

Regards
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Get the process/thread running on which core

I use top -H -p 1256 to show process 1256, and then press "f" then press "j" to display it is running on which core, is there a better mothed, I want to be automated to get this (1 Reply)
Discussion started by: yanglei_fage
1 Replies

2. Solaris

ZFS get process I/O information

Hi Guys Is it possible to display which process generates the most i/o on my zpool? With # zpool iostst 3 and iostat i just see the general i/o but not the i/o on the process level. thx in advance, Fry (0 Replies)
Discussion started by: fryzh
0 Replies

3. UNIX for Dummies Questions & Answers

Thread count for a process id

Hi, I want to know a command/program to get thread count for a process id in unix box. Please help me in this regard. (1 Reply)
Discussion started by: manaac
1 Replies

4. UNIX for Dummies Questions & Answers

process and thread

i want to know a difference between process and thread,give a program to tell the difference (2 Replies)
Discussion started by: annapurna konga
2 Replies

5. Programming

Need the PID of a process in a thread

How do I run a process from a C++ p_thread and obtain its PID? Right now I am doing in a p_thread: system("ampl method.run"); and into the main function (after running the thread mentioned before): sleep(5); //Just to be sure that the thread is executing the ampl command system("ps... (1 Reply)
Discussion started by: riccollado
1 Replies

6. UNIX for Advanced & Expert Users

How to attach an xterm to a process/thread ?

Hi folks, I would like to know how to hook up an xterm to another process. Here is a high level view of what I am looking for 1. Main program starts 2. It creates an new xterm window 3. It then forks a second process & passes the xterm handle to it 4. The second process uses the second... (4 Replies)
Discussion started by: RipClaw
4 Replies

7. Solaris

Need Information About Process

Hi All:- 1- i am working in unix system that is runnign some script 2- this script put the log file into specific folder 3- the log does not include the start time of the script and the end time What i need to know what is the duration time for each request Note:- I don't any thing... (3 Replies)
Discussion started by: dellsh
3 Replies

8. UNIX for Dummies Questions & Answers

Process information

What sort of statistical information related to a running process can we retrieve using commands? For example, we can get the process id, memory usage and running time of a process using the commands ps and ipcs . Can we get any more information about a running process? Please list them. Also... (4 Replies)
Discussion started by: fermisoft
4 Replies

9. Programming

List of Thread IDs of a process

Hello, Can some one tell how to read the thread IDs of the current process in Sun Solaris. Any help will be appreciated. regards, Murali (0 Replies)
Discussion started by: hmurali
0 Replies

10. UNIX for Advanced & Expert Users

Process Information

Hi, If we have a process p1 running and then p2 attempts to shutdown p1. Is there a means for p1 to know who has requested him to shutdown Thanks and regards, Reji (1 Reply)
Discussion started by: rejise
1 Replies
Login or Register to Ask a Question