nixCraft Linux Forum

nixCraft

Linux Tech Support Forum

How to redirect Output

This is a discussion on How to redirect Output within the Shell scripting forums, part of the Development/Scripting category; Dear Rocky & nixCraft. I have checked with normal user messages are still coming. for your information. regards. puppen...


Go Back   nixCraft Linux Forum > Development/Scripting > Shell scripting

Register FAQ Members List Calendar Forgotten your password? Mark Forums Read
  #11 (permalink)  
Old 12-02-2006, 11:22 PM
Member
User
 
Join Date: Mar 2006
Posts: 63
Rep Power: 0
puppen
Default

Dear Rocky & nixCraft.

I have checked with normal user messages are still coming.

for your information.


regards.
puppen
__________________
someone somewhere is made for you.
LOVE is Journey not a destination.
ALL I want is EVERYTHING.
Reply With Quote
Sponsored Links
  #12 (permalink)  
Old 12-03-2006, 02:28 PM
sweta's Avatar
Contributors
User
 
Join Date: Feb 2005
Location: New Delhi
My distro: Suse, RHEL, Vista
Posts: 154
Rep Power: 4
sweta will become famous soon enough
Default

Hmm ...

can u stop syslog for 2 minute and see if u stop those messates. If so u just need to fix u r syslog.conf
__________________
Friends - v-nessa - missyAdmin - LinuxChix
Reply With Quote
  #13 (permalink)  
Old 12-03-2006, 02:36 PM
rockdalinux's Avatar
Contributors
User
 
Join Date: May 2005
Location: Bangalore
My distro: RHEL, HP-UX, Solaris, FreeBSD, Ubuntu
Posts: 581
Rep Power: 7
rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough
Default

Did ya modified /etc/sysconfig/syslog file; I hope you are not using old buggy RH 9; make sure line is as follows in /etc/sysconfig/syslog:
Code:
KLOGD_OPTIONS="-x -c 3"
Restart syslog. This should fix the problem
__________________
Rocky Jr.
You may have my body & soul, but you will never touch my pride!

If you have knowledge, let others light their candles at it.

Certified to work on HP-UX / Sun Solaris / RedHat
Reply With Quote
  #14 (permalink)  
Old 12-05-2006, 01:06 PM
Member
User
 
Join Date: Mar 2006
Posts: 63
Rep Power: 0
puppen
Default

Dear Sweta/Rocky.

I have stoped the syslog demon and checked same messages are coming. This is not the problem with syslog demon I guess......

P.S Rocky, I am using RHEL 4 and file \etc\sysconfig\syslog is

KLOGD_OPTIONS="-x"
__________________
someone somewhere is made for you.
LOVE is Journey not a destination.
ALL I want is EVERYTHING.
Reply With Quote
  #15 (permalink)  
Old 12-06-2006, 03:31 AM
monk's Avatar
Senior Member
User
 
Join Date: Jan 2005
Location: Tibet
My distro: Debian GNU/Linux
Posts: 482
Rep Power: 5
monk will become famous soon enough monk will become famous soon enough
Default

Set it as follows in /etc/sysconfig/syslog and restart server, reduce -c 2 if u want:
Code:
KLOGD_OPTIONS="-x -c 3"
Now Restart
Code:
/etc/init.d/syslog restart
File /etc/syslog.conf must be as follows (or copy and paste following):
Code:
# Log all kernel messages to the console.
# Logging much else clutters up the screen.
#kern.*                                                 /dev/console

# Log anything (except mail) of level info or higher.
# Don't log private authentication messages!
*.info;mail.none;authpriv.none;cron.none                /var/log/messages

# The authpriv file has restricted access.
authpriv.*                                              /var/log/secure

# Log all the mail messages in one place.
mail.*                                                  -/var/log/maillog


# Log cron stuff
cron.*                                                  /var/log/cron

# Everybody gets emergency messages
*.emerg                                                 *

# Save news errors of level crit and higher in a special file.
uucp,news.crit                                          /var/log/spooler

# Save boot messages also to boot.log
local7.*                                                /var/log/boot.log
Now Restart
Code:
/etc/init.d/syslog restart
Reply With Quote
  #16 (permalink)  
Old 12-06-2006, 09:44 PM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
My distro: Ubuntu
Posts: 1,036
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

May be he is using SELinux that forces or allows syslog message to console using variable
Code:
allow_syslog_to_console = 1
__________________
Vivek | My personal blog
Linux Evangelist
Play hard stay cool
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Apache Redirect / to index.php using mod_rewrite .htaccess kasimani Web servers 1 04-19-2008 12:17 AM
About iptables output satimis Networking, Firewalls and Security 0 09-30-2007 09:30 AM
Redirect + Rewrite Problem in Lighttpd Lizard King Web servers 4 07-17-2007 10:44 AM
redirect to www in lighttpd muks Web servers 11 06-02-2007 11:55 PM
How can I redirect the output of time command to file warren Linux software 13 08-25-2006 12:17 PM


All times are GMT +5.5. The time now is 08:52 PM.


Powered by vBulletin® Version 3.7.4 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36