how to stop syslog messages to write console on solaris - solaris

how to stop syslog messages to write console on solaris ?

you can edit the entries in the /etc/syslog.conf to direct to another file eg /var/log/syslog instead of /dev/console. After that, issue kill -HUP <pid of syslog daemon> to "reinitialize" the config

it should be
svcadm disable svc:/system/system-log:default

svcadm disable svc:/system/system-log:default turned syslog off you need to also run svcadm enable svc:/system/system-log:default to turn it back on, after you made the right changes to /etc/syslog.conf so it does what you want. You can probably just comment out the line as it is also logged to file in /var/adm/messages.log
Turning syslog off is not a good idea.

Related

Setup rsyslog to send log to remote syslogserver but not to messages/syslog

I am running an ELK-Stack as a central syslogserver and I set up rsyslog to send logfiles, which are not logging into /var/lib/messages by default, to it.
The setup is working very well but since I made the configuration the external logfiles actually show up in the messages file, which is blowing it out of proportion and makes debugging normal systemlogs difficult.
I want the logs to be send to the syslogserver but not into the messages file.
This is my current configuration:
111-elk-syslog.conf:
*.* ##IP_OF_THE_SYSLOGSERVER:514
101-external-log.conf
$ModLoad imfile
$InputFileName PATH_TO_LOGFILE
$InputFileTag FILE_TAG
$InputFileStateFile FILE_TAG
$InputFileFacility local3
$InputRunFileMonitor
I know, using filebeat, I could circumvent this but rsyslog is working very well in my enviroment and this application is the only one logging so much, that this is an actual problem.
I don't understand in detail your setup, but it may help to know that in general in rsyslogd if you don't want further handling of a message that you have matched, you simply repeat the filter on the next line by using &, and the action stop. For example, you might try
*.* ##IP_OF_THE_SYSLOGSERVER:514
& stop

Start and stop Fiddler from command line

I have the following requirement:
I need to start Fiddler from the command line. It will start capturing my traffic immediately. After some time, I want to stop capturing the traffic, but not close Fiddler.
What is the best way to achieve this ? I've explored Fiddler's command-line options, but they will only start Fiddler and not stop it. Also, killing the Fiddler process will not save my session safely. Please help.
There are several ways to do this. The simplest is to run
%programfiles(x86)%\fiddler2\execaction.exe stop
This calls the execaction program in the Fiddler install folder, passing it the command stop. The stop message is sent to Fiddler, whose script handler (click Rules > Customize Rules, scroll to OnExecAction) will interpret it as a command to detach as the system proxy.
To reattach the proxy, use start as the command. You can see what other commands are available (and add your own) by looking at the OnExecAction function.

agetty log file location

On Centos 6.2, trying to get the kernel log redirected to the serial console, I came across an issue where agetty seems to be respawning every few keypresses.
That is, I get a login prompt in the middle of typing (after logging in).
In order to investigate the issue further, I'm looking for the location of agetty logs, but to no avail. Where and how can I see log messages for respawned agetty process?
The "diagnostics" section of the "agetty" command manpage states:
Depending on how the program was configured, all diagnostics are written to
the console device or reported via the syslog(3) facility. Error messages are
produced if the port argument does not specify a terminal device; if there is
no utmp entry for the current process (System V only); and so on.
The syslog facility by default writes the "/var/log/messages" file, but it can be configured to write another file by editing its configuration file "/etc/syslog.conf".
Finally, if the error you get is "respawning too fast", you should check your "/etc/inittab" file, as described here.

How to restart AsteriskWin32 via CLI Command?

When I used "reload" command, it didn't truly reloading all module like Asterisk start from beginning. So, when I just used "reload" command, I couldn't register SIP with my client application.
Is there any command that more truly restart the Asterisk?
restart now should work for you. If you have any concerns with a specific module, you can always try to do the following:
module load name_of_module.so
module unload name_of_module.so

Send the SIGHUP signal to a process in Perl

I have a UNIX daemon, which wait of SIGHUP for refresh a data. I try to send a signal from the Perl script (under Apache www-data:www-data on the same server) by Proc::Killall ("killall('HUP', 'mydaemon');"), but I have no properly permissions. suid bit doesn't work too. 'kill -n HUP ' from shell are working.
Does you have any idea to do this?
The usual work-around is to employ a »touch file« to indicate a reload, see Apache2::Reload for a real life example.
Listen to notifications set up with e.g. File::ChangeNotify or AnyEvent::Inotify::Simple, then do your reloading.