Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • How to see which patches are applied. Oracle
  • Good links for x$ tables in oracle. Oracle
  • ORA-1841 Error Connecting to Upgraded Database After Set PASSWORD_LIFE_TIME Oracle
  • Debugging Shell FIles Linux/Unix
  • newupload.html PHP/MYSQL/Wordpress
  • S3 Basic info AWS
  • oracle fast start failover best practice Oracle
  • Sending SQLPLUS output in HTML format Oracle
  • create a folder in multiple places Linux/Unix
  • Day to day MYSQL DBA operations (Compared with Oracle DBA) MYSQL
  • My Test Case On 21-OCT-2005 Oracle
  • Good Link from metalink 1 Oracle
  • login.sql Oracle
  • Very Good Oralce Internal Tuning Book Oracle
  • purge_trc.sh 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

  • Settting up get_vmstat.sh for colletinf CPU Usage. Oracle
  • DBMS_SQL for alter session. Oracle
  • VIvek Encryption Package and Its Usage Oracle
  • Pending Distributed Transations Oracle
  • PLSQL Table Syntax 1 Oracle
  • 339939.1 Running Cluster Verification Utility to Diagnose Install Problems Oracle

Leave a Reply Cancel reply

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

Categories

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

Recent Posts

  • 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
  • Checking SQL Server Version25-Jul-2025
  • Oracle vs MYSQL Architecture differences (For DBAs)24-Jul-2025
  • V$INSTANCE of Oracle in MYSQL24-Jul-2025
  • Day to day MYSQL DBA operations (Compared with Oracle DBA)24-Jul-2025
  • MYSQL and Oracle Comparison for Oracle DBA24-Jul-2025

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • DB Console Mainenance. Oracle
  • CPU Core related projections AWS
  • Drop tempfiles from database Oracle
  • SQL_PLAN.sql for checking real execution plan Oracle
  • adding new line after specific pattern using sed Linux/Unix
  • Committing distributed transaction using commit force Oracle
  • Default User Profile Oracle
  • Running some SQL on multiple databases connecting using monitoring userid and password Linux/Unix

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme