Sponsored Content
Full Discussion: thread count
Top Forums Shell Programming and Scripting thread count Post 302324220 by radoulov on Wednesday 10th of June 2009 08:58:35 AM
Old 06-10-2009
You should use something like this:

Code:
 ++$TIDcount 
    if / tid (\d+)/ && !$tidUnique{$1}++;

Given you sample data:

Code:
% perl -nle'
  ++$c if / tid (\d+)/ && !$tid{$1}++;
  print $c if eof
  ' infile
2

 

4 More Discussions You Might Find Interesting

1. Programming

How to cancel a thread safely from the initial thread?

how about asynchronous canceling? or with signal? if with signal whether it effects the process? my english so badly :( :( (1 Reply)
Discussion started by: alan.zhao
1 Replies

2. Solaris

thread count using top

I am running a multithreaded program which creates 10 threads and works away. However, when I use top to monitor my program whilst it is running, it only shows 4 under the thread count! Can anyone explain if this is in fact the number of threads running in my process... (0 Replies)
Discussion started by: supahoop
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. Forum Support Area for Unregistered Users & Account Problems

Not able to post thread/reply to thread

Dear Moderator I am not able to post any new thread or post reply to mine old thread. Kindly help as i am stuck on one problem and needed suggestion. Regards Jaydeep (1 Reply)
Discussion started by: jaydeep_sadaria
1 Replies
KILL(3PVM)							  PVM Version 3.4							KILL(3PVM)

NAME
pvm_kill - Terminates a specified PVM process. SYNOPSIS
C int info = pvm_kill( int tid ) Fortran call pvmfkill( tid, info ) PARAMETERS
tid Integer task identifier of the PVM process to be killed (not yourself). info Integer status code returned by the routine. Values less than zero indicate an error. DESCRIPTION
The routine pvm_kill sends a terminate (SIGTERM) signal to the PVM process identified by tid. In the case of multiprocessors the terminate signal is replaced with a host dependent method for killing a process. If pvm_kill is successful, info will be 0. If some error occurs then info will be < 0. pvm_kill is not designed to kill the calling process. To kill yourself in C call pvm_exit() followed by exit(). To kill yourself in For- tran call pvmfexit followed by stop. EXAMPLES
C: info = pvm_kill( tid ); Fortran: CALL PVMFKILL( TID, INFO ) ERRORS
These error conditions can be returned by pvm_kill PvmBadParam giving an invalid tid value. PvmSysErr pvmd not responding. SEE ALSO
pvm_exit(3PVM), pvm_halt(3PVM) 30 August, 1993 KILL(3PVM)
All times are GMT -4. The time now is 12:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy