31 Mayıs 2012 Perşembe

Unix komutları -1


Common Unix Commands


SysinfoDisplay system information i.e cpu, memory, etc
Memory and SwapInformation regarding the physical memory and swap area
Disks, Filesystems and DevicesDisplaying disk information, filesystems
NetworkingDisplay and configuring network parameters
Crash DumpConfigure, display and use the crash dump utiltities
Performance Monitoring and DiagnosticsList, Monitor and trace processes
Kernel Modules and ParametersDisplaying, modifying and tuning kernel parameters
ServicesDisplay, start and stop services
Patching / PackagesInstalling and removing patches and software packages
AccountsSetting up and removing user accounts
NFSInformation on NFS i.e starting, stopping, etc
NTPNetwork Time Protocol
Log FilesLocation to common log files
SecuritySecurity information
MiscOther stuff i.e shutdown, timezone, run level, etc


sysinfo komutları

 Açıklama
Solaris
Red Hat
Ubuntu/Debian
HP
AIX
Server Release info
cat /etc/release
cat /etc/enterprise-release
cat /etc/redhat-release

lsb_release -a
cat /proc/version
cat /etc/lsb-release

lsb_release -a
/stand/kernrel

oslevel -r
Server type
/usr/platform/`uname -i`/sbin/prtdiag -v
dmidecode
dmidecode
model
uname -a
prtconf | grep -i 'System Model'
Hardware Info
prtdiag -v
prtpicl -v [-c <class>]
 
prtconf -D
lspci
lsusb
lshal
Note: hal = hardware abstraction layer
lspci
lsusb
lshal
ioscan
ioscan -fun [disk|tape|lan]
/opt/ignite/bin/print_manifest
cat /var/opt/ignite/local/manifest/manifest.info
lscfg -v 
lscfg -l ent0
lscfg -vl fcs0 (find the WWN of HBA adapter)
lsdev
lsdev -Cc disk
lsdev -Cc disk -p scsi0
lsslot -c [pci|phb|port]
lsslot -c pci -l ent0

lspath -l hdisk0
diag
Operating System
uname -a
uname -a
uname -a
uname -a
oslevel [-r|-s]
Memory
/usr/platform/`uname -i`/sbin/prtdiag -v
prtconf | grep -i mem
cat /proc/meminfo (detailed)
free -om
cat /proc/slabinfo
cat /proc/meminfo (detailed)
free -om
cat /proc/slabinfo
dmesg | grep -i physical
/usr/sam/lbin/getmem
/opt/ignite/bin/print_manifest
cat /var/opt/ignite/local/manifest/manifest.info
prtconf -m 
prtconf |grep -i memory
lsattr -El sys0 -a realmem
bootinfo -r
 
CPU (type, number, etc)
/usr/platform/`uname -i`/sbin/prtdiag -v
## display,offline,online
psrinfo
psradm -f 0 (offline)
 
psradm -n 0 (online)
 
cat /proc/cpuinfo (detailed)
cat /proc/cpuinfo (detailed)
/opt/ignite/bin/print_manifest
sam -> performance monitors -> system properties
cat /var/opt/ignite/local/manifest/manifest.info
prtconf |grep -i processor
Disk Drives
format
prtvtoc <device>
format -e (to convert EFI (zfs) to SMI)
Note:
EFI - Extensible Firmware Interface
SMI - Sun Microsystems Inc
fdisk -l
sfdisk -l (advanced server)
parted <device> print
partprobe -s <device>
fdisk -l
sfdisk -l (advanced server)
parted <device> print
partprobe <device>
ioscan -funC disk
lsdev -Cc disk
lsdev -Cc disk -p scsi0 (specific controller)
lsdev -Cc disk -S [a|d|s] (available, defined, stopped)

lscfg -v -l hdisk0
Kernel File and associated directories
/kernel/genunix

/platform/sparc/kernel
/platform/i86pc/kernel
/kernel
/usr/kernel
/boot/initrd.?????.img
/boot/vmlinuz
/boot/initrd.img-?????-server
/boot/vmlinuz-????-server
/stand/vmunix
/unix

/usr/lib/boot
/usr/lib/drivers
 

Note: /unix - symbolic link to kernel file i.e /usr/lib/boot/unix_64
Kernel 32 or 64
isainfo -kv (solaris 9+)
isalist (sparc v9 will be listed first)
isainfo -b
uname -a
uname -m
getconf -a |grep -i 'long_bit'
uname -a
uname -m
getconf -a |grep -i 'long_bit'
getconf KERNEL_BITS ( version 11)
/opt/ignite/bin/print_manifest |grep -i 'os mode'
 

HPUX < version 11 all 32 bit

Note: determine if system supports 64 bit
getconf HW_CPU_SUPP_BITS
/opt/ignite/bin/print_manifest |grep -i 'hw capability'

prtconf -k
bootinfo -K
Display Firmware
At the OK prompt type banner
boot into the BIOS (normally F2 or F12)
boot into the BIOS (normally F2 or F12)
workstations:
reboot
enter PDC
type: IN (information menu)
 
type: FV (Firmware Version)
prtconf |grep -i firmware 
lscfg -pv
invscout
 
Display IRQ, IO ports and DMA
n/a
/proc/interrupts
/proc/ioports
/proc/dma
/proc/interrupts
/proc/ioports
/proc/dma
n/a
prtconf
GUI admin tool
admintool
linuxconf
linuxconf
sam
smit
smitty

0 yorum:

Yorum Gönder