1753907 Members
9017 Online
108810 Solutions
New Discussion юеВ

Capacity usage per user

 
SOLVED
Go to solution
Johan Barelds
Frequent Advisor

Capacity usage per user

Hi all,

We are investigating performance issue on our HP-UX server. i got a lot of info from sar but i would like to collect data per user base. The idea behind it is to make a top-10 of heavy users. Does someone know how this can be accomplished? (and i don't mean using top, because i want to do it with a certain interval in the background).

Thanks for your idea's!

Grz. Johan
Make my day..:-)
4 REPLIES 4
Stephen Keane
Honored Contributor

Re: Capacity usage per user

glance ?
Geoff Wild
Honored Contributor
Solution

Re: Capacity usage per user

You can use this for memory:

# cat usermem
#!/bin/ksh
# usermem - display memory claimed by a user
#
if [ $# -lt 1 -o \( $# -gt 1 -a $# -lt 4 \) ]
then
echo "Usage:"
echo "usermem \"userid\""
echo "Example:"
echo "usermem gwild"
exit 1
fi
echo " "

USER=$1
t=0
for j in `UNIX95= ps -e -o vsz=Kbytes -o ruser -o pid,args=Command-Line | sort -rnk1 | grep -v Kbytes | grep $USER | awk '{print $1}'`
do
t=`expr $t + $j`
done
echo "\nMemory claimed by $USER: $t Kbytes.\n"


Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
TwoProc
Honored Contributor

Re: Capacity usage per user

Well, there's top or glance - but you probably will want to make the most of what's being automatically collected for you (unless you turned it off) via the mwa agent (measureware). But, you may want to consider HP's product called PerfView.

However, you can consider top and sar commands. I often use top for information b/c it can be run in non-interactive mode - just as you're asking. Top can be spooled to a file, which you can cut the top off with the "head" command. Build a file or database with the ensuing information and generate output.

Also, look at the HPUX porting archive, I think there are some tools similar to what you're asking for - just do a search on google for "HPUX Porting Archive" to find the one nearest your location.

That being said - my favorite tool for doing what you're asking is HP's Perfview.

We are the people our parents warned us about --Jimmy Buffett
Johan Barelds
Frequent Advisor

Re: Capacity usage per user

Ok guys, i am inspired...:-)
Thanks for all your information.
I think i got a pretty good idea how to handle this.

Grz. Johan
Make my day..:-)