Category: Unix-Linux Administration

Oct 11 2009

APACHE configure Information

APACHE Server Information
- dirs

– $ORACLE_HOME/Apache/.

– $APACHE_HOME: $ORACLE_HOME/Apache/Apache/.

- logs: $APACHE_HOME/logs/.

- main apache server config files

– $APACHE_HOME/conf/httpd.conf

– $APACHE_HOME/conf/oracle_apache.conf

- apachectl (version 9)

– in $APACHE_HOME/bin

– to check config: $APACHE_HOME/bin/apachectl configtest
– start: $APACHE_HOME/bin/apachectl start
– stop: $APACHE_HOME/bin/apachectl stop

- httpdsctl (version 8)

– in $APACHE_HOME/bin

– httpdsctl help

– httpdsctl configtest

– httpdsctl stop: stop apache

– httpdsctl start: start apache

– httpdsctl startssl: start apache with SSL enabled

– httpdsctl restart

Oct 05 2009

Shared Memory Requirements on Unix OS

The shared memory feature of the UNIX operating system is required by Oracle. The System Global Area (SGA) resides in shared memory; therefore, shared memory must be available to each Oracle process to address the entire SGA.
Definitions of Shared Memory and Semaphore Parameters
SHMMAX = The maximum size(in bytes) of a single shared memory segment.
SHMMIN = The minimum size(in bytes) of a single shared memory segment.
SHMMNI = The number of shared memory identifiers.
SHMSEG = The maximum number of shared memory segments that can be attached by a process.
SEMMNS = The number of semaphores in the system.
SEMMNI = The number of semaphore set identifiers in the system; determines the number of semaphore sets that can be created at any one time.
SEMMSL = The maximum number of sempahores that can be in one semaphore set. It should be same size as maximum number of Oracle processes (The PROCESSES parameter in the init.ora file).
Recommended Semaphore and Shared Memory Parameters
Operating System Shared Memory Parameters Semaphore
—————- ———————— ———
Sun OS SHMSIZE = 32768 SEMMNS = 200
SHMMNI = 50 SEMMNI = 50
Solaris SHMMAX = 8388608(or larger than max SGA) SEMMNS = 200
SHMSEG = 20 SEMMSL = 50
SHMMNI = 100 SEMMNI = 70
HP/UX SHMMAX = 0×4000000 (64 Mb) SEMMNS = 128
SHMSEG = 12 SEMMNI = 10
Digital Unix SHMMAX = 4194304 SEMMNS = 60
(DEC Alpha OSF/1) SHMSEG = 32 SEMMSL = 25

Ultrix Use system default SEMMNS = 60
SEMMSL = 5

AT&T Unix SHMMAX = RAM-Dependant SEMMNS = 200
8 or 16 Mb RAM SHMMAX = 5 Mb for all RAM
32 Mb RAM SHMMAX = 8 Mb values
64 Mb RAM SHMMAX = 16 Mb
128 Mb RAM SHMMAX = 32 Mb
256 Mb RAM SHMMAX = 64 Mb
512 Mb RAM SHMMAX = 128 Mb
1024 Mb RAM SHMMAX = 256 Mb
2048 Mb RAM SHMMAX = 512 Mb
SHMSEG = 6 for all RAM values
SHMMIN = 1 for all RAM values

Dynix/PTX SHMMAX = 11010048 SEMMNS = 200
SHMSEG = 20 SEMMSL = 85
Other parameter: NOFILES = 128

DG/UX SHMMAX = 4194304 SEMMNS = 200
SHMSEG = 15

Sep 29 2009

Who Logged in Unix/Linux Machine

who or w or finger

Finger was a way to get information about a user from another system.

Who is used when you are on a machine to see who else is on the machine.

Finger is pretty old. For instance, many times “finger” will only show users connected by telnet.

But “who” will often show connections by telnet, ssh, rlogin, and even ftp connections.

Sep 29 2009

Difference between “who” and “finger” commands in Unix

Finger was a way to get information about a user from another system.

Who is used when you are on a machine to see who else is on the machine.

Finger is pretty old. For instance, many times “finger” will only show users connected by telnet.

But “who” will often show connections by telnet, ssh, rlogin, and even ftp connections.

Sep 29 2009

Email Server Change in SendMail Configuration

Email Server Change in SendMail Configuration

[root ~]# ping UNIXMAIL02
ping: unknown host UNIXMAIL02
[root ~]# cd /etc
[root etc]# cp hosts hosts.20070928
[root etc]# vi hosts
[root etc]# diff hosts hosts.20070928
53c53
< 192.168.5.21 UNIXMAIL02 UNIXMAIL02.test.co.jp
---
>
[root etc]# ping UNIXMAIL02
PING UNIXMAIL02 (96.78.1.213) 56(84) bytes of data.
64 bytes from UNIXMAIL02 (96.78.1.213): icmp_seq=0 ttl=128 time=1.85 ms

— UNIXMAIL02 ping statistics —
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 1.859/1.859/1.859/0.000 ms, pipe 2
[root etc]# cd /etc/mail
[root mail]# cat sendmail.cf | grep DS
DS[UNIXMAIL01]
# Return-Receipt-To: header implies DSN request
# DHParameters (only required if DSA/DH is used)
[root mail]# cp sendmail.cf sendmail.cf.20090928
[root mail]# vi sendmail.cf
[root mail]# diff sendmail.cf sendmail.cf.20090928
101c101
< DS[UNIXMAIL02]
---
> DS[UNIXMAIL01]
[root mail]# /etc/init.d/sendmail restart
Shutting down sm-client: [ OK ]
Shutting down sendmail: [ OK ]
Starting sendmail: [ OK ]
Starting sm-client: [ OK ]
[root mail]#

Sep 29 2009

HP Unix Log from MP Console

Access to information from MP
1.Please access the console. Please access either of LAN console local consoles.

2.Log in to MP
The console is connected, and “Ctrl-b” is pushed.
The login name etc. are heard, and input “Admin” twice, please if you do not especially set it.
The prompt of MP > comes rather.
If it is an environment of possible capture, it is capture from here as for the screen below.
3.The status of the processor is confirmed.
It inputs it after the prompt of
MP>cm ?MP
MP:CM>ss.

4.Confirmation of log of MP
MP:CM> ma <--It returns to Main menu.
MP MAIN MENU:
CO: Consoles
VFP: Virtual Front Panel (partition status)
CM: Command Menu
CL: Console Logs
SL: Show Event Logs
HE: Help
X: Exit Connection
5 Error log check
MP>sl <-Event Log Menu
Q Quit and return to the Event Log Viewer Menu
Ctrl-B Exit command, and return to the MP Main Menu

MP Host Name:
MP:SL> (+,-,,D, F, L, J, H, K, T, A, U, ? for Help, Q or Ctrl-B to Quit): k ?
MP:SL> (+,-,,D, F, L, J, H, K, T, A, U, ? for Help, Q or Ctrl-B to Quit): d ?
Confirm? (Y/[N]): y
MP Main menu will come by pressing Ctrl-B?

6. Please type return “co” to the prompt of MP > when it returns to the output of OS. Please push “x” by the prompt of MP > when coming off the console

Sep 29 2009

HP UNIX – OS Information Collection Method

* OSVersion
# uname -a

* Model Number?
# model

* Devices Attached
# ioscan -fnk

* Message information
# dmesg

* Syslog Information
/var/adm/syslog/syslog.log

* Old Sys log
/var/adm/syslog/OLDsyslog.log

* EMS Even Log
/var/opt/resmon/log/event.log[*]

* shutdown message
/etc/shutdownlog

* Diagnostic program log
/var/stm/logs/os/log[x].raw.cur

* Core Files Index
/var/adm/crash/crash.[*]/INDEX

* installed software list
# swlist

* Confirmed Software list
# swlist -l product

* Memory Error from log
# echo ‘ru logtool\nvd’ | cstm

* OS Process start information
/etc/rc.log

* Last OS Start/Stop
/etc/rc.log.old

Sep 28 2009

RSYNC to sync the folders between two servers

Make sure RSYNC Server and Client is running on both servers
[root@UNIX01 ~]# cat rman_backup.sh
#!/bin/bash
log_file=/UNIX02/log/rman_backup.log
rsync -azv -e ssh root@UNIX02:/rman/backup/u01 /UNIX02/backup/ >> $log_file 2>&1
rsync -azv -e ssh root@UNIX02:/rman/backup/u02 /UNIX02/backup/ >> $log_file 2>&1
rsync -azv -e ssh root@UNIX02:/rman/backup/u03 /UNIX02/backup/ >> $log_file 2>&1
rsync -azv -e ssh root@UNIX02:/rman/backup/u04 /UNIX02/backup/ >> $log_file 2>&1

Sep 28 2009

Mount the USB Drive in Linux

Put the USB Drive into the Linux system and do the following from root user
# fdisk -l

Now you can see the new device which is not in /etc/fstab. May be like /dev/sda1

Then now we have to mount the device using following command
# mount /dev/hdb1 /mnt
Now the USB drive is mounted /mnt folder
# cd mnt
# ls
Note: If GUI System Adiminstration packages are installed and machine is running init 5 then it will automatically detect

Sep 28 2009

what computers can connect from that machine

Windows
C:\>arp -a
Unix Operating system
#arp -a

Alibi3col theme by Themocracy