Sponsored Content
Operating Systems Solaris Process execution time in milliseconds Post 302531611 by maniac_ie on Friday 17th of June 2011 09:23:09 AM
Old 06-17-2011
Process execution time in milliseconds

Hey everyone,
I'm coming from Linux where the top command gave me lots of process
info (particularly CPU time in milliseconds) and I'm trying to find
similar info in Solaris.

So far I've looked at prstat and ps but neither give cpu time in
milliseconds, both seem to have 1 second as the time granularity.

Is there a way to get millisecond time granularity from the prstat or
ps command in Solaris or is there some other command I should use? Im
using Solaris 10 8/07 s10x_u4wos_12b X86.

Cheers!

Rob
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

useing date or other time style utility to get milliseconds.

hello everyone. im sure someone has run into the problem of timestamping files and end up haveing 2 files with the same name thus over writeing one of them. In my application i am trying to get a timestamp w/ milliseconds but i am haveing no luck and finding an answer in the man pages. I know... (3 Replies)
Discussion started by: Optimus_P
3 Replies

2. Programming

C time in milliseconds function.

I need a c function which return the time in: hour min sec and mil sec I am writing on unix os. (3 Replies)
Discussion started by: kamil
3 Replies

3. Programming

execution time

hi , i ve coded a C program in that im using malloc dynamically , it is being called many times in the program The program is to simulate jobs in manufacturing system. the execution time is increasing drastically as the number of jobs are increased. could any body tel what may be the problem... (2 Replies)
Discussion started by: ramki_rk
2 Replies

4. Shell Programming and Scripting

Convert milliseconds to standard time

hello, I have the uptime of the server showing as upTime=2427742050 How do I convert it to standard time. Thanks Chiru (1 Reply)
Discussion started by: chiru_h
1 Replies

5. UNIX for Advanced & Expert Users

specifying an execution time

Hi all, do ny o u'll know how to set a particular execution time for a program??? for eg.: --> during the execution of a file, i call a certain other function. --> while calling this function, my comp hangs. now is there ny way in which i can go to the nxt line of code by aborting the call... (7 Replies)
Discussion started by: VGR
7 Replies

6. UNIX for Dummies Questions & Answers

how to Decrease priority of a particular process in time of process creation

how to decrease priority of a particular process in time of process creation... and also how to decrease priority of a particular process after process creation.. can any one please help me out... (2 Replies)
Discussion started by: Ramkum
2 Replies

7. Shell Programming and Scripting

Getting Time in MilliSeconds with Perl

I use something like this in perl to get the date and time: use Time::localtime; use Time::gmtime; $tm = gmtime; $time_str = sprintf "%04d-%02d-%02d %02d:%02d:%02d", $tm->year + 1900, $tm->mon + 1, $tm->mday, $tm->hour, $tm->min, $tm->sec; It gives me something like this: 2010-08-26... (1 Reply)
Discussion started by: lforum
1 Replies

8. Shell Programming and Scripting

How to calculate time difference between start and end time of a process!

Hello All, I have a problem calculating the time difference between start and end timings...! the timings are given by 24hr format.. Start Date : 08/05/10 12:55 End Date : 08/09/10 06:50 above values are in mm/dd/yy hh:mm format. Now the thing is, 7th(08/07/10) and... (16 Replies)
Discussion started by: smarty86
16 Replies

9. UNIX for Dummies Questions & Answers

time taken for execution

how much time a particular command or shell script executed there is any command to know this thanks (5 Replies)
Discussion started by: tsurendra
5 Replies

10. Shell Programming and Scripting

Calculate Time diff in milli milliseconds(Time format : HH:MM:SS,NNN)

Hi All, I have one file which contains time for request and response. I want to calculate time difference in milliseconds for each line. This file can contain 10K lines. Sample file with 4 lines. for first line. Request Time: 15:23:45,255 Response Time: 15:23:45,258 Time diff... (6 Replies)
Discussion started by: Raza Ali
6 Replies
after(3)						User Contributed Perl Documentation						  after(3)

NAME
Tk::after - Execute a command after a time delay SYNOPSIS
$widget->after(ms) $id = $widget->after(ms?,callback?) $id = $widget->repeat(ms?,callback?) $widget->afterCancel($id) $id = $widget->afterIdle(callback) $widget->afterInfo?($id)? $id->time(?delay?) DESCRIPTION
This method is used to delay execution of the program or to execute a callback in background sometime in the future. In perl/Tk $widget->after is implemented via the class "Tk::After", and callbacks are associated with $widget, and are automatically cancelled when the widget is destroyed. An almost identical interface, but without automatic cancel, and without repeat is provided via Tk::after method. Internal Details The internal Tk::After class has the following synopsis: $id = Tk::After->new($widget, tid, $time, 'once', callback); $id = Tk::After->new($widget, tid, $time, 'repeat', callback); $id->cancel; $id->time(?delay?); $id is a Tk::After object, an array of 5 elements: $widget is the parent widget reference. tid is the internal timer id, a unique string. $time is the string 'idle', representing an idle queue timer, or a integer millisecond value. once or repeat specifies whether the timer is a one-time after event, or a repeating repeat event. callback specifies a Perl/Tk Tk::Callback object. Changing a repeat timer interval It's posible to change a repeat timer's delay value, or even cancel any timer, using the time method. If delay is specified and non-zero, a new timer delay is established. If delay is zero the timer event is canceled just as if $id->cancel were invoked. In all cases the current millisecond timer delay is returned. Note: the new timer delay will take effect on the subsequent timer event - this command will not cancel the pending timer event and re- issue it with the new delay time. The after() method has several forms as follows: $widget->after(ms) The value ms must be an integer giving a time in milliseconds. The command sleeps for ms milliseconds and then returns. While the command is sleeping the application does not respond to events. $widget->after(ms,callback) In this form the command returns immediately, but it arranges for callback be executed ms milliseconds later as an event handler. The callback will be executed exactly once, at the given time. The command will be executed in context of $widget. If an error occurs while executing the delayed command then the Tk::Error mechanism is used to report the error. The after command returns an identifier (an object in the perl/Tk case) that can be used to cancel the delayed command using afterCancel. $widget->repeat(ms,callback) In this form the command returns immediately, but it arranges for callback be executed ms milliseconds later as an event handler. After callback has executed it is re-scheduled, to be executed in a futher ms, and so on until it is cancelled. $widget->afterCancel($id) $id->cancel Cancels the execution of a delayed command that was previously scheduled. $id indicates which command should be canceled; it must have been the return value from a previous after command. If the command given by $id has already been executed (and is not scheduled to be executed again) then afterCancel has no effect. $widget->afterCancel(callback) This form is not robust in perl/Tk - its use is deprecated. This command should also cancel the execution of a delayed command. The callback argument is compared with pending callbacks, if a match is found, that callback is cancelled and will never be executed; if no such callback is currently pending then the afterCancel has no effect. $widget->afterIdle(callback) Arranges for callback to be evaluated later as an idle callback. The script will be run exactly once, the next time the event loop is entered and there are no events to process. The command returns an identifier that can be used to cancel the delayed command using afterCancel. If an error occurs while executing the script then the Tk::Error mechanism is used to report the error. $widget->afterInfo?($id)? This command returns information about existing event handlers. If no $id argument is supplied, the command returns a list of the identifiers for all existing event handlers created by the after and repeat commands for $widget. If $id is supplied, it specifies an existing handler; $id must have been the return value from some previous call to after or repeat and it must not have triggered yet or been cancelled. In this case the command returns a list with three elements. The first element of the list is the callback associated with $id, the second element is either idle or the integer timer millisecond value to indicate what kind of event handler it is, and the third is a string once or repeat to differentiate an after from a repeat event. The after(ms) and afterIdle forms of the command assume that the application is event driven: the delayed commands will not be executed unless the application enters the event loop. In applications that are not normally event-driven, the event loop can be entered with the vwait and update commands. SEE ALSO
Tk::Error Tk::callbacks KEYWORDS
cancel, delay, idle callback, sleep, time perl v5.12.1 2007-05-05 after(3)
All times are GMT -4. The time now is 04:35 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy