java program with xml output like 'top' in unix - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


java program with xml output like 'top' in unix

patfolapatfola Posts: 2Member
I'm supposed to write a java program which exhibits behaviour similar to the tool namedtop under UNIX/Linux. It will then process the data in some way as specified to the program by the use of one
or more command-line parameters.
The program accepts the following parameters. Multiple parameters can be specified at the same time, but that certain parameters are mutually exclusive.
The program supports the following options. All the options are optional:
Top [mode=(scheduler|procanalyse)] [scheduler=(fcfs|sjf|rr)]
[sort=[](user|pid|atime|state)] [preemptive][nonpreemptive]

Can anyone help? Where do i even begin?

example invocations:
echo /data/procdir1 | java Top mode=procanalyse sort=user > out1.xml
echo procdir2 | java Top mode=scheduler scheduler=sjf preemptive > out2.xml
Sign In or Register to comment.