Currently Being Moderated

OS Specific Commands

VERSION 3

Created on: Mar 7, 2009 9:30 AM by Community Admin - Last Modified:  Oct 8, 2010 3:14 PM by Community Admin

To Find Swap, RAM, and OS Version

OS

SWAP

RAM

OS VERSION

AIX

/usr/sbin/lsps -a

/usr/sbin/lsattr -HE -l sys0 -a realmem

oslevel

HP PA-RISC

swapinfo -a

grep "Physical:" /var/adm/syslog/syslog.log

uname -a

HP Itanium

swapinfo -a

/usr/contrib/bin/machinfo | grep -i Memory

uname -a

Tru64

swapon -s

vmstat -P

/usr/sbin/sizer -v

Solaris

swap -s

/usr/sbin/prtconf | grep -i memory

uname -r

Linux

free

free

uname -a

Mac OS X

# df -h /

# /usr/sbin/system_profiler SPHardwareDataType | grep Memory

# sw_vers

 

 

To Determine the Unix Kernel Parameters

 

OS

LOCATION

COMMAND TO SEARCH

AIX

automatically configured

do 'env' for LINK_CNTRL,
To determine if AIX is 64 bit enabled do 'genkex | grep 64' or 'genkex | grep call'

HP

/stand/system or use SAM -->Kernel Configuration

/etc/sysdef, /usr/sbin/kmtune (kmtune desupported in 11.31, use /usr/sbin/kctune -v), or /usr/sbin/kcweb -F

Tru64

/etc/sysconfigtab

/sbin/sysconfig -q ipc or /sbin/sysconfig -q vm or /sbin/sysconfig -q proc

Solaris

/etc/system

"/etc/sysdef | grep SHM" or "/etc/sysdef | grep SEM"

Linux

/usr/src/linux/include/asm/shmparam.h
/usr/src/linux/include/linux/sem.h
/proc/sys/kernel/sem
/proc/sys/kernel/shmall
/proc/sys/kernel/shmmax
/proc/sys/kernel/shmmni

ipcs -lms

Mac OS X

/etc/sysctl.conf

"# /usr/sbin/sysctl -a | grep "

 

 

O/S Software Installed Packages and Patches

 

OS

COMMAND FOR PACKAGES

COMMAND FOR PATCHES

AIX

lslpp -w | grep -i "software title" (applies to APARs and PTFs)

/usr/sbin/instfix -ik patch number

HP

Prior to 11: /usr/sbin/swlist -lproduct PH\* hp-ux 11 and after: * /usr/sbin/swlist -l patch \*\.*,c=patch * /usr/contrib/bin/show_patches (from patch PHCO_19550)

/usr/sbin/swlist -l fileset | grep -i

Solaris

/bin/pkginfo -l | grep -i "software title"

/bin/showrev -p

Tru64

/usr/sbin/setld -i | grep -i "software title"

/usr/sbin/setld -i | more
For patchkits:
/usr/sbin/dupatch -track -type kit

Linux
To see if a particular RPM is installed (without the architectur):
$ rpm -qa | grep "package name"

To see if a particular RPM is installed (with the architectur):
$ rpm -qa --qf "%{NAME}-%{VERSION}-%{RELEASE}_%{ARCH}\\n" | grep "package name"

To see what RPM provided a particular object/library:
$ rpm -q --whatprovides --qf "%{NAME}-%{VERSION}-%{RELEASE}_%{ARCH}\\n" "full path/library name"

To see the contents listing of an RPM:
$ rpm -ql "RPM name"
For example: $ rpm -ql compat-libstdc++-33-3.2.3-47.3.ppc
/usr/lib/libstdc++.so.5
/usr/lib/libstdc++.so.5.0.7

Mac OS X

to be supplied later

to be supplied later

 

 

 

To Check if an OS is 64 bit Capable or not

 

OSCOMMANDRESULTS

Aix

lslpp -L | grep 64bitIt should return "bos.64bit"
HPgetconf KERNEL_BITSIt should return "64"
Solaris/bin/isainfo -kvIf the isainfo command does not exist it is not 64-bit. It should return "64-bit sparcv9 kernel modules"

 

 

To Check version of Compiler

 

COMPILERCOMMAND

C/C++

do a "which cc", then cd to the directory it is in, then do a "what cc"
except for Linux, on Linux do a "rpm -qa | grep egcs
COBOLcd $COBDIR and do "more cobver"
Fortrando a "which f77", then cd to directory it is in, then do a "what f77"

 

 

Average User Rating
(0 ratings)




There are no comments on this document

More Like This

  • Retrieving data ...