1761366 Members
2956 Online
108901 Solutions
New Discussion юеВ

Re: memory graph

 
system administrator_15
Frequent Advisor

memory graph

Hi guys
I need to be able to produce a graph listing memory memory usage by application.
i have glance plus and measureware, but not perfview, i can not seem to find a way of listing per application only per process.
has anyone got any ideas, apps that might help or suggestions.
regards
andy
6 REPLIES 6
Hoefnix
Honored Contributor

Re: memory graph

Can you figure out all processes belonging to that one application?

Then you still can use the ps command. But if your number of processes are dynamic you better grep on a user. (are all processes running on the same user_id for one apps and this user is not used for other apps?)

exampl:
ps -elf | grep user | awk 'BEGIN {total=0} { total+=$10 } END {printf "Total=%u\n",total}'

Gives total mem per user

Regards,

Peter
system administrator_15
Frequent Advisor

Re: memory graph

Peter thats brilliant for 1 application but i need to get it for all applications running at a particular piont in time and the have the apps listed separatly
regards
andrew
Hoefnix
Honored Contributor

Re: memory graph

The suggestion I gave grep's all mem used for this specific user, so if you application is running with one specific useraccount then still you can use this example.
You want to draw a graph on a time scale.
Just schedule a script that collects the data for example every 5 minutes.

If more then one account is used for 1 application, copy my example multiple times in this script and sum the results of each line. put the date/time together withe result in a comma seperated file and import this in Excel and draw your graph.

Regards,

Peter
Jakes Louw
Trusted Contributor

Re: memory graph

Andy

Run the ps as specified for a range of users:

"for i in user user2 user3....
do

done
>> /var/combined_user_ouput"

Trying is the first step to failure - Homer Simpson
Bill Hassell
Honored Contributor

Re: memory graph

Glance uses a file called var/opt/perf/parm to define processes into application groups. Using the comments in the file, you can define specific applications (like Oracle, Sybase, proEngineer, etc) and then associate every process that belongs to this application. Glance (and MeasureWare) can group statistics according to the application group. See the /opt/perf/examples/mwaconfig/parm_apps file for additional application definition suggestions.


Bill Hassell, sysadmin
Sridhar Bhaskarla
Honored Contributor

Re: memory graph

Hi Andy,

Once you defined the application as stated by Bill using the examples from /var/opt/perf/parm file, you can get the metrics corresponding them by using the "extract" command. It's an easy interface and has "guide" option that can take you through the process. During the process it will ask you to create a template file. If you specified default options, it will create a file called "myrept" with all the available metrics but commented out by a "*". You need to uncomment the metrics you need. Search for "APPLICATION" in that file. For ex.,

DATE
TIME
APP_NAME
APP_CPU_TOTAL_UTIL
APP_MEM_RES

etc.,

-Sri




You may be disappointed if you fail, but you are doomed if you don't try