Tuesday, April 5, 2011

Network management - HPUX


Network management - HPUX

To display the network interface cards and status
# lanscan  Hardware Station        Crd  Hdw   Net-Interface    NM   MAC       HP-DLPI DLPI  Path     Address        In#  State NamePPA          ID   Type      Support Mjr#  0/0/0/0  0x00306E1CC281 0    UP    lan0 snap0       1    ETHER       Yes   119  1/12/0/0 0x00306E210F32 3    UP    lan3 snap3       2    ETHER       Yes   119 
To configure the NIC cards such as speed, MTU, etc..
# lanadmin (it is a interactive tool) 
To find out the speed of duplex setting of lan0
# lanadmin -x 0  Speed = 1000 Full-Duplex.  Autonegotiation = On. 
To list all the configured interfaces and IP addresses
# netstat -in 
To force HP-UX to use specific interface card
# traceroute -i lan2 10.20.30.40  
HP-UX stores network interface configuration information on /etc/rc.config.d/netconf file
# cat /etc/rc.config.d/netconf  HOSTNAME="it-hp49"  OPERATING_SYSTEM=HP-UX  LOOPBACK_ADDRESS=127.0.0.1  INTERFACE_NAME[0]="lan0"  IP_ADDRESS[0]="216.131.195.137"  SUBNET_MASK[0]="0xffffff00"  BROADCAST_ADDRESS[0]="216.131.195.255"  INTERFACE_STATE[0]=""  DHCP_ENABLE[0]=0   ROUTE_DESTINATION[0]="default"  ROUTE_MASK[0]=""  ROUTE_GATEWAY[0]="216.131.195.10"  ROUTE_COUNT[0]="1"  ROUTE_ARGS[0]="" 
To add a alias address to lan0, add the network information to /etc/rc.config.d/netconf file
INTERFACE_NAME[0]=lan0:1  IP_ADDRESS[0]=216.131.195.138  SUBNET_MASK[0]=255.255.255.0  BROADCAST_ADDRESS[0]=""  INTERFACE_STATE[0]=""  DHCP_ENABLE[0]=0  INTERFACE_MODULES[0]="" 
Restart the network service
/sbin/init.d/net start 
Network Tracing and Logging
The nettl command is a tool used to capture network events or packets. 
Initialize the tracing/logging facility:
# nettl -start 
Display the status of the tracing/logging facility.
# nettl -status all 

nwmgr (Network Interface Management)

The nwmgr program is the unified command to administer all HP-UX LAN and RDMA interfaces. This command can be used to:
  • Display information of an interface
  • Modify settings of an interface
  • Reset the interface or its statistics
  • Diagnose link connectivity
  • Create and set configuration information for a component simultaneously
  • Delete or erase components
# nwmgr   Name/          Interface Station          Sub-   Interface      Related ClassInstance  State     Address        system   Type           Interface ============== ========= ============== ======== ============== ========= lan2           DOWN      0x001A4B096828 iether   1000Base-T lan0           UP        0x001A4B097F9A iether   1000Base-T lan1           DOWN      0x001A4B097F9B iether   1000Base-T 
# nwmgr --help -S all  # lists all the subsystems  # nwmgr --help -S subsystem # display subsystem specific usage 
To View Interface attributes
# nwmgr  -A all -c lan0 lan0 current values:    Link State = Up    Speed = 1 Gbps Full Duplex (Autonegotiation : On)    MTU = 1500    MAC Address = 0x001a4b097f9a    Receive Flow Control = On    Transmit Checksum Offload = Off    Receive Checksum Offload = Off    Virtual MTU = 0       TCP Segmentation Offload is now disabled.    Max Send Buffers = 1    Max Send Coalesce Ticks = 150    Max Recv Buffers = 1    Max Recv Coalesce Ticks = 0    Interrupt Throttle Mode = -1    Diagnostics Threshold = 0    512byte transmit buffer size limit = 0
To get interface statistics for interface lan0
# nwmgr --st all -c lan0 
To View interface details
# nwmgr -q info -c lan0 
To get interface vital product data
# nwmgr -q vpd -c lan0 
To set interface attributes
# nwmgr -s -A attr1-value, attr2=value ... -c lan0 
Reset statistics for an interface
# nwmgr -r --st -c lan 
Some nwmgr Syntax and their Equivalent lanadmin and linkloop Syntax are given bellow
nwmgr -S vlan
lanadmin -V scan nwmgr -c lan5000
lanadmin -V info 5000 nwmgr -a -S vlan -A vlanid=10, ppa=1
lanadmin -V create vlanid 10 1 nwmgr -s -c lan5000 -A vlanid=20
lanadmin -V modify vlanid 20 5000 nwmgr -d -c lan5000
lanadmin -V delete 5000 nwmgr --cra -c lan5000
lanadmin -p 5000 nwmgr --diag -c lan5000 -A dest=0xaabbccddeeff linkloop -i 5000 0xaabbccddeeff

Thursday, March 31, 2011

FreePrepaid MobileRecharge on Amulyam

  Free Prepaid Mobile Recharge  
 

Amulyam.in gives you free prepaid mobile recharge to users of all Indian telecom operators for completing offers on it's sponsor's websites.

 
  Amulyam Free Recharge  
  Sign Up Now
 
   
 

You are invited to join Amulyam by Laxman. If you do not wish to receive this type of emails from Amulyam in the future, please click here to stop recieving any mails further.

 

Tuesday, March 8, 2011

HP-UX Overview and Command Summary - page 12


Users Administration
Creating Users
  • sam --> user and group accounts
  • useradd -g users -d Username
Creating Groups
sam --> user and group accounts
groupadd Groupname
Useful Commands
Command
Description
or \
autocompletion
file *
Show file types, such as "ascii".
find -name -print
Finds a file in the OS at the starting path on down
grep
groups
Shows groups for a user
kmtune
Displays kernel tunable parameters
listusers -g
Lists the users in a group
ln -s
Creates a symbolic link to a file or a directory
pr -o10 -l64 -F -h


| lp
prints using margins of 10, page length of 64, header on each page
rcp remote_machine:
remote copy
remsh
opens a remote command shell on the host machine
rlogin
remote login to host machine
sar
set_parms
Change host name (/etc/set_parms)
tail -f
Looks at end of file and keeps it open to watch changes
top
realtime display of processes
uname -a
information about the system
print $(uname -i)16op|dc
prints hex system id
who -u, who -Rm
who is using the system

Process to recover from a lost/forgotten root password
1.     Power off the server
2.     Power on the server
3.     Interupt the boot process during the 10 second interval (display will indicate this on the screen)
4.     bo pri
5.     Answer yes to interact with the ipl
6.     At the prompt "hpux -is" for single user mode
7.     cd /sbin
8.     passwd root  and  follow prompts to put in new password
9.     shutdown -r 0  to reboot to multiuser mode



Find HP-UX Overview and Command Summary All pages 
Page 12    |||    Page 11    |||   Page 10   |||   Page 9   |||
Page 8      |||    Page 7      |||   Page 6     |||   Page 5   |||
Page 4      |||    Page 3      |||   Page 2     |||    Page 1  |||

HP-UX Overview and Command Summary - page 11


Starting an X-Window application from telnet

start an X-Window server on the PC, such as exceed
export DISPLAY=W.X.Y.Z:0.0     <---W.X.Y.Z is the IP Address of the PC
/opt/ignite/bin/ignite                          <---Now just run the program


Configuring an HP 700/96 Terminal for a server connection:
  • Terminal Ports
    • Port 1 
      • Datacommunications
      • 25 Pin - use this to connect to the N class server with a 25 pin to 9 pin cable
    • Port 2 - used to connect to an external peripheral
      • Parallel
      • 25 Pin
    • Port 3
      • Datacommunications
      • 9 Pin - use this port to connect to the A class server with a 9 pin to 25 pin cable
  • Terminal Configuration Settings
    • Press User/System function key
      • modes
        • Remote Mode must have an asterisk in it's box (indicating it is selected)
      • config keys
        • datacomm config
          • baud rate 9600
          • parity:  none/8
          • xon/xoff
        • terminal config
          • serial (2)/parallel(1) - 25 pin console port
          • serial (1)/parallel(1) - 9 pin console port
          • Term ID - vt100
          • Term Mode - em100
        • ansi config
          • em100
          • backspace/del

Page 12
Page 10


Find HP-UX Overview and Command Summary All pages 
Page 12    |||    Page 11    |||   Page 10   |||   Page 9   |||
Page 8      |||    Page 7      |||   Page 6     |||   Page 5   |||
Page 4      |||    Page 3      |||   Page 2     |||    Page 1  |||

HP-UX Overview and Command Summary - page 10


Command Script to print useful information to a file called info
echo "sel path system; info; wait; infolog
>view
>done
>"lcstm>info
#cat info

print_manifest  (located in /var/opt/ignite/local/manifest/manifestinfo ??)

Command Script to print useful information
cstm
cstm>Map
cstm>SelAll
cstm>Information
cstm>Infolog
cstm>exit

Command Script to print useful information  (not sure this is complete/correct)
cstm
cstm>SelClass type "Disk" qualifier "All"
cstm>info;wait
cstm>il
cstm>create /tmp/disk.stm
cstm>done
cstm>quit
cstm>ok

cstm -f /tmp/disk.stm
Terminal Environment
TERM - environmental variable indicating type of terminal
stty
termio

/usr/share/lib/terminfo

setup string for xterm:  /usr/bin/X11 -ls -d @D

$DISPLAY=192.168.70.80:0.0

$TERM = xterm

stty
stty -all

Running Exceed  --> xstart
  • Rightl Click  --> Huge


Page 11
Page 9


Find HP-UX Overview and Command Summary All pages 
Page 12    |||    Page 11    |||   Page 10   |||   Page 9   |||
Page 8      |||    Page 7      |||   Page 6     |||   Page 5   |||
Page 4      |||    Page 3      |||   Page 2     |||    Page 1  |||

HP-UX Overview and Command Summary - page 9


Changing the Server Name and the IP Address
  • Using set_parms  --> may not work correctly for multiple nics
    • set_parms hostname  ( a reboot is required for the change to take effect)
      • It will prompt you for the new hostname
      • It will prompt you to reboot (answer no if you are also changing the ip address)
    • set_parms ip_address   ( a reboot is required for the change to take effect)
      • It will prompt you for the new ip address
      • It will prompt you to reboot
  • Manually makiing the change:
    • vi /etc/hosts
    • vi /etc/rc.config.d/netconf   <-- ** Make sure that no extra files are in the /etc/rc.config.d directory - it gets sourced on bootup
    • reboot
  • Other files that may need to checked/changed
    • /etc/resolv.conf
    • /etc/nsswitch.conf

System Tuning
Extract Current System File
  • cd /stand/build
  • /usr/lbin/sysadm/system_prep -s /stand/build/system
    • file is called system
    • section called "Tunable Parameters"

kmtune - displays the tunable parameters
kmtune -l  <-- This displays a detailed report of the parameters (current, planned, default, minimum, etc)
sam allows you to tune the kernel
Manual Kernel Build (not using sam)  -->  /usr/sbin/mk_kernel -s /stand /build/system
STM
diaglogd

/var/opt/resmon/log

Procedure to use STM to determine memory configuration
  • Type stm at the command line
  • Type o to select ok
  • Press the down arrow in the displayed map and select memory by hitting the space bar
  • Press tab to go to menus and arrow over to Tools and hit enter
  • Select Information -> and hit enter
  • Select Information Log and hit enter
  • Information Tool Log for Memory will be displayed
  • To print either select Print or SaveAs (to save the log to file for later printing)

Page 10
Page 8


Find HP-UX Overview and Command Summary All pages 
Page 12    |||    Page 11    |||   Page 10   |||   Page 9   |||
Page 8      |||    Page 7      |||   Page 6     |||   Page 5   |||
Page 4      |||    Page 3      |||   Page 2     |||    Page 1  |||