Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Nice notes on wait events Oracle
  • upload.html PHP/MYSQL/Wordpress
  • default permission on ~/.ssh/authorized_keys2 or authorized_keys Linux/Unix
  • Unix command for system configuration Linux/Unix
  • Another export with Query Oracle
  • sess_server.sql Oracle
  • Load testing on Oracle 19C RAC with HammerDB Oracle
  • changing kernel parameter in Oracle Enterpise Linux Linux/Unix
  • Find Plan Hash value fphv.sql Oracle
  • ORACLE_SID in sqlplus Oracle
  • Optimizer_Index init.ora parameter explaination. Oracle
  • Optimizer SORT Operations Oracle
  • Good RAC & Standby Notes Oracle
  • All About oracle password and security from metalink Oracle
  • Which environment is used by currently running process ( Very good) Linux/Unix

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

  • DBMS_JOB all example Oracle
  • Good Doc 28-JUN-2006 Oracle
  • Oracle 10g Wait Model Oracle
  • How to connect to Oracle Database with Wallet with Python. Oracle
  • sid_wise_cursor.sql find open cursor basis on username or SID Oracle
  • Wait time tuning research 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
  • Temporary Tablespsace Temp tablespace behaviour Oracle
  • note id 373303.1 Linux/Unix
  • DBMS_SQL for alter session. Oracle
  • Building Our Own Namespaces with “Create Context” Oracle
  • Oracle Recommended Patches — Oracle Database ID 756671.1 Oracle
  • on IBM-AIX for display Linux/Unix
  • Create type and Grant on it. Oracle
  • Error Handling in Proc Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme