You can use this script to view unix file system ( for example : JVM Logs ) in web browser, without logging to server.
Let me know, if you feel any issue in executing this script.
[sanpoc@pwebspherebox:/jboss/poc]$ cat SimpleHTTPLog.py
#!/usr/bin/python
import SimpleHTTPServer
import SocketServer
import sys
# minimal web server. serves files relative to the
# current directory.
#PORT = 44444
PORT = int(sys.argv[1])
Handler = SimpleHTTPServer.SimpleHTTPRequestHandler
Handler.extensions_map.update({
'': 'application/octet-stream', # Default
'.out': 'text/plain',
'.log': 'text/plain'
})
httpd = SocketServer.TCPServer(("", PORT), Handler)
print "serving at port", PORT
httpd.serve_forever()
This script output will be like :
You can expose Websphere installation root directory to webbrowser and can view all files and configurations easily ( Please note, this is not recommended . Use it only during Weekend Oncalls or when required or when we want to verify the logs without logging to box or you want to share the log with developer but the log size is too big ).
No comments:
Post a Comment