Collecting data from a container
See original GitHub issueOne 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:
- Created 6 years ago
- Reactions:16
- Comments:6 (1 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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 typeps x
and find process PID of the clinic. Something likenode /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.
The SIGINT thing is correct—you can also run clinic using the
timeout
command-line tool to automatically stop after a certain time: