Sponsored Content
Operating Systems Linux Red Hat error running postrotate script Post 302410160 by maverick_here on Monday 5th of April 2010 05:53:34 AM
Old 04-05-2010
Hi,

As the error message states there is not file /sbin/killall

please run "whereis killall" ( In my casse it is in /usr/bin)

And this section of your file

Code:
/var/log/radius/logfile {
        daily
        rotate 4
        postrotate
                /sbin/killall -HUP vsftpd
        endscript
}

logrotate.d/servicename

example

/etc/logrotate.d/radius

and not in /etc/logrotate.conf

you may change the /sbin/killall to its absolute path or
use just "killall" given you cron env is set appropriately

Regards,
Syed

Last edited by pludi; 04-05-2010 at 08:19 AM.. Reason: code tags, please...
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Error while running a script

Hi all, By running a (command) script I'm getting the following error: .: /usr/bin/test: cannot execute binary file This is the command: $ . test The script (test) is very simple sqlplus user/password @1.sql sqlplus user/password @2.sql Can enyone tell me what the problem is. (5 Replies)
Discussion started by: HarryTellegen
5 Replies

2. Shell Programming and Scripting

error in in running script

Hi all, I have created a script file .sh and had some allias commands, local variable, some grep features, and listing files/directories, and it worked correctly and I got the outputs I am looking for after I run the script . However, some of the grep commands and some other functions did not... (2 Replies)
Discussion started by: aama100
2 Replies

3. UNIX for Dummies Questions & Answers

Getting error when running script through crontab

Hi all, I wrote small script for Solaris and when I am running it through command prompt its ok, but when I trying to run it using crontab, i am getting error like: ld.so.1: dbloader: fatal: libACE.so: open failed: No such file or directory /tmp/file.sh: line 5: 8304 Killed ... (4 Replies)
Discussion started by: nypreH
4 Replies

4. Solaris

Error when running script

Hi All, Need your guuys help here. #!/bin/bash { echo "POLICY LIST" echo "====================================" bppllist echo " " echo "POLICY DETAILS" echo "====================================" for type in daily weekly monthly quarterly echo... (6 Replies)
Discussion started by: ronny_nch
6 Replies

5. Shell Programming and Scripting

Will the scope be there in logrotate after postrotate directive...?

Hi, Please check the below code...:wall: if ; then echo "/var/log/AAA/BBB/xxx_*.log /var/log/AAA/BBB/yyy_*.log {" >> /etc/logrotate.conf echo " weekly" >> /etc/logrotate.conf echo " rotate 10" >> /etc/logrotate.conf... (2 Replies)
Discussion started by: Dedeepthi
2 Replies

6. UNIX and Linux Applications

Getting error code when running the script 2 (RC)2

hi All, we have a script to remove the files from particular path,when we tryingto run manually the script went to success and removed the files but the same script which is running by other team it got failed and giving the error "2 (RC)2 "..what is the cause of the failure..and we passing the... (2 Replies)
Discussion started by: nagavenkatesh
2 Replies

7. UNIX for Dummies Questions & Answers

Help me with find and tar on postrotate script

Hi, My requirements are I wanted to move my daily logs to /appl/logs/old folder Archive and compress all 10 days older log files under /appl/logs/old in YYYYMMDD format file To remove any 60 days older log files from /appl/logs/old I tried this scenario with logrotate utility ... (1 Reply)
Discussion started by: laxyblack
1 Replies

8. Shell Programming and Scripting

Error when running script in background

Hi guys, ./test.sh & #!/usr/bin/ksh echo "No.Of Items :" read count echo "Report Time (Min):" read time some other command .... exit 0; thanks (3 Replies)
Discussion started by: asavaliya
3 Replies

9. Shell Programming and Scripting

Error in running DB query by script

Hi I was trying to fetch data from database. But the number of rows exported were huge so i got the error. Experts please advice. Thanks a lot for your supprt. #: ./script.sh ./script.sh: xmalloc: subst.c:3076: cannot allocate 1401346369 bytes (0 bytes allocated) (2 Replies)
Discussion started by: brij123
2 Replies

10. Shell Programming and Scripting

Error running script

Hi, I have the the below script more runcda.sh if *\).*/\1/p' $1_dr) ]; then echo "ParallelGCThreads Found with Value" else echo "ParallelGCThreads Not Found - Add !!" fi $ ./runcda.sh output.log ./runcda.sh: test: argument expected ParallelGCThreads Not Found - Add !! Why am i... (2 Replies)
Discussion started by: mohtashims
2 Replies
Killall(3pm)						User Contributed Perl Documentation					      Killall(3pm)

NAME
killall - Kill all instances of a process by pattern matching the command-line SYNOPSIS
use Proc::Killall; killall('HUP', 'xterm'); # SIGHUP all xterms killall('KILL', '^netscape$'); # SIGKILL to "netscape" DESCRIPTION
This module provides one function, "killall()", which takes two parameters: a signal name or number (see "kill()") and a process pattern. This pattern is matched against the process' command-line as the "ps" command would show it ("ps" is not used internally, instead a package called "Proc::ProcessTable" is used). "killall" searches the process table and sends that signal to all processes which match the pattern. The return value is the number of processes that were successfully signaled. If any kills failed, the $! variable will be set based on that last one that failed (even if a successful kill happened afterward). AUTHOR
Written in 2000 by Aaron Sherman <ajs@ajs.com> "Proc::Killall" is copyright 2000 by Aaron Sherman, and may be distributed under the same terms as Perl itself. PREREQUISITES
"Proc::ProcessTable" is required for "Proc::Killall" to function. SEE ALSO
perl, perlfunc, perlvar, Proc::ProcessTable perl v5.14.2 2013-02-10 Killall(3pm)
All times are GMT -4. The time now is 02:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy