Sayfalar

27 Ekim 2015 Salı

HPUX : Kernel Tunable parametreleri

Hp için Kernelde  parametre setleme ve görüntüleme komutları
no child process hataları alıyorsanız kernelda max process limitini artırmanız gerekebilir.
  
/usr/sbin/kctune is the administrative command for HP-UX kernel tunable parameters.  It gives information about tunable parameters and their values, and makes changes to tunable values.

To list all tunable paramters :
# kctune
Tunable                       Value  Expression   Changes
NSTREVENT                        50  Default
NSTRPUSH                         16  Default
NSTRSCHED                         0  Default
STRCTLSZ                       1024  Default
STRMSGSZ                      65535  65535
acctresume                        4  Default
acctsuspend                       2  Default
aio_listio_max                  256  Default      Immed
aio_max_ops                    2048  Default      Immed
….
#
To list details about particular paramter:
# kctune -v -q maxuprc
Tunable             maxuprc
Description         Maximum number of processes for each non-root user
Module              pm
Current Value       29995
Value at Next Boot  29995
Value at Last Boot  29995
Default Value       256
Constraints         maxuprc >= 3
                    maxuprc <= nproc - 5
Can Change          Immediately or at Next Boot
Changing the paramter values :
 
# kctune maxuprc=29990
WARNING: The automatic ‘backup’ configuration currently contains the
         configuration that was in use before the last reboot of this
         system.
     ==> Do you wish to update it to contain the current configuration
         before making the requested change? y
       * The automatic ‘backup’ configuration has been updated.
       * The requested changes have been applied to the currently
         running system.
Tunable            Value  Expression  Changes
maxuprc  (before)  29995  29995       Immed
         (now)     29990  29990
        
Verify after changing :         
# kctune -v -q maxuprc
Tunable             maxuprc
Description         Maximum number of processes for each non-root user
Module              pm
Current Value       29990
Value at Next Boot  29990
Value at Last Boot  29995
Default Value       256
Constraints         maxuprc >= 3
                    maxuprc <= nproc - 5
Can Change          Immediately or at Next Boot
The maxuprc parameter is to set the maximum number of process a non-root user can run.

23 Ekim 2015 Cuma

Unix/Linux Sistemlerde Fiziksel Memory'i ve swap alanını check etme

Following are the most requred OS commands while installing and configuring Oracle Software on Unix/Linux Operating Systems.

Operating System: AIX 5L Based Systems (64-Bit)
Physical RAM: # /usr/sbin/lsattr -E -l sys0 -a realmem
Swap Space: # /usr/sbin/lsps -a

Operating System: HP Tru64 UNIXPPhysical RAM: # /bin/vmstat -P grep "Total Physical Memory"
Swap Space: # /sbin/swapon -s

Operating System: HP-UX Itanium
Physical RAM: # /usr/contrib/bin/machinfo grep -i Memory
Swap Space: # /usr/sbin/swapinfo -a

Operating System: HP-UX PA-RISC (64-Bit)Physical RAM: # grep "Physical:" /var/adm/syslog/syslog.log
Swap Space: # /usr/sbin/swapinfo -a

Operating System: IBM zSeries Based Linux, LinuxItanium/POWER/x86/x86-64
Physical RAM: # grep MemTotal /proc/meminfo
Swap Space: # grep SwapTotal /proc/meminfo

Operating System: Solaris SPARC 64-Bit/x86/x86-64Physical RAM: # /usr/sbin/prtconf grep "Memory size"
Swap Space: # /usr/sbin/swap -s

20 Ekim 2015 Salı

HP-UX Cheat Sheet Sistem bilgilerini öğrenme komutları

Kernel
Kernel parms and Hardware. /usr/sbin/sysdef or ioscan –fn
Major numbers (devices) lsdev
Unix device messages dmesg
Configuration files /etc/rc.config.d
Unix Kernel /stand/vmunix
All crash files. /var/adm/crash

display loaded modules kmadmin
kmadmin -s
load modules kmadmin -L
unload modules kmadmin -U
set kernel parameters kctune (11i)
rebuild kernel
display kernel parameters kctune (11i)
sysdef
kmtune
kmsystem
usr/sam/lbin/getkinfo -f /stand/vmunix -o /tmp/kernel.data
re/build kernel cd /stand/build
/usr/lbin/sysadm/system_prep -s system
edit system file
/usr/sbin/mk_kernel -s ./system
mv /stand/system /stand/system.old
mv /stand/vmunix /stand/vmunix.old
mv /stand/build/system /stand
mv /stand/build/vmunix_test /stand/vmunix
shutdown -r 0

System Information
amount of memory dmesg |grep -I physical
/usr/sam/lbin/getmem
/opt/ignite/bin/print_manifest
cpu (type, number, etc)
/opt/ignite/bin/print_manifest
sam > performance monitors > system properties (detailed)
model
uname -m
disk drives
pvdisplay -v
disk info serial numbers
diskinfo -v /dev/rdsk/c0t4d0 (detailed but no serial number)
/opt/ignite/bin/print_manifest
ioscan -fn -C disk
Kernel 32 or 64
getconf KERNEL_BITS (11.0)
(HPUX < 11.00 all 32 bit)

Note: determine if system supports 32/64 bits
getconf HW_CPU_SUPP_BITS
Display firmware
< 10.20:
1. At the system prompt, enter "sysdiag"
2. At the DUI prompt, enter "sysmap"
3. At the ENTER MAP prompt, enter "cpumap"
4. Note the PDC Firmware value
5. At the ENTER MAP prompt, enter "exit"
6. At the DUI prompt, enter "exit"

10.20 >: use mstm (tools manger)

trace system calls

Daemons
NFS daemons server: rpc.mountd, nfsd
client:rpc.statd, lockd

/etc/exports
Time daemons netdaemons

/etc/rc.config.d/netdaemons
/etc/ntp.conf

Software
adding packages/patch swinstall -s /var/spool/sw
removing packages/patch swremove
Listing installed packages/patches swlist -l product PH* (HPUX 10.x)
swlist -l patch (HPUX 11)
verify package/patches swlist -l -a state
swverify
Adding packages to depot swlist -d @ /dev/rmt/0m
Removing packages to depot swremove -d * @ /var/spool/sw
listing packages from depot swlist -d @ /dev/rmt/0
swlist -d @ /var/spool/sw
copy software from one depot to another swcopy -s /dev/rmt/0 @ /var/spool/sw
register software swreg
List all files in package swlist -l
configure software swconfig

Log Files
messages n/a
syslog /var/adm/syslog/syslog.log
mail /var/adm/syslog/mail.log
cron /var/adm/cron/log
boot /var/adm/syslog/syslog.log
sam log /var/sam/log/samlog

Accounts
displaying users cat /etc/passwd
logins
adding a user useradd
sam
removing a user userdel
sam
modifying a user usermod
sam
password files /etc/passwd
/tcb/files/auth/r/root (trusted system)

Network
displaying NIC speeds ndd -get
setting NIC speeds ndd -set
lanadmin
display routing table netstat -rn
displaying network interfaces lanscan (all)
ifconfig lan0 (individual)
Lan device config (interface name, state, mjr number, Hardware path, mac address) lanscan
Lan Diag tool (like a netstat –I and –s and more) Landiag or lanadmin
setup dns /etc/resolv.conf
name service switch file /etc/nsswitch.conf

NFS Configuration
display nfs shares showmount -e localhost
cat /etc/xtab
create nfs share /etc/rc.config.d/nfsconf (edit)
/etc/exports (edit file & add share)
exportfs -a
uncreate nfs share /etc/rc.config.d/nfsconf (edit)
exportfs -au (unshare all)
exportfs -u /home/vallep
/etc/exports (edit file & remove file)
nfs start /sbin/init.d/nfs.core start
/sbin/init.d/nfs.server start
/sbin/init.d/nfs.client start
nfs stop /sbin/init.d/nfs.client stop
/sbin/init.d/nfs.server stop
/sbin/init.d/nfs.core stop
nfs status ps -ef|grep
nfs reload exportfs -a
nfs performance nfsstat

Sam
Sam Log file location /usr/local/log/samlog

Console
Root only on console /etc/securetty

Boot (ISL)
Boot a particular kernel (standalone) Hpux –is /stand/vmunix
Boot in stanalone Hpux –is boot
Boot multi-user Hpux –lm boot

Build a new kernel
cd /stand/build
/usr/lbin/sysadm/system_prem -s system
edit system file
/usr/sbin/mk_kernel -s ./system
mv /stand/system /stand/system.old
mv /stand/vmunix /stand/vmunix.old
mv /stand/build/system /stand
mv /stand/build/vmunix_test /stand/vmunix
reboot

Disk
setting the boot device setboot -p
setboot -a
format floppy drive n/a
mount/unmount floppy n/a
mount/unmount CDROM mount -rF cdfs /dev/mnt
create boot disk or
recovery tape
recovery tape (preview):
make_tape_recovery -v -I -x inc_entire=vg00
boot cdrom/diskette
(single user)
>boot pri
Interact with IPL? Y
ISL>hpux -is
boot into maintenace
mode
>boot pri
Interact with IPL? Y
ISL>hpux -lm
Display the LIF area (Logical Interchange Format) lifls -l /dev/dsk/c0t6d0
Display characteristics of a tape drive lssf /dev/rmt/c4t1d0DESTn

Logical Volume Manager

see hpux logical volume manager for lvm commands
mountable drives /etc/fstab
lvm drives /etc/lvmtab
exported drives /etc/exports
mounted exported drives /etc/xtab

create a filesystem newfs –F
create a exported filesystem exportfs-a
block devices mkfs –v –C -m
raw devices mkfs –v –r –C -m

info on disk drives diskinfo
df –k bdf
change interleave factor mediainit
A number of disk that have to be running in order for a VG to mount quorum

Swap
Display swap information swapinfo (display in Kb)
swapinfo -m (display in Mb)
swapinfo -tm (total and Mb)
Adding swap Create logical volume or filesystem swapon |
swapon -p 3 |

update /etc/fstab
Note: -p = priority swap number
Removing swap edit /etc/fstab
reboot

Misc
startup
shutdown shutdown -h -g0 -y (halt)
shutdown -r -g0 -y (reboot)
init status
0
1
2
3
4
5
6
determine the runlevel who -r
obtain default run level
start xwindows
ntp setup
force a fsck
page size (memory) 4Kb
initialize system set_parms initial
Timezone /etc/TIMEZONE
update /dev directory Class:
insf -C tape
Recreate deleted link:
insf -H 0.1.0 -e
remove device rmsf
list device drivers lsdev
console login (allow/deny) /etc/securetty