April 2024
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
2930  

Categories

April 2024
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
2930  

AWS CentOS7 error countermeasure

If you type a command to check for errors, an error came out.
When I typed a command to confirm the error, an error came out.

egrep -i "warning|error" /var/log/messages

[root@ip-172-31-30-74 log]# egrep -i “warning|error” /var/log/messages
Feb 10 23:15:03 localhost rsyslogd-2307: warning: ~ action is deprecated, consider using the ‘stop’ statement instead [try http://www.rsyslog.com/e/2307 ]
Feb 10 23:15:01 localhost kernel: Error: Driver ‘pcspkr’ is already registered, aborting…
[root@ip-172-31-30-74 log]#cd /etc/rsyslog.d/

[root@ip-172-31-30-74 rsyslog.d]# vi 21-cloudinit.conf

# Log cloudinit generated log messages to file
:programname, isequal, “cloud-init” /var/log/cloud-init.log

# comment out the following line to allow CLOUDINIT messages through.
# Doing so means you’ll also get CLOUDINIT messages in /var/log/syslog
& ~

# comment out the following line to allow CLOUDINIT messages through.
# Doing so means you'll also get CLOUDINIT messages in /var/log/syslog
& stop
cd /etc/modprobe.d
vi avoiderrot.list
blacklist pcspkr

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>