Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
36Activity
0 of .
Results for:
No results containing your search query
P. 1
Unix/Linux notes

Unix/Linux notes

Ratings:

4.92

(1)
|Views: 11,032|Likes:
Published by vrbala

More info:

Categories:Types, Research
Published by: vrbala on Jun 21, 2008
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as TXT, TXT or read online from Scribd
See more
See less

05/10/2014

 
/****************************************************************************//* Document : UNIX command examples, mainly based on Solaris, AIX, HP *//* and ofcourse, also Linux. *//* Doc. Version : 102 *//* File : unix.txt *//* Purpose : some usefull examples for the Oracle, DB2, SQLServer DBA *//* Date : 10-03-2008 *//* Compiled by : Albert van der Sel *//* Best use : Use find/search in your editor to find a string, command, *//* or any identifier *//****************************************************************************/#####################################SECTION 1. COMMANDS AND ARCHITECTURE:#####################################==========================1. HOW TO GET SYSTEM INFO:==========================1.1 Short version:==================See section 1.2 for more detailed commands and options.Memory:-------AIX: bootinfo -rlsattr -E -lmem0/usr/sbin/lsattr -E -l sys0 -a realmemor use a tool as "topas" or "nmon" (these are utilities)Linux: cat /proc/meminfo/usr/sbin/dmesg | grep "Physical"free (the free command)HP: /usr/sam/lbin/getmemgrep MemTotal /proc/meminfo/etc/dmesg | grep -i physwc -c /dev/memor us a tool as "glance", like entering "glance -m" from prompt (is autility)Solaris: /usr/sbin/prtconf | grep "Memory size"Tru64: /bin/vmstat -P | grep "Total Physical Memory"Swap:-----AIX: /usr/sbin/lsps -aHP: /usr/sbin/swapinfo -aSolaris: /usr/sbin/swap -lLinux: /sbin/swapon -s
 
cat /proc/swapscat /proc/meminfoOS version:-----------HP: uname -aLinux: cat /proc/versionSolaris: uname -aTru64: /usr/sbin/sizer -vAIX: oslevel -rlslpp -h bos.rteAIX firmware:lsmcode -c display the system firmware level and service processorlsmcode -r -d scraid0 display the adapter microcode levels for a RAID adapterscraid0lsmcode -A display the microcode level for all supported devicesprtconf shows many setting including memory, firmware, serial#etc..cpu:----HP: ioscan -kfnC processorgetconf CPU_VERSIONgetconf CPU_CHIP_TYPEmodelAIX: prtconf | grep procpmcycles -mlsattr -El procx (x is 0,2, etc..)lscfg | grep procLinux: cat /proc/cpuinfoSolaris: psrinfo -vprtconfNotes about lpars:------------------For AIX: The uname -L command identifies a partition on a system with multipleLPARS. The LPAR idcan be useful for writing shell scripts that customize system settings such asIP address or hostname.The output of the command looks like:# uname -L1 lpar01The output of uname -L varies by maintenance level. For consistent output acrossmaintenance levels,add a -s flag. For illustrate, the following command assigns the partitionnumber to the variable
 
"lpar_number" and partiton name to "lpar_name".For HP-UX:Use commands like "parstatus" or "getconf PARTITION_IDENT" to get nparinformation.patches:--------AIX: Is a certain fix (APAR) installed?instfix -ik APAR_numberinstfix -a -ivk APAR_number To determine your platform firmware level, at the command prompt, type:lscfg -vp | grep -p PlatformThe last six digits of the ROM level represent the platform firmware datein the format, YYMMDD.HP: /usr/sbin/swlist -l patchswlist | grep patchLinux: rpm -qaSolaris: showrev -ppkginfo -i package_nameTru64: /usr/sbin/dupatch -track -type kitNetcards:---------AIX: lsdev -Cc adapterlsdev -Cc adapter | grep entlsdev -Cc iflsattr -E -l ent1ifconfig -aSolaris: prtconf -D / prtconf -pv / prtconf | grep "card"prtdiag | grep "card"svcs -xifconfig -a (up plumb)1.2 More Detail:================1.2.1 Show memory in Solaris:=============================prtconf:--------Use this command to obtain detailed system information about your Sun Solarisinstallation# /usr/sbin/prtconf