Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Useful Solaris Commands on 28-SEP-2005 Linux/Unix
  • adding new line after specific pattern using sed Linux/Unix
  • Histogram Overview Oracle
  • V$ROLLSTAT status is Full Oracle
  • For Search and replace unix command. Linux/Unix
  • Adding addidional hard drive and attach it to a linux box. Linux/Unix
  • Rman Notes -1 Oracle
  • Locally Managed Tablespace and Dictionary managed tablespace (LMT-DMT) Oracle
  • My Minimum Tuning Programs Oracle
  • remove archfiles only when it is applied to DR rm_archfiles.sh Linux/Unix
  • restarting network in linux Linux/Unix
  • Passing from Unix to PLSQL using bind variables Linux/Unix
  • How to find password change date for user Oracle
  • Add new columns in dataframe Python/PySpark
  • usnsql.sql Displays information about UNDO segments with sql statements 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

  • Find_stale_dr.sql finding stale physical DR.. Oracle
  • sqlnet.ora paramters Oracle
  • Temporary tablespace explaination Oracle
  • Oracle Identifiers Oracle
  • SQL_PLAN.sql for checking real execution plan Oracle
  • configUOCIOTTO.ora 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
  • Proc Compilation Oracle
  • compile_inv.sql Oracle
  • Very clear article about oracle dataguard Oracle
  • Important Solaris Commands Linux/Unix
  • Find All internal Parameters Oracle
  • DBMS_STATS Metalinks Notes Oracle
  • setting prompt display with .profile Linux/Unix
  • normal maintenance for exp-imp and renaming table Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme