blob: e549ce142b92d05bb426f975a72eabfa73318417 [file] [log] [blame]
Mustafa Ozcelikorsb1ccea12017-08-13 13:31:31 +02001#!/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
12args=("$@")
13process_name=${args[0]}
14pid=$(pgrep -f $process_name -n ) #Newest result
15
16sudo perf stat -p $pid
17