Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

31 October 2013

Oracle Operating System Statistics


-- Operating System Statistics
1. CPU Statistics
V$OSSTAT
                - view captures machine-level information in the database, making it easier for you to determine if hardware-level resource issues exist.
V$SYSMETRIC_HISTORY
                - view shows a one-hour history of the Host CPU Utilization metric, a representation of percentage of CPU usage at each one-minute interval
V$SYS_TIME_MODEL
                - view supplies statistics on the CPU usage by the Oracle database. Using both sets of statistics enable you to determine whether the Oracle database or other system activity is the cause of the CPU problems
--
2. Memory
                This command below includes a great deal of detail, including the size of the mapped segment, how much if it is RSS (Real memory), how much of that is shared, the sizes and permissions of the segment. It is the output above that can be ‘compared’ over time to see if a given process is growing, or leaking memory.
                $ pmap -x $$
                where $$ - process ID

3. Disk I/O Statistics
                - Consumer group
                                V$IOSTAT_CONSUMER_GROUP view captures I/O statistics for all consumer groups that are part of the currently enabled resource plan
                - Database file
                                I/O statistics of database files that are or have been accessed are captured in the V$IOSTAT_FILE view
                                select * from V$IOSTAT_FILE
                - Database function
                                I/O statistics for database functions (such as the LGWR and DBWR) are captured in the V$IOSTAT_FUNCTION view.
                                select * from V$IOSTAT_FUNCTION
4. Network Statistics
                V$IOSTAT_NETWORK - network I/O statistics
                select * from V$IOSTAT_NETWORK

Operating System Data Gathering Tools
Table shows the various tools for gathering operating statistics on *NIX.
                Component        | UNIX Tool
                CPU                       | sar, vmstat, mpstat, iostat
                Memory                              | sar, vmstat
                Disk                        | sar, iostat
                Network                              |netstat

10 January 2012

How to clear mailbox queue on Linux


Clear mail queue
1. Login as root
cd /var/spool/mqueue
2. delete all files
rm *

06 December 2011

Oracle 11g Flash Cache


Owerview:
        Oracle Flash Cache looks like a Linux swap or Windows page file.
Requirements:
        Oracle 11g RDBMS must be run on Linux or Solaris
Purpose:
        Reduce db file sequential read  waiting
Configuration:
        Set parameter - db_flash_cache_file to the name of the file
        Set parameter - db_flash_cache_size to the size of Flash Cache (must be less than or equal to the physical memory size)

10 November 2011

Linux. To delete expiration interval of user password


Linux. To delete expiration interval of user password
1. login as root
        ls -lh /etc |grep shadow
       
2. change permition
        chmod 600 /etc/shadow
3. edit shadow
        vi /etc/shadow
                change the string
                        oracle:$1$/lFSo3aP$LHkIxXXxkGtveA8cAjk7//:15197:1:90:7:::
                to
                        oracle:$1$/lFSo3aP$LHkIxXXxkGtveA8cAjk7//:15197:1::7:::
4. change permission back
        chmod 400 /etc/shadow  

05 October 2011

Disable X Window in Red Hat

Edit inittab (as root)
   vi /etc/inittab
      replace line 
id:5:initdefault:
      with 
id:3:initdefault:

Run the commands
  init q
  init 3

X Window will not start next reboot.

07 July 2011

Linux ftp server

1.find
find -name vsftp*
./vsftpd-2.0.5-16.el5_5.1.x86_64.rpm

2. install
# rpm -Uvh vsftpd-2.0.5-16.el5_5.1.x86_64.rpm

3. configure
Default port: TCP / UDP - 21 and 20
The main configuration file: /etc/vsftpd/vsftpd.conf
Users that are not allowed to login via ftp: /etc/vsftpd/ftpusers
-------------------------------------
Open the configuration file, type:
# vi /etc/vsftpd/vsftpd.conf
Turn off standard ftpd xferlog log format:
xferlog_std_format=NO
Turn on verbose vsftpd log format. The default vsftpd log file is /var/log/vsftpd.log:
log_ftp_protocol=YES
Above to directives will enable logging of all FTP transactions. Lock down users to their home directories:
chroot_local_user=YES
Create warning banners for all FTP users:
banner_file=/etc/vsftpd/issue
Create /etc/vsftpd/issue file with a message compliant with the local site policy or a legal disclaimer
-------------------------------------

4. start and stop
Turn on vsftpd on boot:
# chkconfig vsftpd on

/sbin/service vsftpd start
/sbin/service vsftpd stop

Linux remote desktop

1. find
[]$ find .-name vnc*
vnc-4.1.2-14.el5_5.4.x86_64.rpm

vnc-server-4.1.2-14.el5_5.4.x86_64.rpm

2. install
[]$ rpm -Uvh vnc-server-4.1.2-14.el5_5.4.x86_64.rpm
 
3. configure
edit /home/.vnc/xstartup
----- example for gnome ------------------------------
#!/bin/sh

# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#twm &
startx
----------------------------------------------------------------
edit
/etc/sysconfig/vncservers
-------------------------------------------------------------
# The VNCSERVERS variable is a list of display:user pairs.

#
# Uncomment the lines below to start a VNC server on display :2
# as my 'myusername' (adjust this to your own). You will also
# need to set a VNC password; run 'man vncpasswd' to see how
# to do that.
#
# DO NOT RUN THIS SERVICE if your local area network is
# untrusted! For a secure way of using VNC, see
# Use "-nolisten tcp" to prevent X connections to your VNC server via TCP.
# Use "-nohttpd" to prevent web-based VNC clients connecting.
# Use "-localhost" to prevent remote VNC clients connecting except when
# doing so through a secure tunnel. See the "-via" option in the
# `man vncviewer' manual page.
VNCSERVERS="1:oracle"
# VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp -nohttpd -localhost"
VNCSERVERARGS[2]="-geometry 1024x768 -depth 32"
-------------------------------------------------------------

4. start
vncserver
-- set password when start first time
-- or set passwd running
vncpasswd

5. start and stop
/sbin/service vncserver start

/sbin/service vncserver stop

6. use via http
in browser
http://server_name:port  (http://192.168.1.1:5801)

7. use on remote pc (linux)
export DISPLAY=1:
vncviewer server_name:port (192.168.1.1:5901)

01 November 2010

How to edit /etc/fstab when at Fedora “Repair filesystem”


I created a separate partition while installing the operating system and mounted it on ‘/data’. Fedora installation does not let you go without specifying the mount point while creating partitions as OS installation time so i did using ‘/data’. I did this for both the machines for cluster and when I configured DRBD for this partition, mount point has been changed.

22 October 2010

ORA-00600: INTERNAL ERROR CODE, ARGUMENTS: [KELTNFY-LDMINIT]

OS: OEL 5.5
RDBMS: Oracle 10.2.0
Before installing Oracle server do all the jobs with server network (ip, host_naming, etc.) in order to avoid getting error above.

22 September 2010

SGA exceeds 2GB on Linux 32bit

1. edit init.ora

use_indirect_data_buffers=true 
db_block_size=8192 
db_block_buffers=1048576 # 8Gb
shared_pool_size=1415577600 #2831155200 - 2G

21 September 2010

OEL Installation options

Packages selection
Applications
- Grafical Internet
Development Tools
- Development Libraries
- Development Tools
- GNOME Software Development
- Java Development
- Legacy Software Development
- X Software Development
   Optional Packages
   - libXP-devel
   - openmotif-devel
Base System
- Legacy Software Support
   Optional packages
   - compat-db
- System Tools
   Optional packages
   - sysstat

14 September 2010

Linux kernel parameters for Oracle installation

1) Edit file /etc/sysctl.config
example RAM8Gb
kernel.shmmax = 2147483648 #max RAM
kernel.shmall = 2097152
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default=1048576
net.core.rmem_max=1048576
net.core.wmem_default=262144
net.core.wmem_max=262144

05 July 2010

Installation Oracle 10g on Slackware 13.1 Linux

The reason for this actions could be an error has been gotten while installing Oracle on Slackware.
Error description: Failure OS verification
Action: create a file - /etc/redhat-release for OS verification and add something like "Red Hat Enterprise Linux AS release 3 (Taroon)".