Sponsored Content
Top Forums Shell Programming and Scripting Email alert after termination Post 303003834 by Jade_Michael on Thursday 21st of September 2017 09:46:25 AM
Old 09-21-2017
so after

After I install the email, how do I go about this, should I add the grep "normal termination or "error termination" and then file.log name and which command, should I add time?
 

4 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Email alert script

I need to code a script, which will run via cron, every 30 minutes. The script will read a file containing a date&time and number (which represents disk space). The file gets appended to every 30 minutes. Here's a sample of the file: CPU 1:04/25/02 1:00 am:1972554 CPU 1:04/25/02 1:30... (1 Reply)
Discussion started by: moon
1 Replies

2. Shell Programming and Scripting

email Alert

Hello, I want a script that will scan the file /etc/httpd/conf/httpd.conf and the folder /etc/httpd/libexec/ -bash-2.05b# grep mod_r /etc/httpd/conf/httpd.conf LoadModule rewrite_module libexec/mod_rewrite.so AddModule mod_rewrite.c -bash-2.05b# -bash-2.05b# find... (4 Replies)
Discussion started by: fed.linuxgossip
4 Replies

3. Shell Programming and Scripting

Using top command to email if process is exceeding 25% and sending an email alert if so

This is my first time writing a script and Im having some trouble, Im trying to use the top command to monitor processes and the amount of CPU usage they require, my aim is to get an email if a process takes over a certain percentage of CPU usage I tried grep Obviosly that hasnt worked, Any... (8 Replies)
Discussion started by: jay02
8 Replies

4. UNIX for Beginners Questions & Answers

Email Alert in UNIX

Hi There I have to wrote a script where I am able to echo a result of an SQL script, however I want to be able to send an email to myself when it is more than 0 (so whenever a value is returned) is this possible? I tried one way from looking on the web but this didn't work, I have added my... (8 Replies)
Discussion started by: simpsa27
8 Replies
PTHREAD_JOIN(3) 					     Library Functions Manual						   PTHREAD_JOIN(3)

NAME
pthread_join - wait for termination of another thread SYNOPSIS
#include <pthread.h> int pthread_join(pthread_t th, void **thread_return); DESCRIPTION
pthread_join suspends the execution of the calling thread until the thread identified by th terminates, either by calling pthread_exit(3) or by being cancelled. If thread_return is not NULL, the return value of th is stored in the location pointed to by thread_return. The return value of th is either the argument it gave to pthread_exit(3), or PTHREAD_CANCELED if th was cancelled. The joined thread th must be in the joinable state: it must not have been detached using pthread_detach(3) or the PTHREAD_CREATE_DETACHED attribute to pthread_create(3). When a joinable thread terminates, its memory resources (thread descriptor and stack) are not deallocated until another thread performs pthread_join on it. Therefore, pthread_join must be called once for each joinable thread created to avoid memory leaks. At most one thread can wait for the termination of a given thread. Calling pthread_join on a thread th on which another thread is already waiting for termination returns an error. CANCELLATION
pthread_join is a cancellation point. If a thread is canceled while suspended in pthread_join, the thread execution resumes immediately and the cancellation is executed without waiting for the th thread to terminate. If cancellation occurs during pthread_join, the th thread remains not joined. RETURN VALUE
On success, the return value of th is stored in the location pointed to by thread_return, and 0 is returned. On error, a non-zero error code is returned. ERRORS
ESRCH No thread could be found corresponding to that specified by th. EINVAL The th thread has been detached. EINVAL Another thread is already waiting on termination of th. EDEADLK The th argument refers to the calling thread. AUTHOR
Xavier Leroy <Xavier.Leroy@inria.fr> SEE ALSO
pthread_exit(3), pthread_detach(3), pthread_create(3), pthread_attr_setdetachstate(3), pthread_cleanup_push(3), pthread_key_create(3). LinuxThreads PTHREAD_JOIN(3)
All times are GMT -4. The time now is 09:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy