Sponsored Content
Top Forums UNIX for Advanced & Expert Users How to supress a "Killed" message when a process is terminated? Post 48873 by kenwolff on Friday 19th of March 2004 08:51:33 PM
Old 03-19-2004
How to supress a "Killed" message when a process is terminated?

Does anyone know how I can supress the "Killed" message that's produced when I kill a process? I've got a script that performs a "tail -f" on a database error log and pipes the output into an awk script which looks for certain error messages and forwards any that qualify to my pager. The problem is, the error log gets renamed nightly, so I have to stop and restart my script, in order to pick up the new file. When I kill the "tail -f" process through a different script, a "Killed" message is generated and sent to the user under whom the "tail -f" cron was running. That "Killed" message is what I'm trying to supress. I've tried directing the STDERR to /dev/null, but don't seem to be having any luck. If it matters, this is a Bourne (/bin/sh) shell script.

TIA!
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Process seen in "ps aux" but not "top"

Hi, I have a process that can be seen after "ps aux" command. However when I do "top" command. This process cannot be seen. How can this happen? Is there anything wrong with my code? (3 Replies)
Discussion started by: monkfan
3 Replies

2. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies

3. Red Hat

"service" , "process" and " daemon" ?

Friends , Anybody plz tell me what is the basic difference between "service" , "process" and " daemon" ? Waiting for kind reply .. .. (1 Reply)
Discussion started by: shipon_97
1 Replies

4. AIX

After run ps , uptime , w command I get reply "killed"

Hi, After run ps , uptime , w command I get reply "killed" as normal dba and staff group user. As root every command works fine. I cheched all the user settings , right with other servers and I could not find any error and other settings. The oslevel is 5300-10-01-0921. Any idea to... (12 Replies)
Discussion started by: boki
12 Replies

5. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

6. UNIX for Dummies Questions & Answers

Unix "look" Command "File too large" Error Message

I am trying to find lines in a text file larger than 3 Gb that start with a given string. My command looks like this: $ look "string" "/home/patrick/filename.txt" However, this gives me the following message: "look: /home/patrick/filename.txt: File too large" So, I have two... (14 Replies)
Discussion started by: shishong
14 Replies

7. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

8. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

9. AIX

Apache 2.4 directory cannot display "Last modified" "Size" "Description"

Hi 2 all, i have had AIX 7.2 :/# /usr/IBMAHS/bin/apachectl -v Server version: Apache/2.4.12 (Unix) Server built: May 25 2015 04:58:27 :/#:/# /usr/IBMAHS/bin/apachectl -M Loaded Modules: core_module (static) so_module (static) http_module (static) mpm_worker_module (static) ... (3 Replies)
Discussion started by: penchev
3 Replies
QUEUE_MOVER(1)															    QUEUE_MOVER(1)

NAME
queue_mover - PgQ consumer that copies data from one queue to another. SYNOPSIS
queue_mover.py [switches] config.ini DESCRIPTION
queue_mover is PgQ consumer that transports events from source queue into target queue. One use case is when events are produced in several databases then queue_mover is used to consolidate these events into single queue that can then be processed by consumers who need to handle theses events. For example in case of patitioned databases it's convenient to move events from each partition into one central queue database and then process them there. That way configuration and dependancies of partiton databases are simpler and more robust. Another use case is to move events from OLTP database to batch processing server. Transactionality: events will be inserted as one transaction on target side. That means only batch_id needs to be tracked on target side. QUICK-START Basic PgQ setup and usage can be summarized by the following steps: 1. PgQ must be installed both in source and target databases. See pgqadm man page for details. 2. Target database must also have pgq_ext schema installed. It is used to keep sync between two databases. 3. Create a queue_mover configuration file, say qmover_sourceq_to_targetdb.ini 4. create source and target queues $ pgqadm.py sourcedb_ticker.ini create <srcqueue> $ pgqadm.py targetdb_ticker.ini create <dstqueue> 5. launch queue mover in daemon mode $ queue_mover.py -d qmover_sourceq_to_targetdb.ini 6. start producing and consuming events CONFIG
Common configuration parameters job_name Name for particulat job the script does. Script will log under this name to logdb/logserver. The name is also used as default for PgQ consumer name. It should be unique. pidfile Location for pid file. If not given, script is disallowed to daemonize. logfile Location for log file. loop_delay If continuisly running process, how long to sleep after each work loop, in seconds. Default: 1. connection_lifetime Close and reconnect older database connections. log_count Number of log files to keep. Default: 3 log_size Max size for one log file. File is rotated if max size is reached. Default: 10485760 (10M) use_skylog If set, search for [./skylog.ini, ~/.skylog.ini, /etc/skylog.ini]. If found then the file is used as config file for Pythons logging module. It allows setting up fully customizable logging setup. Common PgQ consumer parameters pgq_queue_name Queue name to attach to. No default. pgq_consumer_id Consumers ID to use when registering. Default: %(job_name)s queue_mover parameters src_db Source database. dst_db Target database. dst_queue_name Target queue name. Example config file [queue_mover] job_name = eventlog_to_target_mover src_db = dbname=sourcedb dst_db = dbname=targetdb pgq_queue_name = eventlog dst_queue_name = copy_of_eventlog pidfile = log/%(job_name)s.pid logfile = pid/%(job_name)s.log COMMAND LINE SWITCHES
Following switches are common to all skytools.DBScript-based Python programs. -h, --help show help message and exit -q, --quiet make program silent -v, --verbose make program more verbose -d, --daemon make program go background Following switches are used to control already running process. The pidfile is read from config then signal is sent to process id specified there. -r, --reload reload config (send SIGHUP) -s, --stop stop program safely (send SIGINT) -k, --kill kill program immidiately (send SIGTERM) BUGS
Event ID is not kept on target side. If needed is can be kept, then event_id seq at target side need to be increased by hand to inform ticker about new events. 03/13/2012 QUEUE_MOVER(1)
All times are GMT -4. The time now is 04:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy