December 2024
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

Categories

December 2024
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

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>