Linux – List file count by Day

Posted by Sagar Patil
ls -lt | grep "^-" | awk '{
if($8 ~ /:/)
   $8=2011
Date_count=$6" "$7", "$8
freq[Date_count]++}
END {for (date in freq) printf "%s\t%d\n", date, freq[date] }' | sort

Read more…

How to create SSH tunnels to get around Firewall

Posted by Sagar Patil

I normally have access to unix/linux systems through ssh (port 22) but firewall access is often disabled for ports like TNS (1521/1526), Emagent(1158), Grid  (5500). How do you connect to those ports if you don’t have direct access through firewall ? … Use SSH tunneling.

Read more…

How to Locate unix process active on a specific Port

Posted by Sagar Patil

p=$(lsof -t -i :1159); echo $p $(tr ‘\0′ ‘\n’ < /proc/$p/cmdline | tail -1)
4066 /u01/app/oracle/product/11.2.0/dbhome_1/oc4j/j2ee/OC4J_DBConsole_Server1.oracledbasupport.co.uk_TEST/config/server.xml

Read more…

set bash prompt

Posted by Sagar Patil

I need to remind myself on what machine & directory I am working on constantly. The easiest way to do so would be setting PS1 prompt under bash shell.

Read more…

Compare and Display difference between 2 Files

Posted by Sagar Patil

Comparing Files is one of very common task as a DBA, System Administrator. There are tonnes of Oracle,Websphere,linux configuration files. Often I have to compare one server to another and locate changes between environments.

Read more…

Installing Oracle 9.2.0.6 on Red Hat Linux AS release 5 Update 3

Posted by Sagar Patil

Objectives

The objectives of this document are to:

Record the setup and configuration of the 9i Oracle Standalone environment.

Read more…

Installing Oracle 10.2.0.1 on Red Hat Linux AS release 4 Update 5 (Nahant Update)

Posted by Sagar Patil

Table of Contents
1.1 Objectives
1.2 Scope
2 System Configuration
2.1 Architecture
3 System Configuration
3.1 Machine Configuration
3.2 External/Shared Storage
4 Oracle Pre-Installation tasks
4.1 Redhat Pre-Requisite
4.2 Copy Oracle 10.2.0.1 software onto server
4.3 Unpack Files
4.4 Download Patches
4.5 Check kernel and update rpm files
4.6 Creating Required Operating System Groups and Users
4.7 Oracle required directory creation
4.8 Set Kernel Parameters
4.9 Create Oracle Profile
5 Oracle Software Configuration
5.1 Directory Structure
5.2 Download ASM packages
5.3 ASM package install
5.4 Configuring and Loading ASM
5.5 Creating ASM Disks
5.6 Installation
5.6.1 Database Only Installation
5.6.2 Installing the Listener
5.6.3 DBCA : Creating an ASM /Database Instance

Read more…

Network Statistics (netstat)

Posted by Sagar Patil

netstat displays the  contents  of  various  network-related  data structures in  depending on the options selected.

Read more…

Virtual Memory Statistics ( vmstat )

Posted by Sagar Patil

vmstat -  vmstat reports virtual memory statistics of   process, virtual memory, disk, trap, and CPU activity.

Read more…

Oracle Installer Failed : TMP space problem

Posted by Sagar Patil

./runInstaller
Starting Oracle Universal Installer…

Checking installer requirements…

Checking operating system version: must be B.11.11 or B.11.23.    Actual B.11.11
Passed

Read more…

Input Output statistics ( iostat )

Posted by Sagar Patil

 iostat   reports terminal and disk  I/O  activity and  CPU utilization.  The first line of output is for the  time period  since boot  &  each subsequent line is for  the  prior  interval . Kernel maintains  a number of counters to keep track of  the  values.

Read more…

Useful Oracle DBA Linux Commands

Posted by Sagar Patil

Find files older than 5 days:    find . -mtime +5 -print | xargs ls -l | more
Remove files older than 5 days :  find . -mtime +5 -print | xargs rm

Read more…

Top of Page

Top menu