Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Standby Database File Management in 10g with STANDBY_FILE_MANAGEMENT Oracle
  • DBMS_PROFILER for tuning PLSQL programs. Oracle
  • Korn Shell Arithmatic Linux/Unix
  • Pending Transaction Neighbors Script Oracle
  • How to Decide upto what level you can decrement your datafile size. ( Shrink Datafile) Oracle
  • Set Role explaination. Oracle
  • Read CSV File using Python Python/PySpark
  • Find_planinfo.sql Oracle
  • nfs mount command Linux/Unix
  • compile_inv.sql Oracle
  • Library cahe Latches and internal explaination Oracle
  • shutdown linux Linux/Unix
  • Find sort details from Db find_sort.sql Oracle
  • sbind.sql Find Bind variable from sql_id sqlid Oracle
  • v$backup.status information 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

  • ORA-01220 Oracle
  • Find execution plan from dba_hist_sql_plan for a specific SQL_ID and PLAN_HASH_VALUE fplan.sql Oracle
  • Adding or Dropping Online Redo Log Files When Physical Standby in place Oracle
  • Oracle 11g Training on 29JAN1010 Oracle
  • Good Site for Oracle Internals Oracle
  • Committing distributed transaction using commit force 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
  • ORA-8031 issue and solution if it is occuring due to truncate. Oracle
  • Reading parameter file and printing Linux/Unix
  • tuning commmand for cpu, ip and memory stats Linux/Unix
  • Exadata Basics Oracle
  • CTAS with LONG Column for 7.x and 8 and 8i Oracle
  • Oracle 11g Training on 29JAN1010 Oracle
  • Formatter Explain plan Output 1 Oracle
  • Renaming Global Name GLOBAL_NAME Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme