I have a requirement wherein i need to have a generic file watcher in place.
On presence of a file in a particular directory,the file watcher should identify the related config file and execute the series of the shell scripts mentioned in the config file.
eg.Config file
In this case,we can have
a.sh executed first followed sequentially
by b.sh,c.sh,d.sh which can be executed in parallel.post b.sh,c.sh and d.sh execution successfully,
e.sh needs to be executed.
Also for each shell script their stderr and stdout should be logged.
So overall,the file watcher might watch for any file existence in a particular directory again configured in a master file.
eg.contents of the master file
ABC.config might be as below:
PQR.config might be as below:
Would it be possible to achieve this using basic bash shell scripting?
Regards,
Dikesh Shah.
Last edited by jim mcnamara; 04-14-2013 at 08:23 PM..
How do I update, change, reconfigure or whatever it is that I have to do, in order to rid the GENERIC label. It just means that it is the basic kernel shipped with the OS right? Im using FBSD 4.5 (2 Replies)
Hi everyone,
Please find the script for Filewatcher rule file,which does the simple job of moving the files whenever it dectects to another directory.And whenever it detects the cmd_mm.stop file,it should terminate the job.
INTERVAL 60
ON_FILEWATCH ${HLD}/CMD/* CREATE 0 1 2 0400 5
THEN... (2 Replies)
Hi All,
Sorry to post these many questions on UNIX. i am new to unix & got only UNIX work in my organization.
I need to make a script for File Arrival Check.
1. The script should wait for indicator file for configured amount of time.
2. If the file is not received after the configured... (4 Replies)
can we copy higher version aclocal to our software.
Is there any good book for automake,aclocal.m4,configure.sub,configure.guess that explains clearly about how they are related , how to modify them etc
Thanks
Gopi (1 Reply)
Hi,
A ------> B ------> C
I have a scenario where each day, my server B would ftp to server A and pull (A,B,C,D,E) from a specific directory.
Server C would need files (B,D) only when server B finished receiving from server A. These files change everyday, so sometimes it takes longer... (3 Replies)
Hi Friends
iam using a filewatcher job which checks the path in intervals
below is the script
#!/bin/ksh
fileflag=0
timer1=0
check_interval=120 # check every 2 minutes
(( check_interval_minutes=${check_interval}/60 ))
while
do
if
then
echo "My file exists now..." | mailx -s... (7 Replies)
hi All,
I ned to write a filewatcher script, with following requirements.
1. The script should look for the file in every 5 min.
2. If the file is found, it should check in every 3 min the size of file.
3. if the file size has not changed in last 4 iterations (i.e. in last 12 min), the... (2 Replies)
Discussion started by: alok2082
2 Replies
LEARN ABOUT OSX
netsnmp_watcher
watcher(3) net-snmp watcher(3)NAME
watcher - Watch a specified variable and process it as an instance or scalar object.
Functions
netsnmp_mib_handler * netsnmp_get_watcher_handler (void)
netsnmp_watcher_info * netsnmp_create_watcher_info (void *data, size_t size, u_char type, int flags)
int netsnmp_register_watched_instance (netsnmp_handler_registration *reginfo, netsnmp_watcher_info *watchinfo)
int netsnmp_register_watched_scalar (netsnmp_handler_registration *reginfo, netsnmp_watcher_info *watchinfo)
int netsnmp_watcher_helper_handler (netsnmp_mib_handler *handler, netsnmp_handler_registration *reginfo, netsnmp_agent_request_info
*reqinfo, netsnmp_request_info *requests)
netsnmp_mib_handler * netsnmp_get_watched_timestamp_handler (void)
int netsnmp_watched_timestamp_register (netsnmp_mib_handler *whandler, netsnmp_handler_registration *reginfo, marker_t timestamp)
int netsnmp_register_watched_timestamp (netsnmp_handler_registration *reginfo, marker_t timestamp)
int netsnmp_watched_timestamp_handler (netsnmp_mib_handler *handler, netsnmp_handler_registration *reginfo, netsnmp_agent_request_info
*reqinfo, netsnmp_request_info *requests)
netsnmp_mib_handler * netsnmp_get_watched_spinlock_handler (void)
int netsnmp_register_watched_spinlock (netsnmp_handler_registration *reginfo, int *spinlock)
int netsnmp_watched_spinlock_handler (netsnmp_mib_handler *handler, netsnmp_handler_registration *reginfo, netsnmp_agent_request_info
*reqinfo, netsnmp_request_info *requests)
int netsnmp_register_ulong_scalar (const char *name, oid *reg_oid, size_t reg_oid_len, u_long *it, Netsnmp_Node_Handler *subhandler)
int netsnmp_register_read_only_ulong_scalar (const char *name, oid *reg_oid, size_t reg_oid_len, u_long *it, Netsnmp_Node_Handler
*subhandler)
int netsnmp_register_long_scalar (const char *name, oid *reg_oid, size_t reg_oid_len, long *it, Netsnmp_Node_Handler *subhandler)
int netsnmp_register_read_only_long_scalar (const char *name, oid *reg_oid, size_t reg_oid_len, long *it, Netsnmp_Node_Handler *subhandler)
int netsnmp_register_int_scalar (const char *name, oid *reg_oid, size_t reg_oid_len, int *it, Netsnmp_Node_Handler *subhandler)
int netsnmp_register_read_only_int_scalar (const char *name, oid *reg_oid, size_t reg_oid_len, int *it, Netsnmp_Node_Handler *subhandler)
int netsnmp_register_read_only_counter32_scalar (const char *name, oid *reg_oid, size_t reg_oid_len, u_long *it, Netsnmp_Node_Handler
*subhandler)
Detailed Description
Watch a specified variable and process it as an instance or scalar object.
Version 5.4.2 5 Sep 2008 watcher(3)