Hello all!
I have found a new home, this place is great!
I have been searching for days to find a way to set a max size for a log.txt file using a cron job exicuting a shell script. Is it possible for a script to remove older entries in a log file to maintain a limited file size? If so,... (5 Replies)
hi all,
in my server there are some specific application files which are spread through out the server... these are spread in folders..sub-folders..chid folders...
please help me, how can i find the total size of these specific files in the server... (3 Replies)
Hi,
I'm using Linux 2.6 cross compiled for a embedded powerpc.
Earlier we were using busybox syslogd for logging the messages, but as the flexibilty is less, we decided to move to standard syslog.
Now I want to limit the size of the log file (/var/log/messages) to 128K.
I couldn't find... (4 Replies)
Hi,
I am using fetchmail in my application so as to download mails to the localhost where the application is hosted from the mailserver.Fetchmail is configured as as to run as a daemon polling mails during an interval of 1sec.
So my concern here is, during each 2sec it is writing two... (10 Replies)
Hi Can anyone assist me, I am trying to compate the size of a logfile to a maximum size 1000 and delete if exceeds the limit.
The problem I am getting is the command not found for the line
if ( $LOGNAME_SIZE >= $MAXSIZE); then
Appreciate your response.
Script:
LOGDIR="/home/... (6 Replies)
#!/bin/sh
##########################################################################################################
#This script is being used for AOK application for cleaning up the .out files and zip it under logs directory.
# IBM
# Created
#For pdocap201/pdoca202 .out files for AOK
#1.... (0 Replies)
Just had a migration from Autosys 4.5 to R11.3.
After the migration to R11.3, Autosys jobs have been failing when the log file reaches a size of 800 MB.
This did not happen before the migration, when Autosys 4.5 was used.
Is there a way to configure the file size limit/cap in Autosys... (1 Reply)
How to check log size every 10min. by script (can use crontab)
if log size not change with alert "Log not update"
Base run on SunOS 5.8 Generic_Virtual sun4u sparc SUNW,SPARC-Enterprise
logFiles="log1.log log2.log"
logLocation="/usr/home/test/log/"
Out put.
Tue Jan 31... (3 Replies)
I have been searching both on Unix.com and Google and have not been able to find the answer to my question. I think it is partly because I can't come up with the right search terms.
Recently, my virtual server switched storage devices and I think the problem may be related to that change.... (2 Replies)
Discussion started by: jmgibby
2 Replies
LEARN ABOUT PHP
sqlsrv_cancel
SQLSRV_CANCEL(3)SQLSRV_CANCEL(3)sqlsrv_cancel - Cancels a statementSYNOPSIS
bool sqlsrv_cancel (resource $stmt)
DESCRIPTION
Cancels a statement. Any results associated with the statement that have not been consumed are deleted. After sqlsrv_cancel(3) has been
called, the specified statement can be re-executed if it was created with sqlsrv_prepare(3). Calling sqlsrv_cancel(3) is not necessary if
all the results associated with the statement have been consumed.
PARAMETERS
o $stmt
- The statement resource to be cancelled.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1
sqlsrv_cancel(3) example
<?php
$serverName = "serverNamesqlexpress";
$connectionInfo = array( "Database"=>"dbName", "UID"=>"username", "PWD"=>"password");
$conn = sqlsrv_connect( $serverName, $connectionInfo);
if( $conn === false ) {
die( print_r( sqlsrv_errors(), true));
}
$sql = "SELECT Sales FROM Table_1";
$stmt = sqlsrv_prepare( $conn, $sql);
if( $stmt === false ) {
die( print_r( sqlsrv_errors(), true));
}
if( sqlsrv_execute( $stmt ) === false) {
die( print_r( sqlsrv_errors(), true));
}
$salesTotal = 0;
$count = 0;
while( ($row = sqlsrv_fetch_array( $stmt)) && $salesTotal <=100000)
{
$qty = $row[0];
$price = $row[1];
$salesTotal += ( $price * $qty);
$count++;
}
echo "$count sales accounted for the first $$salesTotal in revenue.<br />";
// Cancel the pending results. The statement can be reused.
sqlsrv_cancel( $stmt);
?>
NOTES
The main difference between sqlsrv_cancel(3) and sqlsrv_free_stmt(3) is that a statement resource cancelled with sqlsrv_cancel(3) can be
re-executed if it was created with sqlsrv_prepare(3). A statement resource cancelled with sqlsrv_free_statement(3) cannot be re-executed.
SEE ALSO sqlsrv_free_stmt(3), sqlsrv_prepare(3).
PHP Documentation Group SQLSRV_CANCEL(3)