Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Find all users who have DML privileges Oracle
  • Passing from Unix to PLSQL using bind variables Linux/Unix
  • SQL_PLAN.sql for checking real execution plan Oracle
  • Changing Instance Name ( No DB_NAME) Oracle
  • DBMS_JOB all example Oracle
  • How to stop OCSSD Daemon Oracle
  • exp syntax in oracle 10g Oracle
  • Check Oracle installed products using one command Oracle
  • Find Time Consuming SQL Statements in Oracle 10g Oracle
  • Privileges Required to Create Procedures and Functions that uses objects from other schema. Oracle
  • Generate SSH without password authentication. Linux/Unix
  • Find average Row Length and other table size calculation. metalink notes Oracle
  • online_bkup.sql Oracle
  • SYSOPER Mystery Oracle
  • ORA-4031 issue and solution on 09-MAY-2008 Oracle

get_aix_vmstat.ksh

Posted on 18-Nov-2010 By Admin No Comments on get_aix_vmstat.ksh

#!/bin/ksh -x

# First, we must set the environment . . . .

ORACLE_SID=fdprod

export ORACLE_SID

ORACLE_HOME=/orastdbybin/fdprod/product/10.2

export ORACLE_HOME

PATH=$ORACLE_HOME/bin:$PATH

export PATH

SERVER_NAME=`hostname`

typeset -u SERVER_NAME

export SERVER_NAME

# sample every two minutes (120 seconds) . . . .

SAMPLE_TIME=30

while true

do

vmstat ${SAMPLE_TIME} 2 > /tmp/msg$$

cat /tmp/msg$$|sed 1,7d | awk ‘{ printf(“%s %s %s %s %s %s %sn”, $1, $6, $7, $14, $15, $16, $17 ) }’ | while read RUNQUE PAG

E_IN PAGE_OUT USER_CPU SYSTEM_CPU IDLE_CPU WAIT_CPU

do

$ORACLE_HOME/bin/sqlplus fdba/dba101<execute fdba.vmstat3(sysdate, $SAMPLE_TIME, ‘vafddbprod2’, $RUNQUE, $PAGE_IN, $PAGE_OUT, $USER_CPU, $SYSTEM_CPU, $IDLE_CPU,

$WAIT_CPU);

EXIT

EOF

done

done

rm /tmp/msg$$

Oracle, SQL scripts

Post navigation

Previous Post: Processes Parameter decision
Next Post: CPU speed on solaris

Related Posts

  • Display the top 5 salaries for each department using single SQL Oracle
  • ORA-3136 Oracle
  • Standby Database Behavior when a Datafile is Resized on the Primary Database Note:123883.1 Oracle
  • findx.sql /* Find Indexes on specified USER.TABLE_NAME */ Oracle
  • Important Script Method for tuning Oracle
  • ORA-00064: object is too large to allocate on this O/S during startup Oracle

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • AWS (2)
  • Azure (1)
  • Linux/Unix (149)
  • Oracle (392)
  • PHP/MYSQL/Wordpress (10)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (341)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • load SPM baseline from cursor cache05-Jun-2025
  • Drop all SPM baselines for SQL handle05-Jun-2025
  • Load SPM baseline from AWR05-Jun-2025
  • Drop specific SQL plan baseline – spm05-Jun-2025
  • findinfo.sql (SQL for getting CPU and Active session info)27-May-2025
  • SQL Tracker by SID sqltrackerbysid.sql22-Apr-2025
  • How to connect to Oracle Database with Wallet with Python.21-Mar-2025
  • JSON/XML Types in Oracle18-Mar-2025
  • CPU Core related projections12-Mar-2025
  • Exadata Basics10-Dec-2024

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Nice notes on wait events Oracle
  • currwait.sql Oracle
  • My Test Case On 21-OCT-2005 Oracle
  • dbms_job.submit example Oracle
  • Histogram Overview Oracle
  • findinfo.sql (SQL for getting CPU and Active session info) Oracle
  • block_ident.sql Oracle
  • nfs mount command Linux/Unix

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme