Linux Unix help !!

"Give respect to Time, One day at right Time, Time will respect You"

Monday, March 12, 2012

HP-UX Basic Admin -2 - Basic Admins

Xxxxxxxxxxxxxx HP-UX - Basic Administration - II  xxxxxxxxxxxxxxxxxxxxX
------------ Index -----------------
1> System Info
2> Basic Admins
3> Software and imp log files
4> Patching and Recovery          <Yet to update>
5> Backup and Tools                  <Yet to update>     
5> Advanced Administrations     <Yet to update>
------------------------------------



## Display Hostname
# hostname

## IP Address
# netstat -ani

## Disk Utilization
# bdf
# df -Pk

## Show run levels
# who -r
   .       run-level 3  Oct 28 11:22    3    0    S
[[ 0: shut down
s,S: single-user
1: sys admin
2: multiuser
3*: share NFS
4*: start GUI
5: user-defined
6: user-defined ]]

### Shutdown/Restart
<<HALT>>
# shutdown -h -y now  
# init 0                                          
# shutdown -hy 120    
# shutdown -h -y 120                   <<Shutdown in 120 sec>>
# shutdown -Fr now                     <Force fsck upon reboot SAFE way>

<<Reboot>>
# shutdown -r -y now 
# shutdown -r 0                              
# reboot 0

<<To shutdown to single user mod>>
# shutdown -y 0
# shutdown -y now
# shutdown 0
# init 1
# hpux -is
# init S
# reboot -h    <<Come from Single user Mode>>

### LAN IP Info
# lanscan        
# lanscan  -v   
# netstat -in   
# ifconfig lanx   [ x=0/1/2/....]

Note: lanscan is deprecated in 11.31 now can find  # nwmgr

### Assign/Display  IP
## GET
# ifconfig lan0
# netstat -ani  
#

## Set
# landiag          
# lanadmin              
# vi /etc/rc.config.d/netconf
HOSTNAME="Shirish"
INTERFACE_NAME[0]=lan0
IP_ADDRESS[0]=192.168.8.10
SUBNET_MASK[0]=255.255.255.0
BROADCAST_ADDRESS[0]=""
INTERFACE_STATE[0]=""
DHCP_ENABLE[0]=0
INTERFACE_MODULES[0]=""

##NOTE: Above required restart to take effects FOR immediate use below but note it's temp
# ifconfig lan3 192.168.8.10 netmask 255.255.255.0  up     

## Up network interface
# ifconfig lan3 up

## Down network interactive
# ifconfig lan3 down

## ARP/Routing Table info/Define new route
# arp -a
# netstat -ar
# route add default 192.168.8.1 1

## Start/Stop Network

/sbin/init.d/net stop; /sbin/init.d/net start
Note: There's NO restart option you have to stop; then start
WARNING: Pass both as single command as above else you will loose control of your server/system

### Hostname start/stop
# /sbin/init.d/hostname stop
/sbin/init.d/hostname start
   
## Set timezone
# vi /etc/TIMEZONE




--Shirish Shukla
hp-ux, hp unix, hp-ux basic admin commands, hp-ux getconf, linux, linuxva, shirish, shukla

No comments:

Post a Comment

Write Here .. your comments are always wellcome ..but no spam please !!

Followers

Pls LIKE my Story !!!