A comprehensive real-time monitoring system for JVM processes with a Spring Boot backend and Angular frontend. Monitor running JVM processes, threads, loaded classes, object instances, and memory usage through a beautiful, modern dashboard.
- Process Discovery: Automatically detect and list all running JVM processes
- Thread Monitoring: View all threads with state, stack traces, and statistics
- Class Explorer: Browse loaded classes with search and filtering
- Object Statistics: Analyze object instances and memory usage
- Real-time Updates: WebSocket-based live updates every 2 seconds
- Modern UI: Dark theme with glassmorphism effects and smooth animations
- JVM Monitoring: Uses Java Attach API and JMX to connect to running JVM processes
- REST API: Endpoints for processes, threads, classes, objects, and memory
- WebSocket: STOMP over SockJS for real-time monitoring updates
- Technologies: Spring Boot 2.0.9, Java 8, Maven
- Dashboard: Responsive grid layout with 5 main components
- Real-time: WebSocket integration for live data updates
- Modern Design: Dark theme with vibrant purple/blue gradients
- Technologies: Angular 6.2.9, TypeScript, RxJS, SockJS, STOMP
- JDK 8 (not JRE) - Required for tools.jar and Attach API
- Node.js 8.12.0 and npm
- Angular CLI 6.2.9
- Maven 3.x
cd backend
mvn clean install
mvn spring-boot:runThe backend will start on http://localhost:8080
cd frontend
npm install
ng serveThe frontend will be available at http://localhost:4200
GET /api/processes- List all JVM processesGET /api/processes/{pid}/threads- Get threads for a processGET /api/processes/{pid}/classes- Get loaded classesGET /api/processes/{pid}/objects- Get object statisticsGET /api/processes/{pid}/memory- Get memory informationGET /api/health- Health check
- Endpoint:
ws://localhost:8080/ws - Topics:
/topic/monitoring- Real-time process monitoring updates/topic/processes- Process list updates
- Process List: Grid of cards showing all running JVM processes with PID, name, memory usage, uptime, thread count, and class count
- Metrics Panel: Real-time metrics showing heap memory, non-heap memory, active threads, and GC statistics
- Thread Viewer: List of threads with state filtering, expandable stack traces, and real-time updates
- Class Explorer: Searchable table of loaded classes with package information and instance counts
- Object Viewer: Sortable table of object statistics with memory usage and heap percentage
Edit backend/src/main/resources/application.properties:
server.port=8080
spring.websocket.allowed-origins=http://localhost:4200Edit frontend/src/environments/environment.ts:
export const environment = {
production: false,
apiUrl: 'http://localhost:8080/api',
wsUrl: 'http://localhost:8080/ws'
};This application requires JDK (not JRE) because it uses tools.jar for the Java Attach API. Make sure JAVA_HOME points to your JDK installation.
The monitoring application needs to run with the same user permissions as the JVM processes you want to monitor. Some processes may not be accessible if running under different users.
- Object instance tracking can be memory-intensive
- Real-time updates are sent every 2 seconds for selected process
- Process list updates every 5 seconds
- Ensure you're using JDK 8 (not JRE)
- Check that
tools.jarexists in$JAVA_HOME/lib/ - Verify port 8080 is not in use
- Run
npm installto ensure all dependencies are installed - Check Node.js version:
node --version(should be 8.12.0) - Check Angular CLI version:
ng --version(should be 6.2.9)
- Ensure backend is running on port 8080
- Check CORS configuration in
CorsConfig.java - Verify firewall settings
- Ensure you're running with appropriate permissions
- Check that other JVM processes are actually running
- Verify JDK is properly installed
Backend:
- Spring Boot 2.0.9
- Spring WebSocket
- Java Attach API
- JMX (Java Management Extensions)
- Maven
Frontend:
- Angular 6.2.9
- TypeScript 2.9.2
- RxJS 6.2.2
- SockJS Client
- STOMP.js
This project is created for JVM monitoring and debugging purposes.
Feel free to submit issues and enhancement requests!
Built with β€οΈ using Spring Boot and Angular