Difference between revisions of "HP-UX"

From Mesopoly 3.0
Jump to navigation Jump to search
m
m
Line 1: Line 1:
 
[[Category:Technical]]
 
[[Category:Technical]]
 +
 
==links==
 
==links==
 
*[http://docs.hp.com/en/B2355-90689/index.html HPUX reference]
 
*[http://docs.hp.com/en/B2355-90689/index.html HPUX reference]
Line 7: Line 8:
 
====shell====
 
====shell====
 
*to redirect Standard Error to a file use ...
 
*to redirect Standard Error to a file use ...
  '2>'
+
  2>
 
.. instead of usuall  
 
.. instead of usuall  
  '>'
+
  >  
 
====VI commands====
 
====VI commands====
'I' - insert at ther begginig of the line
+
<tt>I</tt> - insert at ther begginig of the line
'3,404w file.txt' write lines 3 to 404 to file.txt
+
<tt>3,404w file.txt</tt> write lines 3 to 404 to file.txt
':m n' move current line to after line n
+
<tt>:m n</tt> move current line to after line n
':t n' copy current line to after line n
+
<tt>:t n</tt> copy current line to after line n
 
====kernel reconfiguration====
 
====kernel reconfiguration====
*'cd /stand/build'
+
*<tt>cd /stand/build</tt>
*/usr/lbin/sysadm/system_prep -s system - creates '/stand/build/system' as configuration file with parameters taken from running system
+
*/usr/lbin/sysadm/system_prep -s system - creates <tt>/stand/build/system</tt> as configuration file with parameters taken from running system
 
** kmtune -S /stand/build/system - queries system parameters
 
** kmtune -S /stand/build/system - queries system parameters
 
** kmtune -S /stand/build/system -s maxusers=30 - sample setting value of a parameter  
 
** 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 -q ps2 - queries <tt>system</tt> for the status of <tt>ps2</tt> value
 
** kmsystem -S /stand/build/system -c Y ps2 - changes value of ps2 to Yes  
 
** kmsystem -S /stand/build/system -c Y ps2 - changes value of ps2 to Yes  
 
** kmadmin
 
** kmadmin
*mk_kernel -s ./system - builds new kernel using 'system' as configuration file  
+
*mk_kernel -s ./system - builds new kernel using <tt>system</tt> as configuration file  
 
====devices====
 
====devices====
 
*major and minor device number
 
*major and minor device number
Line 31: Line 32:
 
**character or raw device
 
**character or raw device
 
***for serial data transfer
 
***for serial data transfer
***on 'ls -al' first letter is 'c'
+
***on <tt>ls -al</tt> first letter is <tt>c</tt>
 
**block devices
 
**block devices
***moves blocks to buffer and writes after 'sync' executed by 'syncer' daemon
+
***moves blocks to buffer and writes after <tt>sync</tt> executed by <tt>syncer</tt> daemon
***on 'ls -al' first letter is 'b'
+
***on <tt>ls -al</tt> first letter is <tt>b</tt>
  
 
*device hardware address
 
*device hardware address
Line 42: Line 43:
  
 
====disks / file systems====  
 
====disks / file systems====  
* 'pvdisplay'
+
* <tt>pvdisplay</tt>
 
** use block device file as argument
 
** use block device file as argument
*'vgdisplay'
+
*<tt>vgdisplay</tt>
**uses volume group device as argument f.e. '/dev/vg00'
+
**uses volume group device as argument f.e. <tt>/dev/vg00</tt>
* 'lvdisplay'
+
* <tt>lvdisplay</tt>
 
**uses logical volume block device as argument
 
**uses logical volume block device as argument
*'mediainit'
+
*<tt>mediainit</tt>
 
** formats disk and confirms integrity. uses raw / character device file!
 
** formats disk and confirms integrity. uses raw / character device file!
*'pvcreate'
+
*<tt>pvcreate</tt>
 
**creates physical volume using raw device file
 
**creates physical volume using raw device file
*'vgcreate' - creating volume group
+
*<tt>vgcreate</tt> - creating volume group
**'mknod /dev/vg02/group c 64 0x020000'
+
**<tt>mknod /dev/vg02/group c 64 0x020000</tt>
**'vgcreate /dev/vg02 /dev/dsk/c2t5d0'
+
**<tt>vgcreate /dev/vg02 /dev/dsk/c2t5d0</tt>
*'vgextend'
+
*<tt>vgextend</tt>
*'lvcreate'
+
*<tt>lvcreate</tt>
** f.e. 'lvcreate -L 500 -n masopust vg02' creates logical volume of size 500mb named 'mosopust' in volume group vg02
+
** f.e. <tt>lvcreate -L 500 -n masopust vg02</tt> creates logical volume of size 500mb named <tt>mosopust</tt> in volume group vg02
*'vgdisplay'
+
*<tt>vgdisplay</tt>
*'lvextend'
+
*<tt>lvextend</tt>
*'lvreduce'
+
*<tt>lvreduce</tt>
*'lvdisplay'
+
*<tt>lvdisplay</tt>
*'extendfs' - with Advanced JFS 'fsadm' can be used without unmounting
+
*<tt>extendfs</tt> - with Advanced JFS <tt>fsadm</tt> can be used without unmounting
*'vgscan' - manages volumes in '/etc/lvmtab'
+
*<tt>vgscan</tt> - manages volumes in <tt>/etc/lvmtab</tt>
*'lvreduce' 'pvchange' 'pvremove' 'vgremove' 'vgreduce' 'vgexport' 'vgimport' 'lvlnboot' 'lvsplit' 'lvmerge' 'vgcfgbackup' 'vgcfgrestore' 'vxtunefs' 'vxupgrade'
+
*<tt>lvreduce</tt> <tt>pvchange</tt> <tt>pvremove</tt> <tt>vgremove</tt> <tt>vgreduce</tt> <tt>vgexport</tt> <tt>vgimport</tt> <tt>lvlnboot</tt> <tt>lvsplit</tt> <tt>lvmerge</tt> <tt>vgcfgbackup</tt> <tt>vgcfgrestore</tt> <tt>vxtunefs</tt> <tt>vxupgrade</tt>
  
  
 
*metadata - superblock, inodes, directory area
 
*metadata - superblock, inodes, directory area
*'fstyp'
+
*<tt>fstyp</tt>
*'newfs'
+
*<tt>newfs</tt>
*'mount'
+
*<tt>mount</tt>
*'fuser' - manages processes / use of filesystem. Useful if you want to unmount filesystem.
+
*<tt>fuser</tt> - manages processes / use of filesystem. Useful if you want to unmount filesystem.
*'bdf'
+
*<tt>bdf</tt>
  
 
====users management====
 
====users management====
*'id' 'groups' 'newgrp' 'rsh' 'pwck' 'grpck' 'vipw's
+
*<tt>id</tt> <tt>groups</tt> <tt>newgrp</tt> <tt>rsh</tt> <tt>pwck</tt> <tt>grpck</tt> <tt>vipw</tt>s
  
 
====processes====
 
====processes====
* 'nice' 'renice' 'timex' 'trap'
+
* <tt>nice</tt> <tt>renice</tt> <tt>timex</tt> <tt>trap</tt>
 
====printing====
 
====printing====
*'lp' 'lpstat' 'cancel' 'lpalt' 'rlpdaemon' 'rmodel' 'lpsched' 'lpshut' 'lpadmin' 'accept' 'LPDEST' 'lpmove' 'enable' 'disable' 'reject' 'accept' 'lpfence' 'lpana'
+
*<tt>lp</tt> <tt>lpstat</tt> <tt>cancel</tt> <tt>lpalt</tt> <tt>rlpdaemon</tt> <tt>rmodel</tt> <tt>lpsched</tt> <tt>lpshut</tt> <tt>lpadmin</tt> <tt>accept</tt> <tt>LPDEST</tt> <tt>lpmove</tt> <tt>enable</tt> <tt>disable</tt> <tt>reject</tt> <tt>accept</tt> <tt>lpfence</tt> <tt>lpana</tt>
 
====memory and swap====
 
====memory and swap====
 
+
*daemons <tt>swapper</tt> <tt>vhand</tt>
 
==to test yet==
 
==to test yet==
*cut
+
*<tt>cut</tt>
*tee - sends output of pipe to additional place (file as well as stout f.e.)
+
*<tt>tee</tt> - sends output of pipe to additional place (file as well as stout f.e.)

Revision as of 09:21, 1 September 2006


links

tips and notes

shell

  • to redirect Standard Error to a file use ...
2>

.. instead of usuall

> 

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

  • 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
    • character or raw device
      • 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

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

to test yet

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