Hi,
I am trying to write a script to Count Files in a directory located on a remote server and send an email Notification if it exceeds a limit. The code given below doesnot check the condition and sends the mail everytime irrespective of the condition. I have put this script in the cron. Can... (10 Replies)
Hi !
I am a newbie and never officially wrote a shell script before.
The requirement for this script is :
1) Read a file called 'bpm.log' and identify if it has a specific text such as 'this is the text'. Its a static value and that is the only text we need to read.
2) If that... (2 Replies)
Hi Experts,
I have a script like
$ORACLE_HOME/bin/sqlplus username/password # << ENDSQL
set pagesize 0 trim on feedback off verify off echo off newp none timing off
set serveroutput on
set heading off
spool Schemaerrtmp.txt
select ' TIMESTAMP COMPUTER NAME ... (5 Replies)
Hi Guys,
I have a postfix server which is deferring emails. Now I need to send notification to a specific email address if:
The sender of the deferred email is: abc@example.com
Contains specific subjects: a file (/opt/subjects) contains all the subjects in place
Then need to send a... (0 Replies)
All,
I am new to shell scripting and trying to get the count of files that starts with error and with extension .out, if the count is greater than 0 and zip the file and send an email with the content of error.out file, here is my script
cd /temp
testcount =$('find . -name '*.out' -print |... (4 Replies)
Hi.
I'm new on this forum and I need if possible someone to help me with one script.
The script should act like this:
- should be run by crontab and have next parameters:
script_name $par1 $par2 $par3 $par4
where script will search in dir $par1 for files with mask $par2 and if number of... (2 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)
i have below code to count number of rows in file1.txt, if the row count is more than one then i have sending an email along with file1.txt attached and fail the process(do nothing if count is <=1),
if I test individually count part works good but when i include the email part its not working,... (1 Reply)
i have below code to count number of rows in file1.txt, if the row count is more than one then i have sending an email along with file1.txt attached and fail the process(do nothing if count is <=1),
if I test individually count part works good but when i include the email part its not working,... (4 Replies)
Hi Unix Members,
Can anyone guide me to write one shell script to monitor the attach screen processes and when interrupted mail us. ,
like the processes - /bin/ciserver , /bin/clock , /bin/cserver , /bin/main
Please looking forward you guys help. (6 Replies)
Discussion started by: biswajitnitd
6 Replies
LEARN ABOUT HPUX
mq_notify
mq_notify(2) System Calls Manual mq_notify(2)NAME
mq_notify - register/cancel a notification request with a message queue
SYNOPSIS DESCRIPTION
If the argument notification is not NULL, the system call registers the calling process to be notified of message arrival at an empty mes-
sage queue associated with the message queue descriptor mqdes. The notification specified by the notification argument will be sent to the
process when the message queue transitions from the empty state to the non-empty state.
If the type of notification specified in notification->sigev_notify is then the signal specified in notification->sigev_signo will be sent
to the process. If the flag is set for that signal number, then the value specified in notification->sigev_value will be the si_value com-
ponent of the siginfo_t structure passed to the signal catching function at the time of signal delivery.
At any time, only one process can be registered for notification with a message queue. If the calling process, or any other process has
already registered for notification with the specified message queue, subsequent attempts to register with that queue will fail.
If notification is NULL and the process is currently registered for notification with the specified message queue, the existing registra-
tion is canceled.
When the notification is sent to the registered process, its registration is removed. The message queue is then available for registra-
tion.
If there is some process blocked in waiting to receive a message from a message queue, the arrival of a message on the queue will satisfy
the even if the queue has a registered notification request. The resulting behavior is as if the message queue remains empty, and no noti-
fication is sent.
To use this function, link in the realtime library by specifying on the compiler or linker command line.
RETURN VALUE
returns the following values:
Successful completion.
Failure.
is set to indicate the error.
ERRORS
If fails, is set to one of the following values:
[EAGAIN] The system lacks sufficient signal queuing resources to honor the request.
[EBADF] The mqdes argument is not a valid message queue descriptor.
[EBUSY] A process is already registered for notification with the message queue.
[EINVAL] An attempt was made to cancel a non-existent notification request, or notification points to an invalid address.
[ENOSYS] is not supported by the implementation.
SEE ALSO mq_open(2), mq_send(2), sigaction(2). signal(2), signal(5).
STANDARDS CONFORMANCE mq_notify(2)