Using perf stat -p argument


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Using perf stat -p argument
# 1  
Old 02-04-2016
Linux Using perf stat -p argument

Hi,

I'm trying to record metrics for an application called memcached. The procedure that I followed is:

1) Start the server using this command:
Code:
memcached -t 4 -m 4096 -n 550

2) Start the client using this command (after warming up the server):
Code:
./loader -a ../twitter_dataset/twitter_dataset_30x -s servers.txt -g 0.8 -T 1 -c 200 -w 8 -e -r (requests_per_second)

3) Now after the connection is established, I'm now trying to record the metrics using this command:
Code:
perf stat --log-fd 3 -e cycles -p $pid sleep 1 3>results.log

Explanation of perf command that I'm using:
This will record metric - cycles for the server memcached for 1 second.

But I'm getting weird results from the above command. I think that pid that I'm catching is not the full load of the server. I'm getting the results in order of 100's which seems weird. Can anyone please suggest any alternative method to overcome this (or what am I doing wrong here)?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Linux

Not able to run perf on Linux 4.4 kernel (Ubuntu 15.10)

I'm not able to run perf on linux 4.4. I'm using ubuntu 15.10. The error I'm getting is: WARNING: perf not found for kernel 4.4.0 You may need to install the following packages for this specific kernel: linux-tools-4.4.0-4.4.0 linux-cloud-tools-4.4.0-4.4.0 You may also want to install... (4 Replies)
Discussion started by: BHASKAR JUPUDI
4 Replies

2. HP-UX

Reason to keep old /var/opt/perf/datafiles/logproc files

Would there be a reason to keep old logproc files that have been tarred up for any longer than a few days? (1 Reply)
Discussion started by: jeffbusz
1 Replies

3. Red Hat

perf provides <not counted> for multiple fields

Hi, I am trying to find the number of cache misses that are caused by my code. The best way I could find was to use the perf command. After running command: perf stat dd if=/dev/zero of=/dev/null count=100, the output I got is: 1.812057 task-clock-msecs # 0.876 CPUs ... (0 Replies)
Discussion started by: fidelity
0 Replies

4. UNIX for Advanced & Expert Users

Error:--test: argument expected--Even though i give an argument.

Hi All, I am running the script VBoxManage list vms |sed 's/"//g' | cut -d " " -f1 > har1out.mytxt result=`cat har1out.mytxt | grep $1' echo $result echo $1 { if then echo pass else echo fail fi (2 Replies)
Discussion started by: harsha85
2 Replies

5. Shell Programming and Scripting

Make script that run with argument if not run from configuration file argument

Hello, Is there any method thorugh which script can take argument if pass otherwise if argument doesn't pass then it takes the argument from the configuration file i.e I am workiing on a script which will run through crontab and the script will chekout the code ,zip and copy to the... (3 Replies)
Discussion started by: rohit22hamirpur
3 Replies

6. Shell Programming and Scripting

Cannot compare argument in if statement in csh/grep command if argument starts with “-“

If ($argv == “-debug”) then Echo “in loop” Endif But this is not working. If I modify this code and remove “-“, then it works. Similarly I am getting problem using grep command also Grep “-debug” Filename Can someone please help me on how to resolve these... (1 Reply)
Discussion started by: sarbjit
1 Replies

7. Shell Programming and Scripting

get positive number n as argument script must calculate the factorial of its argument

Can someone please help me with this SHELL script? I need to create a script that gets a positive number n as an argument. The script must calculate the factorial of its argument. In other words, it must calculate n!=1x2x3x...xn. Note that 0!=1. Here is a start but I have no clue how to... (3 Replies)
Discussion started by: I-1
3 Replies

8. UNIX for Dummies Questions & Answers

How to find the last argument in a argument line?

How to find the last argument in a argument line? (4 Replies)
Discussion started by: nehagupta2008
4 Replies

9. Solaris

Book Recommendation for Solaris Perf Monitoring?

I'm looking for a good Solaris performance monitoring book. I work primarily with Solaris 9, but will also be working with 10, so a dtrace chapter would also be good. Any insight would be much appreciated. (4 Replies)
Discussion started by: dangral
4 Replies

10. UNIX for Dummies Questions & Answers

Cannot stat?

Hi! I ran into a problem with a job I'm running. All it is doing is a "touch" on a filename. However, when I ran the job, it error'd out and got the message 'cannot stat'. When I restarted the job (making no changes) it worked just fine. Anyone know what this means? (1 Reply)
Discussion started by: lgardner
1 Replies
Login or Register to Ask a Question