Use logger to write a messages to log files.

The basic syntax for logger is logger message. It does not require any options if you are just going to write a message to the logfile and you want to write to the default /var/log/messages at the notice level.

root# logger Added a new disk to a machine

You can see a message in /var/log/message file. Also you can run this command with option -s Log the message to standard error, as well as the system log.

root# logger -s Added a new disk to a machine

Rescan of a SCSI bus without rebooting the VM.

To issue a SCSI bus rescan you must know on which bus you’ve added the device. If you don’t know which bus and if there are mutliple buses on the system you can rescan each bus which will be somehow annoying but will not interrupt the system.
To initiate a SCSI bus rescan type:
root# echo "- - -" > /sys/class/scsi_host/hostX/scan
where X stands for the SCSI bus you want to scan, and then you can type the following:

root# lsscsi
root# fdisk -l
root# tail -f /var/log/message

Also C T L “Channel on HBA” “Tatget SCSI id” “LUN” can be used instead of “—“.

Flush caching BIND (DNS cache)

All you have to do is restart bind to clear its cache:

root# /etc/init.d/named restart

You can also use rndc command as follows flush out all cache:

root# rndc restart


root# rndc exec

BIND v9.3.0 and above will support flushing all of the records attached to a particular domain name with rndc flushname command.

root# rndc flushname

It is also possible to flush out BIND views. For example, lan and wan views can be flushed using the following command:

root# rndc flush lan
root# rndc flush wan