-2

I have several servers. And on each of the servers, I have a shell script to verify the FileSystem, and some info of some files I parse. This script renders information to the console for example

Server 1 fs /usr/user1 free 10 Gb

File 100 Processed, File 200 Processed,

etc..

The script takes about 1 minute to execute completely.

I already have a jboss server with a webapp with some servlets. I would like to create a jsp, and a servlet to run these commands on 4 different servers and display the results.

Ajax maybe??

Thanks in advance

testeurFou
  • 71
  • 3
  • 11

1 Answers1

0

You question is not very clear. You have several servers. Are they Webserver?

I will try to give a general answer.

Instead of waiting 1 minute, you can call the shellscripts regulary (if there are not time sensitive information)

  • the shellscripts are writing to log-files on each server or in database table regularly
  • from your jboss server you can access the other (web)server and get the (last) logs / DB table contents and present it.

OR

Like you suggested, with ajax.

  • ajax request to the other (web)server start the shellsripts through web-interface,
  • wait for processing
  • display in browser

You should consider that the other (web)server are publicly accessible. So some security measures must be implemented. Multiple requests could be made too, so there should be some locks/timelimits, how often the shellscript can be called.

OR

So there is not a single solution, but many possibilities.
The logic can be distributed to browser, jboss-server and the others servers.

Community
  • 1
  • 1
code_angel
  • 1,537
  • 1
  • 11
  • 21
  • Thanks a lot or your help... I think I'll go with your solution to write the information in a table somewhere and display it on the jsp. – testeurFou Dec 09 '16 at 09:42
  • I am glad i could help. You can accept / upvote an answer by clicking on the check mark / arrow up on the left side. – code_angel Dec 09 '16 at 09:51