DB2 Administrators Unix Commands Surviva PDF
DB2 Administrators Unix Commands Surviva PDF
© www.ruban.de, Boeblingen, Germany DB2 administrator’s Unix commands survival sheets for AIX and Solaris page 2
DB2 Administrator’s Unix Commands Surival Sheets 3/2014
find . -type f –name Suche alle Files (Type f) mit Namen test* in diesem und kill -9 pid Kill pid immediatelly and all children
“test*” -print -exec allen Unterverzeichnissen, gebe den Namen aus (Signal Kill SIGKILL=9, see kill -l)
grep -i "ruban" {} \; durchsuche sie per grep Command nach String “ruban” kill pid Kill Process mit ID pid
finger -s Short Infos on active Users last Display Last Logins
finger user Find Infos about User leave hhmm Wecker
ftp File Transfer Programm: listusers List User Login Information
open host llstatus AIX SP: information on Load Leveler machine status
user user psw ln -opt sf tf Make Links from Source to Target File
get|put file [file]
-s Symbolic Link -f replace existing link
close and quit
lqueryvg -At -p hdisk0 AIX all attributes for the VG (Disks, see lspv)
fusage Solaris Disk Access Statistics
fuser [opt] ls options file List Directory Structure
Lists the process numbers of local processes that use the
device local or remote files specified by the File parameter: -al lange Liste mit Attributen -R recurse subdirs
path - open files in the file system –t sortiert nach Timestamp -u ‘used’ timestamp
-c - open files which have been unlinked lsattr -E -l device AIX Show Device Attributes, e.g. Disk Device
-d - SIGKILL signal to process (root only) lsattr -El sys0 -a realmem AIX Display Real Memory
-k - login name for local processes using lscfg | grep proc AIX Display Number of Processors
-u - executable/loadable objects (with -c or -f) lscfg -vp | pg AIX Hardware Information
-x lsconf AIX List Configuration (see also prtconf)
getconf –a AIX: Configuration Information lsdev –C –H AIX Device Information of customized devices
grep opt pat f Search File f for Pattern pat with Option opt lsfs [-q] AIX List file systems (and spec. attributes, also see
-i -n ignore case print line numbers /etc/security/limits [bf:true=large file]
-l print only names of files with matching lines lsmle –c AIX List of system-defined locale definitions /usr/lib/nls/
grep -v '^$' fin > fout Remove blank lines from file fin, creates file fout. lslpp -l AIX List installed Software Packages
grep '.' fin > fout lslpp -qLc AIX query and report installed Software e.g. for compare
sed '/^$/d' fin > fout lsps option AIX Display Paging Space:
sed -n '/^$/!p' fin>fout -a display size –s summay/usage
awk NF fin > fout lspv [-p|l|L disk] AIX List Physical Volumes and Volume Groups
awk '/./' fin > fout lsvg {–l|-L} vg-name AIX LV’s in VG | VG attributes
groups Show Group Membership of User lsvg -L -n device AIX Display VG on a physical device e.g. hdisk
© www.ruban.de, Boeblingen, Germany DB2 administrator’s Unix commands survival sheets for AIX and Solaris page 3
DB2 Administrator’s Unix Commands Surival Sheets 3/2014
passwd [-d] [login name] Passwowrt ändern/löschen -d Disk I/O -P ALL per Processor Statistics
perl -MDBI -e 'DBI-> Listet Versionen der Perl Database Interfaces (auch DB2 schedo –L AIX the current, default, and reboot settings
installed_versions' unter DBD::DB2) scp –B usr@server:file –v Secure copy from server in batch and verbose mode
perl –V Perl Version, stored at ls –al `which perl` scp file usr@serv:/path Secure copy to remote server
perspectives AIX: Invokes SP Perspectives GUI scp usr@server:/path/file Secure copy from remote server to local server
pkginfo -l List installed Solaris Software Packages /local-path/file
pprof <time> AIX Measure CPU usage of Kernel Threads sendmail ricipient-list SMTP Send Mail
prstat [-a] set -o vi Editing Commands as used in vi
Solaris report active process statistics ( top/topas)
set -vx Shell Script Debugging
prtconf System Configuration Info (see also lsconf)
setenv DISPLAY ip-addr:0.0 Route X-Windows output to specific console
prtdiag System Diagnostics
showipc instance-no SAP: wie ipcs, Anzeige von Memory Segments
ps Report Process Status
showrev [-p] Solaris Systemeigenschaften/ Patch Level
-ef Full List all Processes
shutdown -Fr AIX Fast Reboot
-l Long Listing
shutdown -i6 Solaris: Shutdown and reboot (see Run Levels)
-o format
smitty Interaktive AIX Command Konsole
ps von /usr/ucb Extended UCB Process Status smitty nfs -> NFS -> Add a directory to Export List ->
-a all -S accum CPU Time
/export/samplepath (Export now/at system restart)
-x w/o Terminal -l Long Listing snap AIX: collecting system informationen (root required)
ps au Display Commands and Arguments spmon AIX SP Monitor: -d Display
ps -efo THREAD AIX Full List of all Threads in process -power off|on node1 Strom aus|an
ps eww [pid] Display Environment Variables of process id ssh-copy-id -i Copies SSH ID file to remote server and appends it to
psrinfo Solaris Processor Information ~/.ssh/id_{rsa|dsa}.pub ~/.ssh/authorized_keys. Then sftp/ssh/scp needs no psw
pstat -f AIX Display interpretation of various system tables, e.g. user@remote-system
(various flags) -a|-p process table, -f file table, -S processors, -s ssh-keygen [-t rsa|dsa] Creates SSH key pair ID file at local server ~/.ssh
swap and paging space usage starsap [r3|db|all] SAP R3 Start Script Instance and/or Database
ptree –a pid|uid Solaris show process tree startx AIX Start X-Windows Session (see DISPLAY)
pwconv erzeugt /etc/shadow aus /etc/passwd stopsap [r3|db|all] SAP R3 Stop Script Instance and/or Database
pwd Print Current Working Directory su [-] user Switch to another User [- changes env]
-c cmd Execute cmd, then return
© www.ruban.de, Boeblingen, Germany DB2 administrator’s Unix commands survival sheets for AIX and Solaris page 4
DB2 Administrator’s Unix Commands Surival Sheets 3/2014
© www.ruban.de, Boeblingen, Germany DB2 administrator’s Unix commands survival sheets for AIX and Solaris page 5
DB2 Administrator’s Unix Commands Surival Sheets 3/2014
db2top - interactive monitor (9.7): (Windows not supported!) db2top -d dbname -f collect.file.bin -b b > bpout
db2top [-d dbname] [-n nodename] [-u username] [-p password] db2top -d dbname -f collect.file.bin -b T > tbout
[-V schema] [-i interval] [-P <part>] db2top -d dbname -f collect.file.bin -b D > sqlout
[-a] [-B] [-R] [-k] [-x] [-f file <+time> </HH:MM:SS>] db2top -d dbname -f collect.file.bin -b s > stmtout
[-b options [-s <sample>] [-D separator] <-X>] db2top -d dbname -f collect.file.bin -b U > lockout
-o outfile]] [-C [option]] [-m duration] db2top -d dbname -f collect.file.bin -b u > utilout
db2top –h (this help) db2top -d dbname -f collect.file.bin -b F > fedout
-d : Database name (default DB2DBDFT) db2top -d dbname -f collect.file.bin -b m > memout
-n : Node name
-u : User name
-p : User password topas_nmon | nmon Monitor:
-V : Default explain schema h = Help information q = Quit nmon 0 = reset peak counts
-i : Interval in seconds between snapshots + = double refresh time - = half refresh r = ResourcesCPU/HW/MHz/AIX
-b : background mode c = CPU by processor C=upto 128 CPUs p = LPAR Stats (if LPAR)
option: d=database, l=sessions, t=tablespaces, l = CPU avg longer term k = Kernel Internal # = PhysicalCPU if SPLPAR
b=bufferpools, T=tables, D=Dynamic SQL, s=Statements, m = Memory & Paging M = Multiple Page Sizes P = Paging Space
U=Locks, u=Utilities, F=Federation, m=Memory d = DiskI/O Graphs D = diskIO+service times o = Disks %Busy Map
-X=XML Output -L=Write queries to ALL.sql,
© www.ruban.de
© www.ruban.de, Boeblingen, Germany DB2 administrator’s Unix commands survival sheets for AIX and Solaris page 6
DB2 Administrator’s Unix Commands Surival Sheets 3/2014
Supported Languages and Locales: (Excerpt of important languages) Kernel Processes AIX 4.3/5.xL/6.xL (kprocs):
Codepage aios Relates to Asynchronous I/O kernel process
OS Language Country or category Locale cdpg A kernel daemon that deals with CDRFS filesystems and is started only when a
Codeset
IBM-1252 Windows German Germany de_DE.IBM-1252 CD based filesystem is mounted.
dlci A kernel process dealing with Data Link Control protocol. You will see this kproc
ISO8859-1 Unix German Germany de_DE
mostly on systems using old protocols such as SNA. Some old printers also use
ISO8859-15 Unix German Germany de_DE.8859-15 this protocol.
UTF-8 Unicode German Germany DE_DE dog A kproc spawned by the netinet driver and deals with IP packet switching. The
273|1141 z/OS German Germany IBM-273|IBM-1141 concept of dog process also came from Open Software Foundation (OSF).
IBM-1252 Windows English United States en_US.IBM-1252 gil GIL term is an acronym for "Generalized Interrupt Level" and was created by the
ISO8859-1 Unix English United States en_US Open Software Foundation (OSF), This is the networking daemon responsible for
processing all the network interrupts, including incoming packets, tcp timers, etc.
ISO8859-15 Unix English United States en_US.8859-15 lvmbb A kernel process associated with LVM device driver.
UTF-8 Unicode English United States EN_US jfsc This is a JFS daemon that does compression/decompression for compressed file
37|1140 z/OS English United States IBM-37|IBM-1140 systems. It is started when you mount a locally locally mounted compressed file
IBM-1252 Windows Italian Italy it_IT.IBM-1252 system. It should go away when there are no mounted compressed file systems.
ISO8859-1 Unix Italian Italy it_IT You can use the dumpfs command to check if you have any compressed file
© www.ruban.de
© www.ruban.de, Boeblingen, Germany DB2 administrator’s Unix commands survival sheets for AIX and Solaris page 7