What does this mean?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting What does this mean?
# 8  
Old 10-22-2013
Check if the TIME environment variable is set, and to which value. Then check TIME's elements against man time.
# 9  
Old 10-22-2013
I see nothing in that Perl script which would cause that line to be printed. I suspect your script is calling it in a manner similar to time ./scriptname or time perl ./scriptname

I don't recognize most of the rest of that string, the TIME variable might be revealing.
# 10  
Old 10-22-2013
Quote:
Originally Posted by RudiC
Check if the TIME environment variable is set, and to which value.
Is that a widely-adopted variable? I've never heard of it. I would be grateful for any pointer to TIME documentation.

Regards,
Alister

---------- Post updated at 08:49 PM ---------- Previous update was at 08:30 PM ----------

From a tcsh man page:

Code:
       time    If set to a number, then the time builtin (q.v.) executes auto-
	       matically after each command which takes more  than  that  many
	       CPU seconds.  If there is a second word, it is used as a format
	       string for the output of the time builtin.  (u)	The  following
	       sequences may be used in the format string:

	       %U  The time the process spent in user mode in cpu seconds.
	       %S  The time the process spent in kernel mode in cpu seconds.
	       %E  The elapsed (wall clock) time in seconds.
	       %P  The CPU percentage computed as (%U + %S) / %E.
	       %W  Number of times the process was swapped.
	       %X  The average amount in (shared) text space used in Kbytes.
	       %D  The	average  amount in (unshared) data/stack space used in
		   Kbytes.
	       %K  The total space used (%X + %D) in Kbytes.
	       %M  The maximum memory the process had in use at  any  time  in
		   Kbytes.
	       %F  The	number of major page faults (page needed to be brought
		   from disk).
	       %R  The number of minor page faults.
	       %I  The number of input operations.
	       %O  The number of output operations.
	       %r  The number of socket messages received.
	       %s  The number of socket messages sent.
	       %k  The number of signals received.
	       %w  The number of voluntary context switches (waits).
	       %c  The number of involuntary context switches.

	       Only the first four sequences are supported on systems  without
	       BSD  resource limit functions.  The default time format is `%Uu
	       %Ss %E %P %X+%Dk %I+%Oio %Fpf+%Ww'  for systems  that  support
	       resource  usage	reporting and `%Uu %Ss %E %P' for systems that
	       do not.

The default format matches the OP's output exactly:
Quote:
Originally Posted by manands07
6.355u 1.679s 0:12.68 63.2% 0+0k 0+0io 0pf+0w
Regards,
Alister
These 2 Users Gave Thanks to alister For This Post:
# 11  
Old 10-23-2013
Thank you every1 for your replies.
It was a really good discussion session for me Smilie
Your ans is perfect alister, thnaks.

Cheers !!
-MD
This User Gave Thanks to manands07 For This Post:
# 12  
Old 10-23-2013
Thanks for confirming that you have a solution.


Robin
# 13  
Old 10-23-2013
...and if you'd posted your code the first time we asked, it wouldn't have taken us 2 days to learn that you use the C Shell.
This User Gave Thanks to Corona688 For This Post:
# 14  
Old 10-28-2013
How do you came to know that I use C shell?

And what's the difference between CSH, SH, KSH and all other such variants?

Thank you,
-MD
Login or Register to Ask a Question

Previous Thread | Next Thread
Login or Register to Ask a Question