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)
How to allocate memory for a shell script on aix box at the time of execution i.e at runtime
Are there any commands for AIX in specific
Thanks in Advance (1 Reply)
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)
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)
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)
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... (3 Replies)
Dear all experts,
Recently the daily batch run process (run using Java Runtime Execution)suddenly run slow. Our apps vendor came in and check and request to reboot the server. After rebooting of the server, the batch run back to normal.
May I know is periodically rebooting of pSeries server is a... (9 Replies)
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
LEARN ABOUT FREEBSD
service
SERVICE(8) BSD System Manager's Manual SERVICE(8)NAME
service -- control (start/stop/etc.) or list system services
SYNOPSIS
service -e
service -R
service [-v] -l | -r
service [-v] <rc.d script> start|stop|etc.
DESCRIPTION
The service command is an easy interface to the rc.d system. Its primary purpose is to start and stop services provided by the rc.d scripts.
When used for this purpose it will set the same restricted environment that is in use at boot time (see below). It can also be used to list
the scripts using various criteria.
The options are as follows:
-e List services that are enabled. The list of scripts to check is compiled using rcorder(8) the same way that it is done in rc(8), then
that list of scripts is checked for an "rcvar" assignment. If present the script is checked to see if it is enabled.
-R Restart all enabled local services.
-l List all files in /etc/rc.d and the local startup directories. As described in rc.conf(5) this is usually /usr/local/etc/rc.d. All
files will be listed whether they are an actual rc.d script or not.
-r Generate the rcorder(8) as in -e above, but list all of the files, not just what is enabled.
-v Be slightly more verbose
ENVIRONMENT
When used to run rc.d scripts the service command sets HOME to / and PATH to /sbin:/bin:/usr/sbin:/usr/bin which is how they are set in
/etc/rc at boot time.
EXIT STATUS
The service utility exits 0 on success, and >0 if an error occurs.
EXAMPLES
The following are examples of typical usage of the service command:
service named status
service -rv
The following programmable completion entry can be use in bash(1) for the names of the rc.d scripts:
_service () {
local cur
cur=${COMP_WORDS[COMP_CWORD]}
COMPREPLY=( $( compgen -W '$( service -l )' -- $cur ) )
return 0
}
complete -F _service service
SEE ALSO bash(1) (ports/shells/bash), rc.conf(5), rc(8), rcorder(8)HISTORY
The service utility first appeared in FreeBSD 7.3.
AUTHORS
This manual page was written by Douglas Barton <dougb@FreeBSD.org>.
BSD December 11, 2012 BSD