pthreads run time information


 
Thread Tools Search this Thread
Top Forums Programming pthreads run time information
# 1  
Old 07-17-2002
Data pthreads run time information

Hello,

Can anybody please tell me how to get the time for which the thread has run in Solaris 5.7.

I am trying to read from /proc/pid/lwp/lwpsinfo. However, I am getting only the start time and not the run time.

I am using pthreads. Also, Is there a way to get the used stack size for the thread ?

Thanks and regards,
Murali
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Show file name included time information

Hi all, I have many files included time information, some of them included time range by 30 minutes; 2007-12-27T110000.txt 2007-12-27T120000.txt 2007-12-27T130000.txt 2007-12-27T150000.txt 2007-12-27T153000.txt 2007-12-28T000000.txt 2007-12-28T003000.txt I only want to echo that... (5 Replies)
Discussion started by: jeo_fb
5 Replies

2. Shell Programming and Scripting

Can we run tail -f for a specified time?

Hi all, I want to check a log file that gets updated very frequently, almost every second. What I want to do from a script is to check this log file 1) for a particular string 2) for a specified time while it is getting updated. And as soon as it finds that particular string the command... (4 Replies)
Discussion started by: pat_pramod
4 Replies

3. Solaris

Java Run Time

I have installed IBM Java Runtime V1.4.2 in solaris. but when i give java -version, it gets me this:java version "1.5.0_20" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_20-b02) Java HotSpot(TM) Client VM (build 1.5.0_20-b02, mixed mode, sharing) can you please tell me how do i... (3 Replies)
Discussion started by: ichwaiznicht
3 Replies

4. Shell Programming and Scripting

Run a bash script, display on the screen and save all information in a file including error info

Hi all, How to: Run a bash script, display on the screen and save all information in a file including error information. For example: I have a bash script called test.sh now I want to run the test.sh and display the output on the screen and save the output including error info to a file. ... (1 Reply)
Discussion started by: Damon sine
1 Replies

5. Programming

Run time Debugging

We have recently downloaded, installed and compiled gcc-3.0.4 code. gcc compiler has built successfully and we where able to compile some same test cpp file. I would like to know how we can modify gcc source code so that we add additional run time debugging statements like the binary in execution... (4 Replies)
Discussion started by: uunniixx
4 Replies

6. Shell Programming and Scripting

last run time of any script

how to find when last time a scrit has ran? (7 Replies)
Discussion started by: RahulJoshi
7 Replies

7. Shell Programming and Scripting

run script for given time

Hi! I need to run my script for a specific number of time, as specified by the user: For instance, if the user specified 10, my script should run for until 10 seconds expire. How do I do this? (0 Replies)
Discussion started by: looza
0 Replies

8. Shell Programming and Scripting

Run script at same time

Hi My five script run throgh crontab at same time at 6 clock. Due to problem in the data load .Now I want to check time of load finish run these jobs. I create a script which check the load finish time but I have no idea how I run these JObs. This is very urget to me. Please reply me as soon... (3 Replies)
Discussion started by: Jamil Qadir
3 Replies

9. Shell Programming and Scripting

not showing restore information while run script

Hello, I have the following script to restore file and grep information. However, once it restore file, it showing a lot useless information and different to check which file have the statement "John price $200". Can I not show any information while running script. It only show..when found the... (1 Reply)
Discussion started by: happyv
1 Replies

10. Programming

Process Run time information

Hello, I am working on Sun Solaris 5.7. I am trying to read the running time of a process through a C program. One way I am reading it is by using the command ps -<pid> -f The other way is from the struct psinfo_t which is there under /proc/pid/psinfo. However, the two times are... (1 Reply)
Discussion started by: hmurali
1 Replies
Login or Register to Ask a Question
pthread_getschedparam(3C)				   Standard C Library Functions 				 pthread_getschedparam(3C)

NAME
pthread_getschedparam, pthread_setschedparam - access dynamic thread scheduling parameters SYNOPSIS
cc -mt [ flag... ] file... -lpthread [ library... ] #include <pthread.h> int pthread_getschedparam(pthread_t thread, int *restrict policy, struct sched_param *restrict param); int pthread_setschedparam(pthread_t thread, int policy, const struct sched_param *param); DESCRIPTION
The pthread_getschedparam() and pthread_setschedparam() functions allow the scheduling policy and scheduling parameters of individual threads within a multithreaded process to be retrieved and set. Supported policies are : SCHED_OTHER traditional time-sharing scheduling class SCHED_FIFO real-time class: run to completion SCHED_RR real-time class: round-robin SCHED_IA interactive time-sharing class SCHED_FSS fair-share scheduling class SCHED_FX fixed priority scheduling class See pthreads(5). The affected scheduling parameter is the sched_priority member of the sched_param structure. The pthread_getschedparam() function retrieves the scheduling policy and scheduling parameters for the thread whose thread ID is given by thread and stores those values in policy and param, respectively. The priority value returned from pthread_getschedparam() is the value specified by the most recent pthread_setschedparam() or pthread_create() call affecting the target thread, and does not reflect any tempo- rary adjustments to its priority as a result of any priority inheritance or ceiling functions. The pthread_setschedparam() function sets the scheduling policy and associated scheduling parameters for the thread whose thread ID is given by thread to the policy and associated parameters provided in policy and param, respectively. If the pthread_setschedparam() function fails, no scheduling parameters will be changed for the target thread. RETURN VALUES
If successful, the pthread_getschedparam() and pthread_setschedparam() functions return 0. Otherwise, an error number is returned to indi- cate the error. ERRORS
The pthread_getschedparam() and pthread_gsetschedparam() functions will fail if: ESRCH The value specified by thread does not refer to an existing thread. The pthread_setschedparam() function will fail if: EINVAL The value specified by policy or one of the scheduling parameters associated with the scheduling policy policy is invalid. EPERM The caller does not have the appropriate permission to set either the scheduling parameters or the scheduling policy of the spec- ified thread. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Committed | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ |Standard |See standards(5). | +-----------------------------+-----------------------------+ SEE ALSO
pthread_attr_init(3C), sched_getparam(3C), sched_get_priority_max(3C)sched_get_priority_max(3C), sched_get_priority_min(3C), sched_set- param(3C), sched_getscheduler(3C), sched_setscheduler(3C), attributes(5), pthreads(5), standards(5) SunOS 5.11 1 Apr 2008 pthread_getschedparam(3C)