Linux Unix help !!

"Give respect to Time, One day at right Time, Time will respect You"
Showing posts with label HP-UX. Show all posts
Showing posts with label HP-UX. Show all posts

Monday, March 12, 2012

HP-UX Basic Admin -3 - Software and imp log files

Xxxxxxxxxxxxxx HP-UX - Basic Administration - III  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>
------------------------------------


### Installed Softwares
# swlist -l product
# swlist -l patch
# swlist -l file
# swlist -l product | grep -i <ur-pack>

## verify package/patches
# swlist -l -a state
# swverify
# swlist -s   <path-of-your-pack>

### Install
# swinstall -s  <path-of-your-pack>
>>>> Select Package -> Go to Action > Install ...

## Varify is Installed
# swlist -l product | grep -i  <your-pack-name>


### Un-install
swremove
##

##### Important Files/log files etc..
### Log Files
# more  /var/adm/syslog/syslog.log
# more  /var/adm/syslog/mail.log
# more  /var/adm/cron/log
# more  /var/adm/syslog/syslog.log
# more /var/sam/log/samlog


--Shirish Shukla
hp-ux, hp unix, hp-ux basic admin commands, hp-ux getconf, hp-ux swinstall, software, log files , linux, linuxva, shirish, shukla

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

HP-UX Basic Admin -1 - Sys Info

Xxxxxxxxxxxxxx HP-UX - Basic Administration - I 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>
------------------------------------


## 64 or 32 bit ??
# getconf KERNEL_BITS
64

# file /stand/vmunix
/stand/vmunix:  ELF-64 executable object file - PA-RISC 2.0 (LP64)

# find / -name print_mani*
/opt/ignite/binpa/print_manifest
# /opt/ignite/binpa/./print_manifest | grep -i mod
    Model:              9000/800/L3000-8x
    OS mode:            64 bit

# getconf HW_CPU_SUPP_BITS
64

## Get detailed information about System
# find / -name print_mani*
/opt/ignite/binpa/print_manifest
# /opt/ignite/binpa/./print_manifest

## Get Model
# model
9000/800/L3000-7x
### Configuration files
# cd /etc/rc.config.d

### Your Kernel
# cd /stand/vmunix

### Display Kernel Paramiters
# kctune
# sysdef
# kmtune

## Get memory info
# /usr/sam/lbin/./getmem
# dmesg | grep -i Phy
# /opt/ignite/bin/print_manifest    <-- An detailed infor about your system

### All Kernel Parms and Hwrs
# /usr/sbin/sysdef or ioscan –fn

### Devices Messages
# dmesg

## Get System Serial Number
# echo "sel dev 1 ;info;wait;infolog" | cstm |grep -i "System Serial Number"
   System Serial Number...: SGH444039B

### Check swap space
# swapinfo
# swapinfo -m     <- IN MB
# swapinfo -tm    <- Disp Total Row


### Check attached Disk/devices/hws
# ioscan -funC disk
# ioscan -C disk
# ioscan -fnC lan
# ioscan -fnC tape   
# ioscan -fnC  lun

Here:
-u: Show usable devices i.e don;t rescan
-f: Full listing
-C: Show Class
-n: Device name

### Format a disk
# ioscan -funC disk
Class     I  H/W Path     Driver S/W State   H/W Type     Description
=====================================================================
disk      1  0/0/1/1.2.0  sdisk CLAIMED     DEVICE       HP 73.4GST373454LC
                         /dev/dsk/c1t2d0   /dev/rdsk/c1t2d0
..
..

# mediainit /dev/rdsk/c1t2d0

### Disk detailed info
# diskinfo -v /dev/rdsk/c1t2d0


--Shirish Shukla
hp-ux, hp unix, hp-ux basic admin commands, hp-ux getconf,hp-ux get 32 or 64 bit, disk info etc.., unix linux, linuxva, shirish, shukla

Followers

Pls LIKE my Story !!!