sigar/bindings/java/.sigar_shellrc
2005-07-22 01:42:36 +00:00

50 lines
1.7 KiB
Plaintext

#this file is loaded by the sigar shell.
#commands in this file are run just as they would be if they
#were typed in by hand in the shell prompt.
#find weblogic nodes (-1 means last index in the array)
alias wlfind ptql State.Name.eq=java,Args.-1.eq=weblogic.Server
#find websphere 4.x nodes
alias ws4find ptql State.Name.eq=java,Args.*.eq=com.ibm.ejs.sm.server.ManagedServer
#find websphere admin server
alias ws4admin ptql State.Name.eq=java,Args.*.eq=com.ibm.ejs.sm.server.AdminServer
#find websphere 5.x nodes
alias ws5find ptql State.Name.eq=java,Args.*.eq=com.ibm.ws.runtime.WsServer
#find websphere 4.x and 5.x nodes
alias wsfind ptql State.Name.eq=java,Args.*.eq=com.ibm.ws.bootstrap.WSLauncher
#find jboss (use .sw=java to match 'java' or 'javaw')
alias jbfind ptql State.Name.sw=java,Args.*.eq=org.jboss.Main
#find tomcat
alias tcfind ptql State.Name.eq=java,Args.*.eq=org.apache.catalina.startup.Bootstrap
#find apache parent processes
#($1 is the return value of the first query in the string)
#'Pne' => 'P' flags means parent of matched process
#to filter out httpd child processes
alias apfind ptql State.Name.re=^(https?d.*|[Aa]pache)$,State.Name.Pne=$1
#find ant processes (ant hangs on me sometimes)
#(* matches any value in the array)
alias hant ptql State.Name.eq=java,Args.*.eq=org.apache.tools.ant.Main
#my HQ agent
#(user.name is in System.getProperties)
alias myag ptql CredName.User.eq=$user.name,State.Name.sw=java,Args.-1.ew=AgentClient
#find all java procs except the shell itself
#($$ is the current process id)
alias java ptql State.Name.eq=java,Pid.Pid.ne=$$
#find all processes owned by the current user
alias myproc ptql CredName.User.eq=$user.name
#VMware GSX VMs
alias gsx-vm ptql State.Name.eq=vmware-vmx,Args.1.eq=-C