server scripts

http://forums.linuxwebadmin.info/index.php/topic,44.0.htm
Script which will send you email alert when disk space usage is more than 70%:
———————————————————————————————-
#!/bin/bash
usage=`df -h | awk ‘{print $5}’ | sed -e N -e ’s/\n/ /’ | awk ‘{print $2}’ | tr -d % -s “\n”`
devnm=`df -h | awk ‘{print $1}’ | sed -e N -e ’s/\n/ /’ | awk ‘{print $2}’ | tr -s “\n”`
str=”=============================”
if [ $usage -ge 70 ]; then
info=”Disk usage for $devnm is more than 70% , Current Disk usage is $usage % ”
echo -e “$str\n$info\n$str” …

Read On »

Oracle 10g on Solaris 10 SPARC installation notes

groupadd -g 100 dba
groupadd -g 101 oinstall
useradd -u 101 -d /export/home/oracle -g oinstall -G dba -m -s /usr/bin/bash oracle
passwd oracle
cp /etc/system /etc/system.orig
Add the following parameters in /etc/system
set noexec_user_stack=1
set semsys:seminfo_semmni=100
set semsys:seminfo_semmns=1024
set semsys:seminfo_semmsl=256
set semsys:seminfo_semvmx=32767
set shmsys:shminfo_shmmax=4294967295
set shmsys:shminfo_shmmin=1
set shmsys:shminfo_shmmni=100
set shmsys:shminfo_shmseg=10
/usr/sbin/reboot
su – oracle
mkdir oradata
Add the following parameters in .bash_profile
umask 022
export ORACLE_SID=[sid]
export ORACLE_HOME=[path]
export PATH=$ORACLE_HOME/bin:$PATH
. ./.bash_profile
Upload Oracle 10g binary (i.e. cpio or cpio.gz files) to a directory on the target machine. An example could be /download go to the directory where the Oracle binary are located gunzip …

Read On »