• Skip to primary navigation
  • Skip to content
  • Skip to footer
Wannabe Exceptional
  • AI
  • About
  • Slides

    Run GC From Commandline

    Run this on the server:

    $ sudo -u tomcat7 jcmd `cat /var/run/tomcat7.pid` GC.run
    
    This is since JDK7. Run jcmd as the same user as the user that runs the Java apps.

    less than 1 minute read

    Jan Peter Alexander

    Jan Peter Alexander

    There is nothing certain than the uncertainty itself. Capture, learn and mitigate. Welcome!

    • Planet Earth
    • Website
    • Twitter
    • Facebook
    • Instagram
    • Tumblr
    • GitHub
    • Last.fm
    • Steam
    • YouTube
    • Soundcloud

    Run this on the server:

    $ sudo -u tomcat7 jcmd `cat /var/run/tomcat7.pid` GC.run
    

    This is since JDK7. Run jcmd as the same user as the user that runs the Java apps.

    Tags: gc, java, tomcat

    Categories: java, tips

    Updated: September 22, 2017

    Twitter Facebook LinkedIn
    Previous Next

    You May Also Enjoy

    Install/Upgrade Quarkus Locally

    less than 1 minute read

    Upgrading Golang to newer version

    Install/Upgrade Golang Locally

    less than 1 minute read

    Upgrading Golang to newer version

    OpenSpec Tutorial: Spec-Driven Development for AI Coding Assistants

    9 minute read

    Learn how to use OpenSpec to align humans and AI coding assistants with spec-driven development. No API keys required - works with Claude Code, Cursor, and o...

    AI Dev Tasks Tutorial: Structured Feature Development with AI Assistants

    8 minute read

    Learn how to use AI Dev Tasks to transform unpredictable AI coding into structured, reliable feature development. Works with Cursor, Claude Code, and other A...

    • Feed
    © 2026 Wannabe Exceptional. Powered by Jekyll & Minimal Mistakes.