Sponsored Content
Full Discussion: cron's irregular responds
Operating Systems Linux Red Hat cron's irregular responds Post 302523629 by sriniv666 on Thursday 19th of May 2011 08:40:07 AM
Old 05-19-2011
cron's irregular responds

hi,
i ve constructed a script to monitor the crond ,if the crond service is not available/not running then a mail ll be sent the mention mail id.. here the code

Code:
crond=`service crond status|grep pid |awk '{print $5}'|cut -c1-7`
if [ "$crond" != "running" ];
   then
   echo -e "the CRON jOb is currently offline" | mail -s " ******CRONTAB ALERT*******" srini@yyyyyyyyy.com
fi

then i ve given the entry for cron as
Code:
* * * * * /usr/local/myscripts/cronstatus.sh

Now the issue is though the crond is running me getting the alert each minute. Where im going wrong Smilie

Moderator's Comments:
Mod Comment Please use [code] and [/code] tags when posting code, data or logs etc. to preserve formatting and enhance readability. Also please refrain from overly use of font formatting, thanks.

Last edited by zaxxon; 05-19-2011 at 09:44 AM.. Reason: code tags, fonts etc.
 

We Also Found This Discussion For You

1. Shell Programming and Scripting

How to convert irregular lines into formatted column using awk in windows2003 server environment?

Dear experts, I'm newbie to awk scripting. Need your great help to convert the irregular lines into column using awk in windows2003 server environment. (Sorting based on "Pri Number" column) Input files is as follows: Partition Name: OA Partition UID: ... (0 Replies)
Discussion started by: ruirus
0 Replies
PAM_LOGINUID(8) 						 Linux-PAM Manual						   PAM_LOGINUID(8)

NAME
pam_loginuid - Record user's login uid to the process attribute SYNOPSIS
pam_loginuid.so [require_auditd] DESCRIPTION
The pam_loginuid module sets the loginuid process attribute for the process that was authenticated. This is necessary for applications to be correctly audited. This PAM module should only be used for entry point applications like: login, sshd, gdm, vsftpd, crond and atd. There are probably other entry point applications besides these. You should not use it for applications like sudo or su as that defeats the purpose by changing the loginuid to the account they just switched to. OPTIONS
require_auditd This option, when given, will cause this module to query the audit daemon status and deny logins if it is not running. MODULE TYPES PROVIDED
Only the session module type is provided. RETURN VALUES
PAM_SESSION_ERR An error occurred during session management. EXAMPLES
#%PAM-1.0 auth required pam_unix.so auth required pam_nologin.so account required pam_unix.so password required pam_unix.so session required pam_unix.so session required pam_loginuid.so SEE ALSO
pam.conf(5), pam.d(5), pam(7), auditctl(8), auditd(8) AUTHOR
pam_loginuid was written by Steve Grubb <sgrubb@redhat.com> Linux-PAM Manual 06/04/2011 PAM_LOGINUID(8)
All times are GMT -4. The time now is 09:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy