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 PHP
pg_send_query
PG_SEND_QUERY(3)PG_SEND_QUERY(3)pg_send_query - Sends asynchronous querySYNOPSIS
bool pg_send_query (resource $connection, string $query)
DESCRIPTION pg_send_query(3) sends a query or queries asynchronously to the $connection. Unlike pg_query(3), it can send multiple queries at once to
PostgreSQL and get the results one by one using pg_get_result(3).
Script execution is not blocked while the queries are executing. Use pg_connection_busy(3) to check if the connection is busy (i.e. the
query is executing). Queries may be cancelled using pg_cancel_query(3).
Although the user can send multiple queries at once, multiple queries cannot be sent over a busy connection. If a query is sent while the
connection is busy, it waits until the last query is finished and discards all its results.
PARAMETERS
o $connection
- PostgreSQL database connection resource.
o $query
- The SQL statement or statements to be executed. Data inside the query should be properly escaped.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
Use pg_get_result(3) to determine the query result.
EXAMPLES
Example #1
pg_send_query(3) example
<?php
$dbconn = pg_connect("dbname=publisher") or die("Could not connect");
if (!pg_connection_busy($dbconn)) {
pg_send_query($dbconn, "select * from authors; select count(*) from authors;");
}
$res1 = pg_get_result($dbconn);
echo "First call to pg_get_result(): $res1
";
$rows1 = pg_num_rows($res1);
echo "$res1 has $rows1 records
";
$res2 = pg_get_result($dbconn);
echo "Second call to pg_get_result(): $res2
";
$rows2 = pg_num_rows($res2);
echo "$res2 has $rows2 records
";
?>
The above example will output:
First call to pg_get_result(): Resource id #3
Resource id #3 has 3 records
Second call to pg_get_result(): Resource id #4
Resource id #4 has 1 records
SEE ALSO pg_query(3), pg_cancel_query(3), pg_get_result(3), pg_connection_busy(3).
PHP Documentation Group PG_SEND_QUERY(3)