Sponsored Content
Top Forums Shell Programming and Scripting Find execution time of script Post 302828361 by Scott on Tuesday 2nd of July 2013 10:07:03 AM
Old 07-02-2013
If you're using Solaris, %s does not work. You can try Perl:

Code:
START=$(perl -e 'print time();')

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

script execution time calculation

I am writting a script in the ksh shell and am trying to find a way to report the total execution time of the script without requiring the user to specify the time function when executing the script. Does anyone have any examples they have used. I have been setting up two date variables (one at... (9 Replies)
Discussion started by: johnsonbryce
9 Replies

2. Shell Programming and Scripting

time of execution of script

i want to test whether a script has been executed in last 15 days or not....please help how can i do this...is there any copmmand there to know timings of last execution of any script (8 Replies)
Discussion started by: arghya_owen
8 Replies

3. Shell Programming and Scripting

How to find the time taken for a script to run?

I have just written a Csh script and i want to find out how long does the script take to complete executing. Is there any codes which i can put into my script to capture its run time ? (9 Replies)
Discussion started by: Raynon
9 Replies

4. Shell Programming and Scripting

get execution time of a script

Hi, I have a simple question. How can I get the execution time of a script and maybe put it in a variable? Another question. How can I get only time and not date and put it in a variable? I tried something with "date" command but with no success... If someone could help me... (8 Replies)
Discussion started by: Moumou
8 Replies

5. UNIX for Dummies Questions & Answers

script start and end of execution of time

Hi All, Can we get to know the start time and end time of execution of a script? (This script doesn't write any logs.) I mean, is there any built in process logs to track these records? (2 Replies)
Discussion started by: siba.s.nayak
2 Replies

6. Shell Programming and Scripting

execution time / runtime -- bash script please help!

Hello, I'm running a bash script and I'd like to get more accurate a runtime information then now. So far I've been using this method: STARTM=`date -u "+%s"` ......... *script function.... ......... STOPM=`date -u "+%s"` RUNTIMEM=`expr $STOPM - $STARTM` if (($RUNTIMEM>59)); then... (6 Replies)
Discussion started by: TehOne
6 Replies

7. Shell Programming and Scripting

what would a script include to find CPU's %system time high and user time high?

Hi , I am trying to :wall: my head while scripting ..I am really new to this stuff , never did it before :( . how to find cpu's system high time and user time high in a script?? thanks , help would be appreciated ! :) (9 Replies)
Discussion started by: sushwey
9 Replies

8. HP-UX

Script execution is very slow when trying to find all files and their owners on HP-UX box

Hi, I have a HP-UX server were I need to list all the files in the entire file system, their directory path, last modified date, owner and group. I do not need to search the file contents. I created the script given below and I am excluding directories and files of type tmp, temp and log. The... (4 Replies)
Discussion started by: Adyan Faruqi
4 Replies

9. Shell Programming and Scripting

Optimizing script to reduce execution time

AFILENAME=glow.sh FILENAME="/${AFILENAME}" WIDTHA=$(echo ${FILENAME} | wc -c) NTIME=0 RESULTS=$(for eachletter in $(echo ${FILENAME} | fold -w 1) do WIDTHTIMES=$(awk "BEGIN{printf... (5 Replies)
Discussion started by: SkySmart
5 Replies

10. Shell Programming and Scripting

To take script execution time

Hello Guys, I would like to know is there a way to take the script execution time For e.g i am having a script.sh i need to write inside he script.sh like Start time : 10-Mar-2016 02:30:35 all code over here ... End time : 10-Mar-2016 03:30:32 Script start time - 02:30:35 ... (7 Replies)
Discussion started by: Master_Mind
7 Replies
UDHCPD.CONF(5)						 GNU/Linux Administrator's Manual					    UDHCPD.CONF(5)

NAME
udhcpd.conf - udhcp server configuration file DESCRIPTION
The file /etc/udhcpd.conf contains configuration information specific to the udhcp server. It should contain one configuration keyword per line, followed by appropriate configuration information. OPTIONS
start ADDRESS The starting address of the IP lease block is ADDRESS. The default is 192.168.0.20. end ADDRESS The ending address of the IP lease block is ADDRESS. The default is 192.168.0.254. interface INTERFACE The udhcp server should listen on INTERFACE. The default is eth0. max_leases LEASES Offer at most LEASES leases (including those reserved by OFFERs, DECLINEs, and ARP conflicts). The default is 254. remaining REMAINING If REMAINING is yes, store the time remaining for each lease. If it is no, store the expiration time for each lease. The default is yes. auto_time SECONDS Write the lease information to a file every SECONDS seconds. The default is 7200. decline_time SECONDS Reserve an IP for SECONDS seconds if a DHCP decline message is received. The default is 3600. conflict_time SECONDS Reserve an IP for SECONDS seconds if an ARP conflict occurs. The default is 3600. offer_time SECONDS Reserve an IP for SECONDS seconds if it is offered. The default is 60. min_lease SECONDS Reserve an IP for the full lease time if the lease to be given is less than SECONDS seconds. The default is 60. lease_file FILE Write the lease information to FILE. The default is /var/lib/misc/udhcpd.leases. pidfile FILE Write the process ID to FILE. The default is /var/run/udhcpd.pid. notify_file FILE Execute FILE after the lease information is written. By default, no file is executed. siaddr ADDRESS BOOTP specific option. The default is 0.0.0.0. sname NAME BOOTP specific option. There is no default. boot_file FILE BOOTP specific option. There is no default. option OPTION DHCP specific option. subnet ADDRESS timezone OFFSET router ADDRESS... timesvr ADDRESS... namesvr ADDRESS... dns ADDRESS... logsvr ADDRESS... cookiesvr ADDRESS... lprsvr ADDRESS... hostname HOSTNAME bootsize SIZE domain DOMAIN swapsvr ADDRESS rootpath PATH ipttl TTL mtu MTU broadcast ADDRESS ntpsrv ADDRESS... wins ADDRESS... requestip ADDRESS lease SECONDS dhcptype TYPE serverid ADDRESS tftp FILE bootfile FILE The default for lease is 864000. There are no defaults for the other options. SEE ALSO
udhcpd(8). GNU
/Linux 2001-09-26 UDHCPD.CONF(5)
All times are GMT -4. The time now is 12:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy