# show_dll - Script to show information for shared objects
#
# CLI file for SHOW DLL
#
# Feb 2012, Aditya Dogra
#
# Copyright (c) 2010-2012 by Cisco Systems, Inc.
# All rights reserved.
#
#!/bin/bash

# Check for existing pid 
date=$(date +"%Y-%m-%d %H:%M:%S")
if ps -p $1 > /dev/null
then
echo "$date"
echo -e "Text address\t    Size\tLibrary name"
echo "--------------------------------------------"
pmap -d $1 | grep "r-x--" |grep 0000000000000000 |grep ".so" | awk '{ $4=""; $5="";  print }'

else
echo "No such process"

fi
