Purge JBOSS log files
I am using centOS server with two instances of JBOSS running in it.
So i need a shell script to delete log files older than x days in each instance. for example: ps -ef | grep jboss i get two instances like say /home/mypro/jboss-as-7.1.1/standalone/... /home/newpro/SAAS-jboss-as-7.1.1/standalone/... ***And shell script should also delete log files automatically when a new instance is created. By default logs are saved in /home/mypro/jboss-as-7.1.1/standalone/logs/ /home/newpro/SAAS-jboss-as-7.1.1/standalone/logs/ |
So I guess the pseudo-code would look something like this?
Code:
locate running jboss instances |
@ser olmy: yeah algorithm is close enough. but how to "locate running jboss instances".?
|
You could use 'ps -ef|grep ..' or pgrep .. but, if you have ctrl over the install or just knowledge of it, you could skip straight to the logfile dir(s).
|
Quote:
|
All times are GMT -5. The time now is 08:23 AM. |