Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document clinic doctor usage #2146

Open
benoit74 opened this issue Jan 30, 2025 · 0 comments
Open

Document clinic doctor usage #2146

benoit74 opened this issue Jan 30, 2025 · 0 comments

Comments

@benoit74
Copy link
Contributor

To investigate #2137, I've used Clinic Doctor

We should document this tool usage somewhere. Not sure where we should document such generic tools usage, but I feel like it would be a shame to not share this (and at least I do not want to have to remember all details below ^^).

My notes

Start the container

docker run -it --rm --name mwoffliner_test -v $PWD/output:/output local-mwoffliner /bin/bash

Inside the container: start a redis server (for some reason, the automatically started one does not work)

nohup redis-server --save "" --appendonly no --unixsocket /dev/shm/redis.sock --unixsocketperm 744 --port 0 --bind 127.0.0.1 > /dev/shm/redis.log 2>&1&

Inside the container: start clinic once to approve (or not) sending statistics

clinic doctor -- node mwoffliner

From your host: start mwoffliner run with clinic doctor (or any other tool)

docker exec mwoffliner_test clinic doctor -- node /usr/local/lib/node_modules/mwoffliner/lib/cli.js --webp --mwUrl="https://en.wikipedia.org/" --format="novid" --verbose="log" --publisher="openZIM" --adminEmail="[email protected]" --customZimTitle="Test" --outputDirectory="/output" --customZimLanguage="eng" --customZimDescription="Test" --articleList="https://download.openzim.org/wp1/enwiki_2025-01/tops/100.tsv" --optimisationCacheUrl=$OPTIM_URL --redis /dev/shm/redis.sock

From your host: terminate it with Ctrl-C (will not really work to the end)

Inside the container: find process id from within container (choose the node process with biggest TIME value)

ps -a

Inside the container: properly terminate the clinic program from within the container

kill -SIGINT 3187

Wait for clinic analysis to complete with watch ps -a looking for the remaining node process which begins to consume TIME

Copy clinic results

docker cp mwoffliner_test:/.clinic .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant