Wednesday 26 February 2014

Performance - Script to find the top memory consuption

#!/usr/bin/ksh
# Syntax: top_memory.sh number
#
# Description: Shows the top <number> processes using real memory
#
#
############################################## 
#################
#
# bos:
# Uncomment the four next lines to create a simple syntax check
# Create text for variable "USAGE"
USAGE="Usage: top_memory.sh number"
# Check for correct syntax and exit if not
[[ "$#" -ne 1 ]] && { echo $USAGE ; exit 3 ; }
# bos
echo "\n\n Pid Command Inuse Pin Pgsp Virtual
64-bit Mthrd LPage\n"
/usr/bin/svmon -uP -t $1 | grep -p Pid | grep '^.*[0-9] '


# eos


No comments:

Post a Comment