Wednesday, July 4, 2012

luxadm -e port shows "NOT CONNECTED"


Here is a situation:
We been using 2 dual port HBA card, initially using only one port from the host for storage. Started setting up second port to connect to the second storage and found out the one the HBA card is bad. Got that replaced. All the 4 ports are online now. The brocade sees all the WWNs from the FC cards and cards on the hosts shows online as well.

bash-3.00# fcinfo hba-port -l | grep -i state
        State: online
        State: online
        State: online
        State: online

Now we run luxadm -e port and only one port is communicating. After replacing the card we updated the Brocade with new WWN of the first port which was already in use. Also, zoned the second port from both the FC to the second storage. So, we were expecting atleast 2 ports communicating as before.

Why luxadm is showing the card is not connect ??

bash-3.00# luxadm -e port
/devices/pci@0/pci@0/pci@8/pci@0/pci@2/SUNW,qlc@0/fp@0,0:devctl    NOT CONNECTED
/devices/pci@0/pci@0/pci@8/pci@0/pci@2/SUNW,qlc@0,1/fp@0,0:devctl  NOT CONNECTED
/devices/pci@0/pci@0/pci@8/pci@0/pci@8/SUNW,qlc@0,1/fp@0,0:devctl  NOT CONNECTED
/devices/pci@0/pci@0/pci@8/pci@0/pci@8/SUNW,qlc@0/fp@0,0:devctl    CONNECTED

Before we go into the further troubleshooting mode. I just wanted to understand what is "NOT CONNECTED" means

## “luxadm -e port” command is used to verify HBA has established communication with a node.

# luxadm -e port 
/devices/pci@1f,4000/SUNW,qlc@4/fp@0,0:devctl CONNECTED /devices/pci@1f,4000/SUNW,qlc@4,1/fp@0,0:devctl CONNECTED

NOTE:  
”CONNECTED” means the HBA has established a communications with some other node (Initiator or Target).  ”NOT CONNECTED” means the HBA has not established a communication with some other node or connecting to a switch that has no target (including not zoned to a target).

Now to our understanding we have verified switch and everything looks good.


Findings:
When the HBA went bad, it automatically took the WWN (zone member) out of the zone. That was the reason for second port in "NOT CONNECTED" state 

Everything was correct for the second ports configured for the other storage, But unfortunately it was not added to the zone group. If you are familiar with Brocade GUI (sorry never tried the command line with FC zoning), the last part is to add the newly created to the zone group after you create aliases and zones

Bottomline, If the HBAs are online its most likely the switch problem when we see "NOT CONNECTED" state.

Friday, June 22, 2012

ARC (Audio Return Channel)


Are you looking to avoid optical cable and make ARC port work on your TV?

Here is my story, hopes it saves some of your time.
I have recently purchased new Samsung 55D 7000 series TV and connected to my AV receiver (Onkyo TX SR-604)
This receiver is pretty good, I’ve been using this for last 8 yrs. It’s 7.1 channels and 630 watt but unfortunately only had 2 HDMI input and 1 HDMI output.

The TV has these hdmi ports labeled as below
HDMI/DVI 1 IN
HDMI 2 IN (ARC)
HDMI 3 IN
HDMI 4 IN

After connecting
TV HDMI/DVI 1 –-> Receiver HDMI out
Set top box –-> Receiver HDMI in
Blu ray player –-> Receiver HDMI in

Everything worked as expected, except for the fact when starting any application using smart hub (Samsung apps) there was no audio. Then I connected TV optical out to receiver optical in and that fixed the problem. But I didn’t wanted to run an extra cable for this audio out because I had already wall mounted my TV with 2 HDMI cable hiding inside the wall. And this optical cable over the wall will make it an ugly setup. Also, one of the other related requirements was to run a slide show from external NAS storage along with background music.

After doing some research I figured out there is a way to avoid the extra digital optical cable running from TV to the receiver if we use ARC HDMI port. Now the question is how?

This is just a good reference for ARC and how to set it up

“An Audio Return Channel-enabled TV allows you to send audio over an already connected HDMI 1.4 cable. Ordinarily, in order to transfer audio from your source (ie antenna or VIA widgets) to your home theater system you would need a separate audio cable (analog audio or digital optical) going from your TV to the home theater system. With the ARC function, you will be able to send any audio from your TV back to an ARC enabled home theater system and listen to your TV's audio through the home theater system without having to connect an optical cable.”
How to use ARC:
These are the steps that you will need to take to enable ARC (Audio Return Channel)
•               Make sure your audio receiver is ARC compatible and your TV is ARC compatible.
•               Ensure that you have an HDMI 1.4 cable that is multi-directional
•               Use HDMI 1 on your TV and it will need to be plugged into the HDMI OUT of the receiver
•               Change Digital Audio on your TV to Dolby Digital
•               Turn off the TV internal speakers
•               Turn CEC on
•               Ensure the receiver is in TV control and is in discoverable mode (You may have to reference the manual for your receiver or contact the manufacturer of your receiver)
•               Search for the device under CEC menu
•               This will unlock System Audio Control (under CEC), turn to ON and enjoy ARC!


I guess the first most important thing you would need is an AV receiver which supports ARC. Don’t worry much about HDMI cables.

To make that work I ordered a Pioneer VSX-822-K receiver which is ARC compatible and has 6 HDMI input ports, network ready, lots of iphone/ipods and other media support. After connecting all those HDMI ports the same way it was connected before the problems remained the same.

Follow this connection layout:
make sure you use TV ARC port instead of HDMI/DVI.
TV                                                            RECEIVER                                                 DEVICE
HDMI/DVI 1 IN                                         
HDMI 2 IN (ARC)      
à                             HDMI OUT
HDMI 3 IN                                                HDMI SAT/CBL         
à             Comcast/AT&T set top HDMI OUT
HDMI 4 IN                                                HDMI BD                 
à             Samsung Bluray Player HDMI OUT
                                                                HDMI GAME
                                                                HDMI DVR/BDR
                                                                HDMI VIDEO
                                                                HDMI DVD


Once all HDMI are connected as above.
Enable ARC on the receiver, it seems by default ARC is disabled on all receivers.


That’s all for enabling audio for smarthub using external speakers.
Now, can we also put background music once we start a slideshow?
J

I guess unless samsumg doesn't support multitasking or add the background music feature with smart apps, the only option we have is to connect ipod using USB (front panel) on the receiver while running the slideshow. No wait ! How about Airplay?

We can use airplay to stream your iphone music while you start your slideshow.

Monday, May 21, 2012

Alternatives usage


Alternatives allows you to toggle between several version of the installed binary using symlink. Alternatives has a default administrative directory as /var/lib/alternatives where it keeps all the metadata


Most common usage of alternatives are
alternatives --install
alternatives --config
alternatives --remove

usage: alternatives --install
update-alternatives --install "/usr/bin/java" "java" "/usr/java/default/bin/java" 3

lrwxrwxrwx. 1 root root 12 Feb 22 20:04 /usr/sbin/update-alternatives -> alternatives

ls -l /etc/alternatives/java
lrwxrwxrwx 1 root root 35 Jun  8  2010 /etc/alternatives/java -> /usr/lib/jvm/jre-1.4.2-gcj/bin/java


[root@pg ~]# alternatives --config java

There is 1 program that provides 'java'.

  Selection    Command
-----------------------------------------------
*+ 1           /usr/lib/jvm/jre-1.4.2-gcj/bin/java


update-alternatives --install /usr/bin/java java /usr/bin/jade 3

[root@pg ~]# alternatives --config java

There are 2 programs which provide 'java'.

  Selection    Command
-----------------------------------------------
*+ 1           /usr/lib/jvm/jre-1.4.2-gcj/bin/java
   2           /usr/bin/jade

Enter to keep the current selection[+], or type selection number:



[root@pg ~]# alternatives --config java

There are 2 programs which provide 'java'.

  Selection    Command
-----------------------------------------------
*  1           /usr/lib/jvm/jre-1.4.2-gcj/bin/java
 + 2           /usr/bin/jade

Enter to keep the current selection[+], or type selection number:


[root@pg ~]# ls -l /etc/alternatives/java
lrwxrwxrwx 1 root root 13 Apr 24 01:33 /etc/alternatives/java -> /usr/bin/jade



Why apache shows multiple processes?


The multiple apache processes we see is by design to handle multiple requests. Those multiple processes is basically listeners with multiple threads, so that it can handle simultaneous traffic more efficiently.

By default, apache spawns10 processes and each process generally takes about 10MB. Assuming all the sub processes takes the same memory its about 100MB for apache running on a machine.

Example of apache running:
#top -U nobody

Memory: 8064M phys mem, 2620M free mem, 12G total swap, 9550M free swap

   PID USERNAME LWP PRI NICE  SIZE   RES STATE    TIME    CPU COMMAND
 14436 nobody     1  59    0   12M 3272K sleep    0:09  0.00% httpd
 14435 nobody     1  59    0   12M 3232K sleep    0:08  0.00% httpd
 17184 nobody     1  59    0   12M 4488K sleep    0:06  0.00% httpd
 14437 nobody     1  59    0   12M 4152K sleep    0:06  0.00% httpd
 17182 nobody     1  59    0   12M 4040K sleep    0:06  0.00% httpd
 14439 nobody     1  59    0   12M 3272K sleep    0:06  0.00% httpd
 16956 nobody     1  59    0   12M 4032K sleep    0:05  0.00% httpd
 14438 nobody     1  59    0   12M 3272K sleep    0:04  0.00% httpd
 17579 nobody     1  59    0   12M 3208K sleep    0:04  0.00% httpd
 17183 nobody     1  59    0   12M 3144K sleep    0:03  0.00% httpd



The defaults in httpd.conf include :


StartServers 8

MinSpareServers 5

User apache


That means start 8 listeners (total 9 processes - root httpd process + 8 servers) and have a minimum of 5 idle listeners at all times (dynamically creating new listeners as necessary). The 'User' directive controls which non-root account the listeners run as (usually 'apache' or 'nobody').

There are lots of other related directives but, unless you have low traffic and are trying to save memory, I wouldn't recommend changing the defaults.