Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Collecting data from a container

See original GitHub issue

One feature that would be exceedingly helpful for clinic would be the ability to run it against a node process running within a container. Not yet entirely sure how that would work seamlessly, but wanted to at least open a tracking issue.

For example:

$ clinic doctor -- docker run myApp

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:16
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

dam1r89commented, Jul 30, 2019

Assuming that you’ve changed start script to run clinic, you have to send SIGINT to the clinic to make it stop gracefully and to generate reports.

I’m using docker-compose so this is how I did it:

Connect to running instance docker-compose exec node bash then type ps x and find process PID of the clinic. Something like node /app/node_modules/.bin/clinic flame -- node dist/server.js.

Then send the stop signal with kill -SIGINT <PID> and do it twice. Then it will stop in few seconds and generate reports.

Hope this helps somebody.

goto-bus-stopcommented, Jul 30, 2019

The SIGINT thing is correct—you can also run clinic using the timeout command-line tool to automatically stop after a certain time:

timeout --signal=SIGINT 20s clinic doctor -- node server.js
# Dockerfile
CMD ["/bin/bash", "./"]
Read more comments on GitHub >

github_iconTop Results From Across the Web

Manage data in Docker - Docker Documentation
Overview of persisting data in containers. ... Docker has two options for containers to store files on the host machine, so that the...
Read more >
Tools and Processes for Monitoring Containers - The New Stack
Tools and Processes for Monitoring Containers · Docker · cAdvisor · Prometheus · Agentless System Crawler · Sysdig · Other Tools for Collecting...
Read more >
Does Docker collect data processed by the container (Docker ...
Docker Desktop may collect statistics, metrics and information on the images/containers run directly under Docker desktop where they have access ...
Read more >
Collecting Docker Container Data with Fluentd - AppOptics Blog
Docker is built on top of cgroups, a kernel feature to limit, account, and isolate resource usage (CPU, memory, disk I/O, etc.) of...
Read more >
Solved: How to collect data from a Windows Server Containe...
How to collect data from a Windows Server Container? ... Today, we use a Universal Forwarder to collect system logs, event logs, and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found