Forum Jump

Select Group :
Select Forum :
Sorted By :
Sort Order :
From The :
 
Thread Tools  Search this thread 
titanius.anglesmith
Total Points:
180
Status Points:
130
Green Belt
November 7, 2009 3:17 PM PST
Vtune CLI for online monitoring of process?
Is it possible to use vtune in an online fashion like monitoring an application on the fly via command line on Linux? to see what kind of cycles it is executing every some number of seconds.

I am looking into an application to get cycle events on the fly for a process, but couldn't find anything in the documentation mentioning online monitoring.

Thanks!
Peter Wang (Intel)
Total Points:
9,027
Status Points:
8,527
Brown Belt
November 8, 2009 9:48 PM PST
Rate
 
#1
Is it possible to use vtune in an online fashion like monitoring an application on the fly via command line on Linux? to see what kind of cycles it is executing every some number of seconds.

I am looking into an application to get cycle events on the fly for a process, but couldn't find anything in the documentation mentioning online monitoring.

Thanks!

Hi,

You can monitor sampling data collection activity, and control it - stop/cancel/pause/resume, and query the activity.

The command line is not "vtl" - that is ActivityController, use it in another shell.

You can know more detail for ActivityController usage by opening vtune/doc/users_guide/index.htm (search "ActivityController" string), or use "ActivityController -help" in command line.

ActivityController can't retrieve rich info such as cycles executed, process's status - this command line simply provides the status of activity only.


Hope it helps!

Regards, Peter



MrAnderson (Intel)
Total Points:
4,514
Status Points:
4,014
Brown Belt
November 9, 2009 3:08 PM PST
Rate
 
|Best Answer
#2 Reply to #1
Actually, you can use the duration command-line parameter to collect data for a finite amount of time.  You could then write a script that collects data for, say, 10 seconds, then dumps the results to the stdout and runs, again, in a loop.  You will need to play with the view options to figure out how you want to display the results, but this would give you the kind of output that top does, for example, displaying data every n seconds.

For example,
> # create the activity
> vtl activity p1 -d 10 -c sampling
> # run the latest activity in the project
> vtl run
> vtl view -summary
> vtl delete p1::r1 -f
> # loop on these three commands


If you put that in a loop, you can view the activity on a regular basis.  Note that in order to keep the data from bloating the disk, I've included a delete of the activity results.

Here is an example script that collects data for 5 seconds that I threw together:

#!/bin/sh
vtl -q activity m$ -d 5 -c sampling
read -t 1 x
while [ $? -ne 0 ]
do
echo "...collecting data..."
vtl -q run
echo "...displaying data..."
vtl -q view -summary
vtl -q delete m$::r1 -f
read -t 1 x
done


Hope that helps!


--------
Regards,
MrAnderson


titanius.anglesmith
Total Points:
180
Status Points:
130
Green Belt
November 9, 2009 6:12 PM PST
Rate
 
#3
Thank you peter wang and MrAnderson. I'll try both of them and report back :)

cheers


titanius.anglesmith
Total Points:
180
Status Points:
130
Green Belt
November 17, 2009 10:51 PM PST
Rate
 
#4
Cool. I have been able to extract many events using the script and its easy enough to make wrappers around :). Thanks a lot!

One more question:

Is it possible to sample just from some processes for the vtl command? like vtl...`pgrep firefox` either via a pid or a name ? 




Peter Wang (Intel)
Total Points:
9,027
Status Points:
8,527
Brown Belt
November 17, 2009 11:04 PM PST
Rate
 
#5 Reply to #4
Cool. I have been able to extract many events using the script and its easy enough to make wrappers around :). Thanks a lot!

One more question:

Is it possible to sample just from some processes for the vtl command? like vtl...`pgrep firefox` either via a pid or a name ? 



You can use like -
"vtl view -a?::r? -processes" to list all processes for specific [activity|result], know id of interest of process
"vtl view -pid 0x??? -hf -mn module_name" to display all hot functions forinterest of module from specific process.

Regards, Peter 



Intel Software Network Forums Statistics

8481 users have contributed to 31614 threads and 100679 posts to date.
In the past 24 hours, we have 31 new thread(s) 115 new posts(s), and 168 new user(s).

In the past 3 days, the most popular thread for everyone has been gemm(A,A,A) like possible? The most posts were made to gemm(A,A,A) like possible? The post with the most views is Dear Steve, excuse me for a d

Please welcome our newest member rohit5575