How to add an entry in a local sudoers file to enable an individual user su root access
These are the type of entries – just edit file with vi
#Temp access for 10 days from 200709 - itask 1374893
gbsmnt eudt0076-dt = SUROOT
#Temp access for 10 days from 300709 - itask 1392545
gbchgd eudt0076-dt = SUROOT
Thursday, 30 July 2009
Thursday, 23 July 2009
vxdmp - veritas dynamic multipathing
The vxdmpadm utility is a command line administrative interface to the DMP feature of VxVM.
You can use the vxdmpadm utility to perform the following tasks.
Retrieve the name of the DMP device corresponding to a particular path
List all paths under a DMP device
List all controllers connected to disks attached to the host
List all the paths connected to a particular controller
Enable or disable a host controller on the system
Rename an enclosure
Control the operation of the DMP restore daemon
The following sections cover these tasks in detail along with sample output. For more information, see the vxdmpadm(1M) manual page.
Retrieving Information About a DMP Node
The following command displays the DMP node that controls a particular physical path:
# vxdmpadm getdmpnode nodename=c3t2d1
The physical path can be specified as the nodename attribute, which must be a valid path listed in the /dev/rdsk directory.
Use the enclosure attribute with getdmpnode to obtain a list of all DMP nodes for the specified enclosure.
# vxdmpadm getdmpnode enclosure=enc0
Displaying All Paths Controlled by a DMP Node
The following command displays the paths controlled by the specified DMP node:
# vxdmpadm getsubpaths dmpnodename=c2t1d0s2
The specified DMP node must be a valid node in the /dev/vx/rdmp directory.
You can also use getsubpaths to obtain all paths through a particular host disk controller:
# vxdmpadm getsubpaths ctlr=c2
Listing Information About Host I/O Controllers
The following command lists attributes of all host I/O controllers on the system:
# vxdmpadm listctlr all
This form of the command lists controllers belonging to a specified enclosure and enclosure type:
# vxdmpadm listctlr enclosure=enc0 type=X1
Disabling a Controller
Disabling I/O to a host disk controller prevents DMP from issuing I/O through the specified controller. The command blocks until all pending I/O issued through the specified disk controller are completed.
To disable a controller, use the following command:
# vxdmpadm disable ctlr=ctlr
Enabling a Controller
Enabling a controller allows a previously disabled host disk controller to accept I/O. This operation succeeds only if the controller is accessible to the host and I/O can be performed on it. When connecting active/passive disk arrays in a non-clustered environment, the enable operation results in failback of I/O to the primary path. The enable operation can also be used to allow I/O to the controllers on a system board that was previously detached.
To enable a controller, use the following command:
# vxdmpadm enable ctlr=ctlr
Listing Information About Enclosures
To display the attributes of a specified enclosure, use the following command:
# vxdmpadm listenclosure enc0
The following command lists attributes for all enclosures in a system:
# vxdmpadm listenclosure all
Renaming an Enclosure
The vxdmpadm setattr command can be used to assign a meaningful name to an existing enclosure, for example:
# vxdmpadm setattr enclosure enc0 name=GRP_1
This example changes the name of enclosure from enc0 to GRP_1.
NOTE: The maximum length of an enclosure name is 25 characters.
Starting the DMP Restore Daemon
The DMP restore daemon re-examines the condition of paths at a specified interval. The type of analysis it performs on the paths depends on the specified checking policy.
Use the start restore command to start the restore daemon and specify the policy:
# vxdmpadm start restore policy=check_disabled
The check_disabled policy (the default) checks the condition of paths that were previously disabled due to hardware failures, and revives them if they are back online. If the policy is set to check_all, the restore daemon analyzes all paths in the system and revives the paths that are back online, as well as disabling the paths that are inaccessible.
NOTE: The DMP restore daemon does not change the disabled state of the path through a controller that you have disabled using vxdmpadm disable.
The command vxdmpadm start restore is used to set the interval of polling. For example, the polling interval is set to 400 seconds using the following command:
# vxdmpadm start restore interval=400
The default interval is 300 seconds. Decreasing this interval can adversely affect system performance. To change the interval or policy, you must stop the restore daemon and restart it with new attributes.
Stopping the DMP Restore Daemon
Use the following command to stop the DMP restore daemon:
# vxdmpadm stop restore
NOTE: Automatic path failback stops if the restore daemon is stopped.
Displaying the Status of the DMP Restore Daemon
Use the following command to display the status of the automatic path restoration daemon, its polling interval, and the policy that it uses to check the condition of paths:
# vxdmpadm stat restored
This produces output such as the following:
The number of daemons running : 1
The interval of daemon: 300
The policy of daemon: check_disabled
Displaying Information About the DMP Error Daemons
To display the number of error daemons that are running, use the following command:
# vxdmpadm stat errord
You can use the vxdmpadm utility to perform the following tasks.
Retrieve the name of the DMP device corresponding to a particular path
List all paths under a DMP device
List all controllers connected to disks attached to the host
List all the paths connected to a particular controller
Enable or disable a host controller on the system
Rename an enclosure
Control the operation of the DMP restore daemon
The following sections cover these tasks in detail along with sample output. For more information, see the vxdmpadm(1M) manual page.
Retrieving Information About a DMP Node
The following command displays the DMP node that controls a particular physical path:
# vxdmpadm getdmpnode nodename=c3t2d1
The physical path can be specified as the nodename attribute, which must be a valid path listed in the /dev/rdsk directory.
Use the enclosure attribute with getdmpnode to obtain a list of all DMP nodes for the specified enclosure.
# vxdmpadm getdmpnode enclosure=enc0
Displaying All Paths Controlled by a DMP Node
The following command displays the paths controlled by the specified DMP node:
# vxdmpadm getsubpaths dmpnodename=c2t1d0s2
The specified DMP node must be a valid node in the /dev/vx/rdmp directory.
You can also use getsubpaths to obtain all paths through a particular host disk controller:
# vxdmpadm getsubpaths ctlr=c2
Listing Information About Host I/O Controllers
The following command lists attributes of all host I/O controllers on the system:
# vxdmpadm listctlr all
This form of the command lists controllers belonging to a specified enclosure and enclosure type:
# vxdmpadm listctlr enclosure=enc0 type=X1
Disabling a Controller
Disabling I/O to a host disk controller prevents DMP from issuing I/O through the specified controller. The command blocks until all pending I/O issued through the specified disk controller are completed.
To disable a controller, use the following command:
# vxdmpadm disable ctlr=ctlr
Enabling a Controller
Enabling a controller allows a previously disabled host disk controller to accept I/O. This operation succeeds only if the controller is accessible to the host and I/O can be performed on it. When connecting active/passive disk arrays in a non-clustered environment, the enable operation results in failback of I/O to the primary path. The enable operation can also be used to allow I/O to the controllers on a system board that was previously detached.
To enable a controller, use the following command:
# vxdmpadm enable ctlr=ctlr
Listing Information About Enclosures
To display the attributes of a specified enclosure, use the following command:
# vxdmpadm listenclosure enc0
The following command lists attributes for all enclosures in a system:
# vxdmpadm listenclosure all
Renaming an Enclosure
The vxdmpadm setattr command can be used to assign a meaningful name to an existing enclosure, for example:
# vxdmpadm setattr enclosure enc0 name=GRP_1
This example changes the name of enclosure from enc0 to GRP_1.
NOTE: The maximum length of an enclosure name is 25 characters.
Starting the DMP Restore Daemon
The DMP restore daemon re-examines the condition of paths at a specified interval. The type of analysis it performs on the paths depends on the specified checking policy.
Use the start restore command to start the restore daemon and specify the policy:
# vxdmpadm start restore policy=check_disabled
The check_disabled policy (the default) checks the condition of paths that were previously disabled due to hardware failures, and revives them if they are back online. If the policy is set to check_all, the restore daemon analyzes all paths in the system and revives the paths that are back online, as well as disabling the paths that are inaccessible.
NOTE: The DMP restore daemon does not change the disabled state of the path through a controller that you have disabled using vxdmpadm disable.
The command vxdmpadm start restore is used to set the interval of polling. For example, the polling interval is set to 400 seconds using the following command:
# vxdmpadm start restore interval=400
The default interval is 300 seconds. Decreasing this interval can adversely affect system performance. To change the interval or policy, you must stop the restore daemon and restart it with new attributes.
Stopping the DMP Restore Daemon
Use the following command to stop the DMP restore daemon:
# vxdmpadm stop restore
NOTE: Automatic path failback stops if the restore daemon is stopped.
Displaying the Status of the DMP Restore Daemon
Use the following command to display the status of the automatic path restoration daemon, its polling interval, and the policy that it uses to check the condition of paths:
# vxdmpadm stat restored
This produces output such as the following:
The number of daemons running : 1
The interval of daemon: 300
The policy of daemon: check_disabled
Displaying Information About the DMP Error Daemons
To display the number of error daemons that are running, use the following command:
# vxdmpadm stat errord
Tuesday, 21 July 2009
Quick Crib for HPUX troubleshooting
uname -a
model
bdf
setboot
ioscan -fn
ioscan -funC disk
swlist -l product
strings /etc/lvmtab
vgdisplay -v
lvdisplay -v /dev/vg*/lv*
top
UNIX95=1 ps -efH
model
bdf
setboot
ioscan -fn
ioscan -funC disk
swlist -l product
strings /etc/lvmtab
vgdisplay -v
lvdisplay -v /dev/vg*/lv*
top
UNIX95=1 ps -efH
HPUX equivalent of ptree
I sorely miss the proc tools found on Solaris and Linux each time I have to deal with HP-UX - the tools pfiles, ptree, pkill, pgrep are just too valuable to go without. Here is just one hack I found that can effectively do the same function as ptree (well, sort of):
bash-3.00# UNIX95=1 ps -Hef
The output of all processes on the system will grouped by parent process id's with children processes nicely indented below their parents. Even though it is not even nearly as good as using a genuine ptree utility, since you may have to brose the longish list to find all the parents of the process you're interested in, it still has definite usefulness. Please remember not to export the UNIX95 variable since if exported this variable will effect the way other programs you may start from command line will behave after that point.
bash-3.00# UNIX95=1 ps -Hef
The output of all processes on the system will grouped by parent process id's with children processes nicely indented below their parents. Even though it is not even nearly as good as using a genuine ptree utility, since you may have to brose the longish list to find all the parents of the process you're interested in, it still has definite usefulness. Please remember not to export the UNIX95 variable since if exported this variable will effect the way other programs you may start from command line will behave after that point.
Wednesday, 1 July 2009
use getfacl to show file permissions and ownership
especially good if used recursively;
getfacl -R /aa/aaa/aaaa
getfacl -R /aa/aaa/aaaa
Tuesday, 30 June 2009
hummingbird exceed
Below is the text of a document I wrote to setup Exceed.
****************************
Using Exceed X Server with SSH X11 Tunneling
Step 1: Install and configure Exceed on your PC
Step 2: Configure Exceed for Passive Mode and Multiple Windows
Exceed’s passive mode allows you to start the X Server on your PC without it making any initial attempt to connect to a specific remote host.
Set Exceed to use Passive Mode and Multiple Windows Mode. Both of these settings are Exceed defaults, but check the settings if Exceed has been used before.
1. Start -> Programs -> Hummingbird Connectivity 9.0 -> Exceed -> Xconfig
2. Set Passive Communications:
a. Click the Network and Communication link. This will open the Communications dialog box.
b. Select Passive from the mode field’s drop-down list.
c. Validate and apply changes (green checkmark on toolbar).
3. Set Multiple Windows Screen Definition:
a. Click the Display and Video link. This will open the Screen 0 dialog box.
b. Click the radio button beside Multiple in the Window Mode box in the upper left.
c. Validate and apply changes (green checkmark on toolbar).
Step 3: Configure Localhost Security
When using SSH X11 tunneling, the only host that Exceed will ever talk to is your own PC – the localhost. Thus, regardless of which or how many machines or accounts you’re going to use Exceed with, you only have to tell Exceed to answer to one machine – your local host.
1. Click the Security, Access Control and System Administration link. This will open the Security dialog box.
2. In the Host Access Control List section of the Security dialog box, click the radio button that is to the immediate left of the word File.
3. Click the Edit box to the right of the name xhost.txt. A NotePad editing session will be initiated, editing the xhost.txt file.
4. Type localhost on a new line in the file.
a. If your xhost.txt file already has other specific hosts listed, delete those lines.
5. Save your changes to xhost.txt by clicking File in the menu bar, then selecting Save.
6. Leave NotePad by clicking File in the menu bar, then selecting Exit.
7. Validate and apply changes (green checkmark on toolbar).
Step 4: Unconfigure your Unix Account
If you have set your account to talk to your X Server, you have to remove these settings before you can use it with SSH X11 tunneling.
For Korn/Bourne shell users, check your .profile file, and remove any lines that look like this:
export DISPLAY=xxx.xxx.xxx.xxx:0
After that, and X-Windows window will automatically open whenever you start an X-Windows program on any remote Unix host.
A good X-Windows program to test with when you first setup Exceed is xclock. On your Unix host using your Unix account, enter: /usr/X/bin/xclock &
and a small X-Windows window containing a clock will open on your PC’s screen.
Using Exceed X Server with SSH
When using telnet, passwords will be sent across the network in plain text and can be viewed with other network traffic using a sniffer or other methods. This is an example of the password being intercepted using the Solaris snoop utility:
158 12.50892 xxx.xx.xx.xxx -> myhost TELNET C port=665 X&d2k7GG\r
Where “X&d2k7GG\r” is your password with a return at the end. Using the Secure Shell start method will eliminate sending your password in plain text across the network.
1. Start -> Programs -> Hummingbird Connectivity 9.0 -> Exceed -> Xstart
2. In the Start Method box in the upper left, select Secure Shell (Set Display).
3. Enter the host in the box to the right of the word Host.
4. Enter the host type in the box to the right of the words Host Type by selecting Sun in the drop-down box. Then select the command to use by clicking on the ellipsis button and selecting XTerm. This will populate the command line with a predefined xterm command line.
5. To the right of the Information prompt, select the radio button labeled None.
6. In the Secure Shell Profile: field in the upper section of the xstart session, click on the ellipsis button. This will launch the Open Tunnel application.
7. In the lower left corner, click on the Add New Tunnel button. In the Tunnel name: box enter the name for your new tunnel.
8. Using the drop-down list in the Host name: field, select the host for your new tunnel.
9. Enter your Unix account login in the User name: field.
10. In the TCP port: field leave the default of 22.
11. After entering the information for the new tunnel, click OK.
12. This will add the new tunnel to the list. With your new tunnel highlighted, click Open in the lower right. The Secure Shell Profile: will now use this tunnel when opening a connection to your Unix host.
When you start Unix client connection using the Xstart Client Startup Application, you will be prompted for a Password Authentication. Enter your Unix account password and you will receive a secure connection to your Unix host.
****************************
Using Exceed X Server with SSH X11 Tunneling
Step 1: Install and configure Exceed on your PC
Step 2: Configure Exceed for Passive Mode and Multiple Windows
Exceed’s passive mode allows you to start the X Server on your PC without it making any initial attempt to connect to a specific remote host.
Set Exceed to use Passive Mode and Multiple Windows Mode. Both of these settings are Exceed defaults, but check the settings if Exceed has been used before.
1. Start -> Programs -> Hummingbird Connectivity 9.0 -> Exceed -> Xconfig
2. Set Passive Communications:
a. Click the Network and Communication link. This will open the Communications dialog box.
b. Select Passive from the mode field’s drop-down list.
c. Validate and apply changes (green checkmark on toolbar).
3. Set Multiple Windows Screen Definition:
a. Click the Display and Video link. This will open the Screen 0 dialog box.
b. Click the radio button beside Multiple in the Window Mode box in the upper left.
c. Validate and apply changes (green checkmark on toolbar).
Step 3: Configure Localhost Security
When using SSH X11 tunneling, the only host that Exceed will ever talk to is your own PC – the localhost. Thus, regardless of which or how many machines or accounts you’re going to use Exceed with, you only have to tell Exceed to answer to one machine – your local host.
1. Click the Security, Access Control and System Administration link. This will open the Security dialog box.
2. In the Host Access Control List section of the Security dialog box, click the radio button that is to the immediate left of the word File.
3. Click the Edit box to the right of the name xhost.txt. A NotePad editing session will be initiated, editing the xhost.txt file.
4. Type localhost on a new line in the file.
a. If your xhost.txt file already has other specific hosts listed, delete those lines.
5. Save your changes to xhost.txt by clicking File in the menu bar, then selecting Save.
6. Leave NotePad by clicking File in the menu bar, then selecting Exit.
7. Validate and apply changes (green checkmark on toolbar).
Step 4: Unconfigure your Unix Account
If you have set your account to talk to your X Server, you have to remove these settings before you can use it with SSH X11 tunneling.
For Korn/Bourne shell users, check your .profile file, and remove any lines that look like this:
export DISPLAY=xxx.xxx.xxx.xxx:0
After that, and X-Windows window will automatically open whenever you start an X-Windows program on any remote Unix host.
A good X-Windows program to test with when you first setup Exceed is xclock. On your Unix host using your Unix account, enter: /usr/X/bin/xclock &
and a small X-Windows window containing a clock will open on your PC’s screen.
Using Exceed X Server with SSH
When using telnet, passwords will be sent across the network in plain text and can be viewed with other network traffic using a sniffer or other methods. This is an example of the password being intercepted using the Solaris snoop utility:
158 12.50892 xxx.xx.xx.xxx -> myhost TELNET C port=665 X&d2k7GG\r
Where “X&d2k7GG\r” is your password with a return at the end. Using the Secure Shell start method will eliminate sending your password in plain text across the network.
1. Start -> Programs -> Hummingbird Connectivity 9.0 -> Exceed -> Xstart
2. In the Start Method box in the upper left, select Secure Shell (Set Display).
3. Enter the host in the box to the right of the word Host.
4. Enter the host type in the box to the right of the words Host Type by selecting Sun in the drop-down box. Then select the command to use by clicking on the ellipsis button and selecting XTerm. This will populate the command line with a predefined xterm command line.
5. To the right of the Information prompt, select the radio button labeled None.
6. In the Secure Shell Profile: field in the upper section of the xstart session, click on the ellipsis button. This will launch the Open Tunnel application.
7. In the lower left corner, click on the Add New Tunnel button. In the Tunnel name: box enter the name for your new tunnel.
8. Using the drop-down list in the Host name: field, select the host for your new tunnel.
9. Enter your Unix account login in the User name: field.
10. In the TCP port: field leave the default of 22.
11. After entering the information for the new tunnel, click OK.
12. This will add the new tunnel to the list. With your new tunnel highlighted, click Open in the lower right. The Secure Shell Profile: will now use this tunnel when opening a connection to your Unix host.
When you start Unix client connection using the Xstart Client Startup Application, you will be prompted for a Password Authentication. Enter your Unix account password and you will receive a secure connection to your Unix host.
Monday, 29 June 2009
If you cannot find an emulex or qlogic HBA driver on Red hat Linux
well, this driver might be the answer;
cpq_cciss 2.4.60 Jun 26 2006 HP cciss 2.4.60 HBA driver RPM
cpq_cciss 2.4.60 Jun 26 2006 HP cciss 2.4.60 HBA driver RPM
Subscribe to:
Posts (Atom)
