Skip to main content

How to see running SSH jobs

You may want to see forgotten SSH jobs when hitting concurrency limits.

From the UI:

Visit the legacy jobs page:

inserting vcs (gh or bb), org, and project where appropriate. This page displays jobs rather than pipelines.

For example, if I wanted to see all of the currently running jobs for our CircleCI CLI repository, I would visit:

This will show a jobs view:

Screen_Shot_2020-08-10_at_11.59.56_AM.png

You will then be able to see and access running SSH jobs from this view.

Note: This jobs view is on a per-project basis. That means you can only see all of the jobs for a given project, but you will not be able to see all jobs across all projects.

To cancel the currently running SSH job, click the job on the list and it will take you to the workflows page. From this page, you will be able to cancel the job from the Rerun menu as follows:

Screen_Shot_2020-08-12_at_2.33.01_PM.png

Using the CircleCI API

Note: You'll need to use a personal API token

  • Open a terminal and run the following cURL request:

curl -G "https://circleci.com/api/v1.1/recent-builds?shallow=true" \
-H "Circle-Token: <your_API_Token>"| jq '.[] | select(.why == "ssh") | select(.status == "running")|{build_url, build_num}'

The above request will return the URL (build_url) and the ID (build_num) of all your currently running SSH jobs.

  • You can then copy and paste the URL into your browser's address, which will take you to the job's page where you'll be able to view the job's details, and if you wish to do so, cancel it.

  • You can also use the ID to cancel the job using the "Cancel a Build" API endpoint.

curl -X POST https://circleci.com/api/v1.1/project/:vcs-type/:username/:project/:build_num/cancel \
-H "Circle-Token: <circle-token>"
Did this answer your question?