Git Product home page Git Product logo

Comments (5)

paraspatidar avatar paraspatidar commented on July 29, 2024 1

TI was facing same issue , in my case (and in usual cases) this was happening because this perfcollect internally runs perf executable , thus if you look at line 1737 on perfcollect script :

RunSilent $perfcmd $collectionArgs
here , try to print it like :

WriteStatus $perfcmd WriteStatus $collectionArgs RunSilent $perfcmd $collectionArgs
Now, based on output try to run that command with same output argument (should be something like $perfcmd was /usr/bin/perf & $collectionArgs were record
see if that works , as this might fail.
as usually it should be perf record -g -p

hus i modified this perfcollect script to run correct command and issue was resolved.

from corefx-tools.

ousiax avatar ousiax commented on July 29, 2024 1

@cgibbons

https://github.com/dotnet/coreclr/blob/master/Documentation/project-docs/linux-performance-tracing.md#collecting-in-a-docker-container

In order to use the instructions in this document to collect a trace, spawn a new shell inside the container that is privileged.

docker exec -it --privileged <container_name> /bin/bash

from corefx-tools.

johnduhart avatar johnduhart commented on July 29, 2024

I was running into this issue as well, turns out perf was failing to run which causes the script to immediately exit. Try running perf manually to see what the error is.

from corefx-tools.

linjmeyer avatar linjmeyer commented on July 29, 2024

I'm using Docker for Mac and I had to use the privileged flag on my container (docker run --privileged ...) as well as when creating the shell (docker exec -it --privileged ...)

from corefx-tools.

jignesh-cognologix avatar jignesh-cognologix commented on July 29, 2024

Solved !!!

After installing perfcollect one can run this command perf record -g -p . This will let you know whether the underlying perf command is working or not. I was getting error that it was not installed properly. So I installed it via below command

RUN apt-get install -y linux-perf-4.19

This solved the purpose of perf command not found. Please ensure you installing right perf tool with respect to your linux distribution.

After this one might face issue with privileged issue as perf requires high level permission.

please refer this url on how to fix that - https://medium.com/@geekidea_81313/running-perf-in-docker-kubernetes-7eb878afcd42

I used the --privileged option while running the container.

This way I was able to proceed collecting traces using linux containers for .net core web application.

For those opting for dockerized option please refer below url for ensuring right dlls are installed
https://raw.githubusercontent.com/microsoft/perfview/master/src/perfcollect/docker-demo/Dockerfile

from corefx-tools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.