Mustafa Ozcelikors | b1ccea1 | 2017-08-13 13:31:31 +0200 | [diff] [blame^] | 1 | #!/bin/bash |
| 2 | |
| 3 | # Copyright (c) 2017 FH Dortmund. |
| 4 | # All rights reserved. This program and the accompanying materials are made available under the |
| 5 | # terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at |
| 6 | # http://www.eclipse.org/legal/epl-v10.html |
| 7 | |
| 8 | # Prints the process stats given the process name |
| 9 | # Usage: bash AppMonitor.sh <process_name> |
| 10 | # ATTENTION! Do not run as root |
| 11 | |
| 12 | args=("$@") |
| 13 | process_name=${args[0]} |
| 14 | pid=$(pgrep -f $process_name -n ) #Newest result |
| 15 | |
| 16 | sudo perf stat -p $pid |
| 17 | |