Sponsored Content
Top Forums Shell Programming and Scripting Trigger functionality in Unix Post 302687789 by cratercrabs on Friday 17th of August 2012 04:54:53 AM
Old 08-17-2012
Trigger functionality in Unix

Hi,

I want a script , which searches the log for the term/phrase "JFSnapshotService::systemSnapshot: Starting data capture. This may take awhile depending upon system workload." and if there is some logging like this, it has to mail me that this data capture process is happening.,

Below is the sample log. The problem is the logs are getting generated for other process also so with timestamp as condition it should search for this term, the script will be scheduled to run every 15/30 minutes. So the logic should be that script should search the logs from the timestamp it has previously run to that current time.

Sample log:
Code:
2012 Aug 07 00:00:10 27394 12 5 JFSnapshotService::systemSnapshot: Starting data capture. This may take awhile depending upon system workload.
2012 Aug 07 06:22:54 27394 41 3 JFEauthManager::verifyEauth: eauth len=10 failed; rc=0
2012 Aug 08 22:24:13 27394 4 3 JFInstanceManager::applyPolicy_ (): Failed to remove flow ID 1722358.
2012 Aug 08 23:24:14 27394 4 3 JFInstanceManager::applyPolicy_ (): Failed to remove flow ID 1722365.
2012 Aug 09 00:00:10 27394 12 5 JFSnapshotService::systemSnapshot: Starting data capture. This may take awhile depending upon system workload.


Last edited by Franklin52; 08-17-2012 at 06:29 AM.. Reason: Please use code tags for data and code samples
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Sed functionality

I have a few xml files and I want to input say 5 parameters within each file. is it possible to do so with sed? <parameter>A</parameter> <parameter>B</parameter> .... .... And so on. These parameters are meant to go in just inside: <?xml... (2 Replies)
Discussion started by: collern2
2 Replies

2. UNIX for Dummies Questions & Answers

How to send a trigger file from Unix to Windows

I need to send a file from a Unix box to a Windows sever to kick off a Crystal Reports job. Any good ideas how to do this? Can it be done with FTP? (0 Replies)
Discussion started by: robw95
0 Replies

3. UNIX for Advanced & Expert Users

Need Help with Unix/AIX functionality

I'll start this out by saying that I'm super-new to UNIX and need some help. My setup is as follows: I am currently running 3 UNIX boxes, 2 application servers and 1 db server. The first application server is my production box, the second application server is my test box, and the db server... (1 Reply)
Discussion started by: dkeaton
1 Replies

4. UNIX for Dummies Questions & Answers

using functionality in another ksh

i have a function defined in one ksh i want to use the same functionality in another ksh i am using . ../<ksh name> but it is not picking that functionality what i have to do for the same (2 Replies)
Discussion started by: trichyselva
2 Replies

5. Shell Programming and Scripting

Trigger whoever logged in sqlplus through UNIX

We had a requirement like we should find the user whoever logged into sqlplus through UNIX automatically. For that we should write a script and store the result in file. we will get that user manually by using WHO command. can anybody help me how to trigger? I tried many commands beyond... (1 Reply)
Discussion started by: siri_886
1 Replies

6. UNIX for Advanced & Expert Users

Functionality of ant build and ant deploy unix commands

I have made some code changes in the corresponding java file for date formatting purpose so that it supports upgraded sybase version from 12.6 to 12.7 and have build the code and deployed using the following UNIX commands. ant build ant deploy. "ant build" executes the build.xml which is... (1 Reply)
Discussion started by: vmpcit
1 Replies

7. Shell Programming and Scripting

Update trigger for unix file (solaris)

Hello, from log error file of process that i's updating in append mode, i need to capture the new entries for every day. How i can know and save only the new errors? This it's a sample of error log file (oas report server engine) thanks and regards Fran (2 Replies)
Discussion started by: fran61
2 Replies

8. Shell Programming and Scripting

Pipe Functionality

Hi, I am trying to emulate the '|' functionality through pipe function call. I am passing the o/p of exec in parent as input to the exec in child. The buf is readin the o/p but the exec in child is not working. Can somebody checkout the code and point where am i going wrong or missing something.... (3 Replies)
Discussion started by: amejoish
3 Replies

9. Shell Programming and Scripting

Source trigger in Unix shell

Hi All, Is ther any way to write the script with source trigger ? To trigger the script on particular time we have crontab. Similarly in a path, when a file comes particular script has to run. Thanks:) (7 Replies)
Discussion started by: jesu
7 Replies

10. UNIX for Dummies Questions & Answers

Zip -r Functionality

Hi , I've written the following code to zip the big file $dir_temp ="/home/etc/hst zip -r $dir_temp/file_nm.zip $dir_temp/file_nm The zip file has been created . When I try to UNZIP the file with the following command unzip file_nm.zip The file got unzipped but created in the... (3 Replies)
Discussion started by: smile689
3 Replies
GEARMANCLIENT(3)							 1							  GEARMANCLIENT(3)

The GearmanClient class

INTRODUCTION
Represents a class for connecting to a Gearman job server and making requests to perform some function on provided data. The function per- formed must be one registered by a Gearman worker and the data passed is opaque to the job server. CLASS SYNOPSIS
GearmanClient GearmanClient Methods o public bool GearmanClient::addOptions (int $options) o public bool GearmanClient::addServer ([string $host = 127.0.0.1], [int $port = 4730]) o public bool GearmanClient::addServers ([string $servers = 127.0.0.1:4730]) o public GearmanTask GearmanClient::addTask (string $function_name, string $workload, [mixed &$context], [string $unique]) o public GearmanTask GearmanClient::addTaskBackground (string $function_name, string $workload, [mixed &$context], [string $unique]) o public GearmanTask GearmanClient::addTaskHigh (string $function_name, string $workload, [mixed &$context], [string $unique]) o public GearmanTask GearmanClient::addTaskHighBackground (string $function_name, string $workload, [mixed &$context], [string $unique]) o public GearmanTask GearmanClient::addTaskLow (string $function_name, string $workload, [mixed &$context], [string $unique]) o public GearmanTask GearmanClient::addTaskLowBackground (string $function_name, string $workload, [mixed &$context], [string $unique]) o public GearmanTask GearmanClient::addTaskStatus (string $job_handle, [string &$context]) o public bool GearmanClient::clearCallbacks (void ) o public GearmanClient GearmanClient::clone (void ) o public GearmanClient::__construct (void ) o public string GearmanClient::context (void ) o public string GearmanClient::data (void ) o public string GearmanClient::do (string $function_name, string $workload, [string $unique]) o public string GearmanClient::doBackground (string $function_name, string $workload, [string $unique]) o public string GearmanClient::doHigh (string $function_name, string $workload, [string $unique]) o public string GearmanClient::doHighBackground (string $function_name, string $workload, [string $unique]) o public string GearmanClient::doJobHandle (void ) o public string GearmanClient::doLow (string $function_name, string $workload, [string $unique]) o public string GearmanClient::doLowBackground (string $function_name, string $workload, [string $unique]) o public string GearmanClient::doNormal (string $function_name, string $workload, [string $unique]) o public array GearmanClient::doStatus (void ) o public bool GearmanClient::echo (string $workload) o public string GearmanClient::error (void ) o public int GearmanClient::getErrno (void ) o public array GearmanClient::jobStatus (string $job_handle) o public bool GearmanClient::ping (string $workload) o public bool GearmanClient::removeOptions (int $options) o public int GearmanClient::returnCode (void ) o public bool GearmanClient::runTasks (void ) o public void GearmanClient::setClientCallback (callable $callback) o public bool GearmanClient::setCompleteCallback (callable $callback) o public bool GearmanClient::setContext (string $context) o public bool GearmanClient::setCreatedCallback (string $callback) o public bool GearmanClient::setData (string $data) o public bool GearmanClient::setDataCallback (callable $callback) o public bool GearmanClient::setExceptionCallback (callable $callback) o public bool GearmanClient::setFailCallback (callable $callback) o public bool GearmanClient::setOptions (int $options) o public bool GearmanClient::setStatusCallback (callable $callback) o public bool GearmanClient::setTimeout (int $timeout) o public bool GearmanClient::setWarningCallback (callable $callback) o public bool GearmanClient::setWorkloadCallback (callable $callback) o public int GearmanClient::timeout (void ) PHP Documentation Group GEARMANCLIENT(3)
All times are GMT -4. The time now is 12:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy