Difference between revisions of "HP-UX"

From Mesopoly 3.0
Jump to navigation Jump to search
Line 36: Line 36:
 
  >
 
  >
 
====environment variables====
 
====environment variables====
*environment and shell
+
*environment (global) and shell (local)
**environment
+
** difference - environment variables are inherited from parent proccess (shell) ..
 +
*syntax
 +
**<tt>$ VARX=SomeValue
 +
**$ echo $VARX
 +
** $ VARX="$VARX addblah"
 +
** $ VARX=`command`</tt> (Bourne, POSIX)
 +
** <tt>$ VARX=$(command)</tt>
 +
*commands
 +
**<tt>set unset</tt>
 +
*misc
 +
** single quotations takes 'as is' value, not variable value
  
 
====VI commands====
 
====VI commands====

Revision as of 08:06, 13 September 2006

This page is a byproduct of me getting ready for HP-UX CSA exam (hpo-091). I have more previous knowledge in Linux, so what I point out here would be HPUX specifics and bits and pieces needed to be adopted by me with the end of systematization of my knowledge.

I am making notes as I go through CSA: Official Study Guide and Reference.

links

tips and notes

shell - system

  • misc
    • posix is default shell in hpux
  • files
    • .sh_history .profile controled by HISTFILE variable
  • commands
    • extrinsic or intrinsic to the shell
    • history use Esc+K to navigate, shows last 15 commands by default
    • lock alias whoami who w logname uname getconf id banner cal

files & directories

  • misc
    • file names can be 256 characters long
  • commands
    • cat more pg pr ls lsf file grep
  • syntax
    • mv file1 file2 dir/
    • find use for example with -name -size -atime -mtime -perm -type -exec
  • files
    • /etc/magic


  • I/O redirection
  • to redirect Standard Error to a file use ...
2>

.. instead of usuall

>

environment variables

  • environment (global) and shell (local)
    • difference - environment variables are inherited from parent proccess (shell) ..
  • syntax
    • $ VARX=SomeValue
    • $ echo $VARX
    • $ VARX="$VARX addblah"
    • $ VARX=`command` (Bourne, POSIX)
    • $ VARX=$(command)
  • commands
    • set unset
  • misc
    • single quotations takes 'as is' value, not variable value

VI commands

I - insert at ther begginig of the line 3,404w file.txt write lines 3 to 404 to file.txt :m n move current line to after line n :t n copy current line to after line n

kernel reconfiguration

  • cd /stand/build
  • /usr/lbin/sysadm/system_prep -s system - creates /stand/build/system as configuration file with parameters taken from running system
    • kmtune -S /stand/build/system - queries system parameters
    • kmtune -S /stand/build/system -s maxusers=30 - sample setting value of a parameter
    • kmsystem -S /stand/build/system -q ps2 - queries system for the status of ps2 value
    • kmsystem -S /stand/build/system -c Y ps2 - changes value of ps2 to Yes
    • kmadmin
  • mk_kernel -s ./system - builds new kernel using system as configuration file

devices

  • types of files - regular files, directories, devices, links, sockets, named pipes
  • major and minor device number
    • major device number stands for driver used for device
    • minor device number is defined by physical location and device specifics..
  • character and block device
    • named character or raw device file
      • for serial data transfer
      • on ls -al first letter is c
    • block devices
      • moves blocks to buffer and writes after sync executed by syncer daemon
      • on ls -al first letter is b
  • device hardware address

c t d

  • mknod syntax

disks / file systems

  • pvdisplay
    • use block device file as argument
  • vgdisplay
    • uses volume group device as argument f.e. /dev/vg00
  • lvdisplay
    • uses logical volume block device as argument
  • mediainit
    • formats disk and confirms integrity. uses raw / character device file!
  • pvcreate
    • creates physical volume using raw device file
  • vgcreate - creating volume group
    • mknod /dev/vg02/group c 64 0x020000
    • vgcreate /dev/vg02 /dev/dsk/c2t5d0
  • vgextend
  • lvcreate
    • f.e. lvcreate -L 500 -n masopust vg02 creates logical volume of size 500mb named mosopust in volume group vg02
  • vgdisplay
  • lvextend
  • lvreduce
  • lvdisplay
  • extendfs - with Advanced JFS fsadm can be used without unmounting
  • vgscan - manages volumes in /etc/lvmtab
  • lvreduce pvchange pvremove vgremove vgreduce vgexport vgimport lvlnboot lvsplit lvmerge vgcfgbackup vgcfgrestore vxtunefs vxupgrade


  • metadata - superblock, inodes, directory area
  • fstyp
  • newfs
  • mount
  • fuser - manages processes / use of filesystem. Useful if you want to unmount filesystem.
  • bdf

backup

  • commands tar sfbackup/frecover dd

users management

  • id groups newgrp rsh pwck grpck vipws

processes

  • nice renice timex trap

printing

  • lp lpstat cancel lpalt rlpdaemon rmodel lpsched lpshut lpadmin accept LPDEST lpmove enable disable reject accept lpfence lpana

memory and swap

  • daemons swapper vhand
  • commands swapon swapinfo

automation

  • commands cron crontab at batch

performance and optimization

  • commands iostat vmstat netstat lanadmin top sar prmavail, Glance Plus UX, Perfview

LAN interface

  • terminology
    • DLPI - Data Link Provider Service
  • commands lsdev ioscan lanscan ifconfig netstat ndd linkloop
  • files /etc/rc.config.d/hpetherconf hpbtlanconf nddconf

Samba

  • commands smbclient smbstatus cifsmount ciflist

to do yet

  • cut
  • tee - sends output of pipe to additional place (file as well as stout f.e.)
  • 'hardware path'