Skip to content

Instantly share code, notes, and snippets.

View skihero's full-sized avatar

Kish skihero

  • Amazon Mechanical Turk
  • Ooty
View GitHub Profile
@skihero
skihero / json.json
Created March 24, 2011 12:37
json.file
{
"name": [{
"_content": "[email protected]"
}],
"a": [
{
"n": "zimbraId",
"_content": "f86ea7d3-f2a9-466e-ab73-b9b005c4d649"
},
{
@skihero
skihero / AlwaysOnTopTk.py
Created March 30, 2011 12:53
AlwaysOnTopTk
from Tkinter import *
root = Tk()
toplevel = root.winfo_toplevel()
toplevel.wm_attributes('-topmost', 1)
# This is used to keep the window above all others
@skihero
skihero / GetMatchScore.py
Created March 30, 2011 14:36
Gets the match scores a script in python
'''
Script to periodically check the Cricket scores from a website
and print it to a window
Window part is yet to be done,
Thinking of using Tkinter with its glorious always on the top mode.
Kish
''''
@skihero
skihero / httpd.conf
Created April 5, 2011 09:10
apache report url
To expose a apache configuration url/report url modify the
/etc/httpd/conf/httpd.conf
to include
ExtendedStatus On
and
<Location /server-status>
SetHandler server-status
@skihero
skihero / tomcat_path.sh
Created April 5, 2011 09:35
tomcat path
[root@oib bin]# Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
At least one of these environment variable is needed to run this program
[1]+ Exit 1 ./startup.sh
export JAVA_HOME=/usr/java/jdk1.5.0_18/
export CATALINA_HOME=/root/apache-tomcat-5.5.32
@skihero
skihero / Stat_check_tomcat.xml
Created April 5, 2011 09:48
To set status check in tomcat
To set status check in tomcat
modify the file
bin]# vi ../conf/tomcat-users.xml
to include a user with the manager role
<user username="status_checker" password="status_checker" roles="manager"/>
This will pull out the full details of all the server statistics
How to modify a tomcat to use with SiteScope.
Sitescope has a JMX monitor which I think is very generic in nature.
In order to make use of this we first have to enable the JMX on the tomcat's end.
To do this we have to
add the following lines to the JAVA_OPTS
JAVA_OPTS="$JAVA_OPTS -D-Dcom.sun.management.jmxremote
In the process of creating a custom mib found these nice flags.
To check the OID of the loaded mib using the name
[root@griffin mibs]# snmptranslate -Of HOST-RESOURCES-MIB:hrSystem
.iso.org.dod.internet.mgmt.mib-2.host.hrSystem
http://java.decompiler.free.fr/
Fast and works out of the box, nice