Monday, 24 March 2014

Send a mail with body and subject



mailx -s "TEST FILE"  abcd@gmail.com << EOF
This is mail body

Thanks
EOF

(OR)
 
echo ‘This is the body of the mail’ | mailx –s “SUBJECT of the mail” abcd@gmail.com

Sunday, 23 March 2014

Database not coming up due to creating a segment of size failed




WARNING: The system does not seem to be configured optimally. Creating a segment of size 0x00000000f8000000 failed. Please change the shm parameters so that a segment can be created for this size. While this is not a fatal issue, creating one segment may improve performance.

Solution:




root@test01#  projadd -p 100 -U oracle -K "process.max-sem-nsems=(priv,2048,deny)" \
-K "project.max-sem-ids=(priv,1024,deny)" \
-K "project.max-shm-ids=(priv,256,deny)" \
-K "project.max-shm-memory=(priv,12884901888,deny)" ORAPROJ

root@test01#  usermod -K project=ORAPROJ oracle

root@test01#  cat /etc/user_attr
oracle::::type=normal;project=ORAPROJ

root@test01# cat /etc/project
system:0::::
user.root:1::::
noproject:2::::
default:3::::
group.staff:10::::
ORAPROJ:100::oracle::process.max-sem-nsems=(priv,2048,deny);project.max-sem-ids=(priv,1024,deny);project.max-shm-ids=(priv,256,deny);project.max-shm-memory=(priv,12884901888,deny)



process.max-sem-nsems --> Maximum number of semaphores allowed per semaphore set.
project.max-sem-ids --> Maximum number of semaphore IDs allowed for this project.
project.max-shm-ids --> Maximum number of shared memory IDs allowed for this project.
project.max-shm-memory --> Total amount of System V shared memory allowed for this project Size (bytes)


To verify the project setting

 root@test01#su - oracle

[oracle@test01:HIST]$ prctl $$
process: 927: -sh
NAME    PRIVILEGE       VALUE    FLAG   ACTION                       RECIPIENT
process.max-sem-nsems
        privileged      2.05K       -   deny                                 -
        system          32.8K     max   deny                                 -
project.max-shm-memory
        privileged      12.0GB      -   deny                                 -
        system          16.0EB    max   deny                                 -
project.max-shm-ids
        privileged        256       -   deny                                 -
        system          16.8M     max   deny                                 -
project.max-sem-ids
        privileged      1.02K       -   deny                                 -
        system          16.8M     max   deny                                 -



Monday, 17 March 2014

Add and Remove Swap in SOLARIS 11



Create 15GB swap ZFS Volume
bash #  zfs create -V 15G rpool/swap1



Add it to swap
bash #  swap -a /dev/zvol/dsk/rpool/swap1

Make it has permanent  by adding below line in /etc/vfstab
bash # vi /etc/vfstab

/dev/zvol/dsk/rpool/swap1       -               -               swap    -       no      -

To delete swap
bash #  swap -d /dev/zvol/dsk/rpool/swap1

Destroy the swap zfs volume
bash #  zfs destroy -V 15G rpool/swap1

Remove below line from /etc/vfstab
bash # vi /etc/vfstab


/dev/zvol/dsk/rpool/swap1       -               -               swap    -       no      -