How to find out more information on all scsi devices

Here another quick tip:  To find out all information on scsi devices linux see’s use this command:

cat /proc/scsi/scsi

Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: ATA      Model: WDC WD2500JB-22R Rev: 20.0
Type:   Direct-Access                    ANSI  SCSI revision: 05
Host: scsi0 Channel: 00 Id: 01 Lun: 00
Vendor: ATA      Model: WDC WD3200JB-00K Rev: 08.0
Type:   Direct-Access                    ANSI  SCSI revision: 05
Host: scsi2 Channel: 00 Id: 00 Lun: 00
Vendor: ATA      Model: Hitachi HDP72505 Rev: GM4O
Type:   Direct-Access                    ANSI  SCSI revision: 05

Or if you want to only see the fiber channel:

cd /proc/scsi/qla2xxx   (assuming you are using a qlogic fiber card)

cat 1

cat 2

You may see different numbers under this directory representing the HBA’s this is a great way to check that your adapters see the same storage.

Installing new versions of Java on RHEL

RHEL includes the alternatives command providing the ability to point your users to different versions of software while not changing their links to the command.  For example if you wanted a specific version of JAVA this can be done with PATH changes or alternatives

man alternatives

for exact info.

For Java

/usr/sbin/alternatives --install /usr/bin/java java /location_to_new_java

/usr/sbin/alternatives --config java

Repeat for javac

Finally, set the environment for everyone on the machine by creating a java.sh script in /etc/profile.d:

#!/bin/sh
export JAVA_HOME=/usr/java/jdk
export JRE_HOME=$JAVA_HOME/jre
export J2RE_HOME=$JAVA_HOME/jre
export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$J2RE_HOME/bin:$PATH

Get LUN WWID on RHEL

Getting the LUN WWID on RHEL is critical when dealing with multiple different Storage systems.  You can use the scsi_id command to find a WWID

scsi_id -g -u -s /block/sdd

Will return the WWID of the devices.  In addition if you install device-mapper-multipath you can use the lssci tool to output all lun’s and what storage system they belong to.

Testing smtp manually

From time to time is really helps to be able to manually test smtp via good old telnet.   Every smtp command is provided via text commands.  Here is a simple connections:

telnet smtp.host.com 25

Send a hello command with your domain name

ehlo mail.myserver.com
250-linuxmonkey.localdomain
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN

Sender address

MAIL FROM: mail@domain.ext

Destination address

RCPT TO: mail@otherdomain.ext

Input your message:

DATA
SUBJECT: MY SUBJECT
MESSAGE STUFFF

.

And you have sent a message.