• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

i want excute top command in linux using java

 
ravinder thirumala
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i want to execute top command using java
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well - we won't stop you.

Ah - there was a question?
How to run it?
How to emulate it?
 
Henry Wong
author
Marshal
Pie
Posts: 20823
75
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe "top" extensively uses "curses"... so it may be difficult to just run it, and read the standard output. You might want to use some lower level applicatios like vmstat, netstat, or ps, instead.

Henry
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic