Quick Refence - AIX x HP-UX - command line comparison

sábado, 28 de abril de 2012

Bellow a little list showing the equivalent command in both SO, HP-UX and AIX.


HP-UX AIX


Commands

sam/smh (11iv3) smitty Administrative tool

swlist oslevel Check system level

swlist lslpp List installed packages

swinstall/swremove installp Install/remove packages

swapinfo lsps List swap

top topas Monitoring system

stm diag Check hw

usermod chuser Modify user parms

vgchange -a n varyoffvg Desactive a VG

vgchange -a y varyonvg Active a VG

vgdisplay lsvg List VG properties

lvdisplay lslv/lsfs List FS properties

lvremove rmlv Remove a LV

bdf df Check FS.

ioscan cfgmgr Add a device

rmsf rmdev Remove a device

glance nmon Monitoring system performance

setboot bootlist -o -m normal Check boot list

getconf MACHINE_SERIAL (pa-risc) machinfo | grep -i serial lsattr -El sys0 -a systemid Check machine serial

shutdown -y -h 0 shutdown -Fh now Shutdown server
Files



/etc/nsswitch.conf /etc/netsvc.conf Query order (passwd.. host)

/etc/fstab /etc/filesystems Filesystem list

/dev/rmt/0mn /etc/rmt0 Tape device

/var/adm/messages /var/adm/syslog/syslog.log System log







rresvport_af: socket: All ports in use (loop!)

terça-feira, 17 de abril de 2012

Follow the message showed when you try check a queue:

# lpstat QUEUE
rresvport_af: socket: All ports in use
err: rresvport_af()
/usr/sbin/rlpstat: Connection to QUEUE is down
no entries

Solution:

Check for "rpl" process running (will see a lot of them):

# ps -ef | grep rlp
root   1688   2345   0 08:24:40    ?      0:00 rlpdaemon -i


Use the "smh" to verify the type of that queue.

When the printer is a "remote" printer and it was created as a "network" printer, it will begin a loop causing problems to spooler. In this case is necessary remove the printer and create it again, you can create/remove it using hppi or by command line (addqueue/removequeu).
root   988   2345   0 08:24:40    ?      0:00 rlpdaemon -i

HBA - Finding the firmware version

Check fc available in your box:

# ioscan -fnCfc

Now replace the "fcms0X" for your fc:

#fcmsutil /dev/fcms0X vpd

Adding a tape/CD drive to a HPVM guest

segunda-feira, 9 de abril de 2012

To create an HP-UX sctl device file, follow these steps:
1. Run ioscan to pick up any new devices that may have just been connected:
# ioscan -fn


2. Locate the device designated for attachment.
2a. Install any device special files for these new devices:
# insf -e

2b. Check to see if the new devices were claimed by VM Host:
# ioscan -fun

The following is an example of a claimed tape device:
tape 1 0/2/1/0.5.0 stape CLAIMED DEVICE HP C7438A
/dev/rmt/1m /dev/rmt/c6t5d0BESTn
/dev/rmt/1mb /dev/rmt/c6t5d0BESTnb
/dev/rmt/1mn /dev/rmt/c6t5d0DDS
/dev/rmt/1mnb /dev/rmt/c6t5d0DDSb
/dev/rmt/c6t5d0BEST /dev/rmt/c6t5d0DDSn
/dev/rmt/c6t5d0BESTb /dev/rmt/c6t5d0DDSnb


3. Install sctl device files under the /dev/rscsi/ directory using the hpvmdevmgmt
command. For example:
# hpvmdevmgmt -I

The resource statements for attached devices take the following forms depending upon device
type:


For magnetic tape, use:
tape:scsi::attach:/dev/rscsi/cXtYdZ
For media changers, use:
changer:scsi::attach:/dev/rscsi/cXtYdZ
For CD/DVD burners, use:
burner:scsi::attach:/dev/rscsi/cXtYdZ
Where /dev/rscsi/cXtYdZ is an HP-UX sctl device file to the device type specified.

4. Locate a /dev/rscsi sctl device file that corresponds to the device slated for attachment.
If the device was claimed, the /dev/rscsi file ends with the same cXtYdZ numbers.
The following is an example of a tape device:
Claimed = /dev/rmt/c6t5d0BEST
SCTL = /dev/rscsi/c6t5d0

The following is an example of CD/DVD burner device:
Claimed = /dev/rdsk/c4t3d2SCTL = /dev/rscsi/c4t3d2
The following shows how the hardware address is broken down into controller, target and
device numbers:
c is the instance of 0/2/1/0
ext_bus
is 6
t is 5
d is 0
The sctl file to create is /dev/rscsi/c6t5d0

To create the sctl device file, see scsi_ctl(1M).Use the mknod command, substituting the values in the minor number as noted:
# /usr/sbin/mknod /dev/rscsi/devname c 203 0xCCTL02

The following is an example of media changer device:
Claimed = /dev/rac/c6t0d0
SCTL = /dev/rscsi/c6t0d0

Now attach the device in his guest (vm1), follow an example:

# hpvmmodify -P vm1 -a "tape:scsi::attach:/dev/rscsi/c6t0d0"


source: Installing and Managing Integrity Virtual Machines 3.5 manual

Ipfilter - logging tcp/upd connections

domingo, 8 de abril de 2012

First of all you need the ipfilter installed in you box, Ipfilter is a default software since HP-UX 11.23, for older you can download it free from software.hp.com.

1. Add the following rules to your Ipfilter.
The configuration file used for that is /etc/opt/ipf/ipf.conf.

pass in log first quick proto tcp from any to any flags S keep state
pass out log first quick proto tcp from any to any flags S keep state
pass in log first quick proto udp from any to any keep state
pass out log first quick proto udp from any to any keep state
pass in from any to any
pass out from any to any

2. Load the configuration file or restart the Ipfilter.

# /sbin/ipf -f /etc/opt/ipf/ipf.conf

Once the configuration is loaded every time a UDP or TCP connection is initiated it will be logged to the /var/adm/syslog/syslog.log
Can be a good idea now separate this log from syslog.