Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • column level grant syntax Oracle
  • check_copy_progress.sh Linux/Unix
  • good note for shared pool tunnig Oracle
  • Privileges Required to Create Procedures and Functions that uses objects from other schema. Oracle
  • Useful Solaris Commands on 28-SEP-2005 Linux/Unix
  • SAN Linux/Unix
  • Good Site for Oracle Internals Oracle
  • Jai Shree Ram Linux/Unix
  • dbms_job.submit example Oracle
  • sess_server.sql Oracle
  • secure crt settings Linux/Unix
  • how to find OS block size Oracle
  • on IBM-AIX for display Linux/Unix
  • Vivek’s egrep commands to trace problem. (on linux x86-64) Linux/Unix
  • Search and replace pattern 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

  • findobj.sql Oracle
  • standard Monitoring – 1 Oracle
  • 751131.1 New Article Error 2819 While Requesting a Systemstate Dump Oracle
  • Find Multiple levels of object dependencies : depen.sql Oracle
  • Disbaling DBA_SCHEDULER_JOBS Oracle
  • Find Plan Hash value fphv.sql Oracle

Leave a Reply Cancel reply

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

Categories

  • Ansible (0)
  • AWS (2)
  • Azure (1)
  • Django (0)
  • GIT (1)
  • Linux/Unix (149)
  • MYSQL (5)
  • Oracle (395)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (1)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (150)
  • SQL scripts (343)
  • SQL Server (6)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • prepfiles.sh for step by step generating pending statistics files10-Mar-2026
  • tracksqltime.sql05-Mar-2026
  • Complete Git Tutorial for Beginners25-Dec-2025
  • Postgres DB user and OS user.25-Dec-2025
  • Trace a SQL session from another session using ORADEBUG30-Sep-2025
  • SQL Server Vs Oracle Architecture difference25-Jul-2025
  • SQL Server: How to see historical transactions25-Jul-2025
  • SQL Server: How to see current transactions or requests25-Jul-2025
  • T-SQL Vs PL/SQL Syntax25-Jul-2025
  • Check SQL Server edition25-Jul-2025

Archives

  • 2026
  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Generating XML from SQLPLUS Oracle
  • oradebug ipcrm ipcs Oracle
  • Oracle GoldenGate lag monitoring shell script Linux/Unix
  • Remove DOS CR/LFs (^M) Linux/Unix
  • xargs use Linux/Unix
  • upload.html PHP/MYSQL/Wordpress
  • oracle 10g on linux Linux/Unix
  • How to find Unix server conguraiton including Server Model number and underlying disk sub-system ( On Solaris) Linux/Unix

Copyright © 2026 pvmehta.com.

Powered by PressBook News WordPress theme