Menu

#1210 ps command via STAF does not yield native results

Unix
closed-works-for-me
STAFProc (180)
5
2009-01-20
2009-01-15
No

STAF version: 3.2.5
Operating system: SUSE Linux Enterprise Server 10 SP1 (i586)
Kernel: 2.6.16.46-0.12-bigsmp

Native command: stx3455b:/log_7 # ps -ef | grep java | grep osgi
root 4426 1 7 Jan14 ? 01:06:57 /opt/IBM/WebSphere/AppServer/java/bin/java -Declipse.security -Dwas.status.socket=49367 -Dosgi.install.area=/opt/IBM/WebSphere/AppServer -Dosgi.configuration.area=/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/configuration -Djava.awt.headless=true -Dosgi.framework.extensions=com.ibm.cds -Xshareclasses:name=webspherev61_%g,groupAccess,nonFatal -Xscmx50M -Xbootclasspath/p:/opt/IBM/WebSphere/AppServer/java/jre/lib/ext/ibmorb.jar:/opt/IBM/WebSphere/AppServer/java/jre/lib/ext/ibmext.jar -classpath /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/properties:/opt/IBM/WebSphere/AppServer/properties:/opt/IBM/WebSphere/AppServer/lib/startup.jar:/opt/IBM/WebSphere/AppServer/lib/bootstrap.jar:/opt/IBM/WebSphere/AppServer/lib/j2ee.jar:/opt/IBM/WebSphere/AppServer/lib/lmproxy.jar:/opt/IBM/WebSphere/AppServer/lib/urlprotocols.jar:/opt/IBM/WebSphere/AppServer/deploytool/itp/batchboot.jar:/opt/IBM/WebSphere/AppServer/deploytool/itp/batch2.jar:/opt/IBM/WebSphere/AppServer/java/lib/tools.jar -Dibm.websphere.internalClassAccessMode=allow -verbose:gc -Xms50m -Xmx256m -Dws.ext.dirs=/opt/IBM/WebSphere/AppServer/java/lib:/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/classes:/opt/IBM/WebSphere/AppServer/classes:/opt/IBM/WebSphere/AppServer/lib:/opt/IBM/WebSphere/AppServer/installedChannels:/opt/IBM/WebSphere/AppServer/lib/ext:/opt/IBM/WebSphere/AppServer/web/help:/opt/IBM/WebSphere/AppServer/deploytool/itp/plugins/com.ibm.etools.ejbdeploy/runtime -Dderby.system.home=/opt/IBM/WebSphere/AppServer/derby -Dcom.ibm.itp.location=/opt/IBM/WebSphere/AppServer/bin -Djava.util.logging.configureByServer=true -Duser.install.root=/opt/IBM/WebSphere/AppServer/profiles/AppSrv01 -Djavax.management.builder.initial=com.ibm.ws.management.PlatformMBeanServerBuilder -Dwas.install.root=/opt/IBM/WebSphere/AppServer -Dpython.cachedir=/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/temp/cachedir -Djava.util.logging.manager=com.ibm.ws.bootstrap.WsLogManager -Dserver.root=/opt/IBM/WebSphere/AppServer/profiles/AppSrv01 -Djava.security.auth.login.config=/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/properties/wsjaas.conf -Djava.security.policy=/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/properties/server.policy com.ibm.wsspi.bootstrap.WSPreLauncher -nosplash -application com.ibm.ws.bootstrap.WSLauncher com.ibm.ws.runtime.WsServer /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/config 9Node01Cell 9Node01 server1
root 4742 1 0 Jan14 ? 00:00:00 jsvc.exec -user sym -home /enterprise/share/ibm-java2-i386-50/jre -cp /enterprise/ibm:/enterprise/common/dist/symphonia-frameworklauncher-current.jar:/enterprise/common/lib/commons-daemon.jar:/enterprise/share/osgi/plugins/org.eclipse.osgi_3.3.0.v20070530.jar -pidfile /enterprise/common/bin/osgi.pid -Dfile.encoding=utf-8 -Djava.util.logging.config.file=/enterprise/common/conf/logging.properties -Dlog4j.configuration=file:/enterprise/common/conf/log4j.xml -DSYMPHONIA_LOG=/log/ -Dshare.jre.dir=/enterprise/share/ibm-java2-i386-50/jre -outfile /log//osgi.log -errfile /log//osgi.err -Xgcpolicy:gencon -Xdisableexplicitgc -verbose:gc -Xverbosegclog:/log/verbosegc_fw.log -Xms1920m -Xmx1920m -Xmn256m -Xmo1664m -Xdump:heap+java:events=vmstop+user+abort -Xdump:system:events=user,request=exclusive+compact+serial -verbose:gc -Dsymphonia.node.guid=e2d15337-7c12-462e-b7af-a3b215037c58 -Dosgi.configuration.area=/enterprise/share/osgi/runtime -Dorg.osgi.framework.bootdelegation=* com.siemens.symphonia.frameworklauncher.FrameworkLauncherMain -consolelog
sym 4743 4742 90 Jan14 ? 12:41:21 jsvc.exec -user sym -home /enterprise/share/ibm-java2-i386-50/jre -cp /enterprise/ibm:/enterprise/common/dist/symphonia-frameworklauncher-current.jar:/enterprise/common/lib/commons-daemon.jar:/enterprise/share/osgi/plugins/org.eclipse.osgi_3.3.0.v20070530.jar -pidfile /enterprise/common/bin/osgi.pid -Dfile.encoding=utf-8 -Djava.util.logging.config.file=/enterprise/common/conf/logging.properties -Dlog4j.configuration=file:/enterprise/common/conf/log4j.xml -DSYMPHONIA_LOG=/log/ -Dshare.jre.dir=/enterprise/share/ibm-java2-i386-50/jre -outfile /log//osgi.log -errfile /log//osgi.err -Xgcpolicy:gencon -Xdisableexplicitgc -verbose:gc -Xverbosegclog:/log/verbosegc_fw.log -Xms1920m -Xmx1920m -Xmn256m -Xmo1664m -Xdump:heap+java:events=vmstop+user+abort -Xdump:system:events=user,request=exclusive+compact+serial -verbose:gc -Dsymphonia.node.guid=e2d15337-7c12-462e-b7af-a3b215037c58 -Dosgi.configuration.area=/enterprise/share/osgi/runtime -Dorg.osgi.framework.bootdelegation=* com.siemens.symphonia.frameworklauncher.FrameworkLauncherMain -consolelog

STAF command: stx3455b:/log_7 # staf local process start shell command ps parms "-ef | grep java | grep osgi" stderrtostdout returnstdout wait
Response
--------
{
Return Code: 1
Key : <None>
Files : [
{
Return Code: 0
Data :
}
]
}

STAF is running as root: stx3455b:/log_7 # ps -ef | grep -i staf
root 2493 1 0 Jan14 ? 00:00:00 /usr/local/staf/bin/STAFProc
root 6933 13722 0 09:25 pts/0 00:00:00 grep -i staf

Any ideas for the differences?

Discussion

  • Sharon Lucas

    Sharon Lucas - 2009-01-15

    On machine stx3455b, I shutdown STAF and restarted STAFProc from the command prompt (as it looked like STAFProc was previously started at bootup), the ps command works fine via a PROCESS START request. For example:

    stx3455b:/usr/local/staf # STAF local PROCESS START SHELL COMMAND "ps -ef | grep java | grep osgi" WAIT RETURNSTDOUT STDERRTOSTDOUT
    Response
    --------
    {
    Return Code: 0
    Key : <None>
    Files : [
    {
    Return Code: 0
    Data : root 4418 1 5 09:56 ? 00:12:20 /opt/IBM/WebS
    phere/AppServer/java/bin/java -Declipse.security -Dwas.status.socket=48466 -Dosg
    i.install.area=/opt/IBM/WebSphere/AppServer -Dosgi.configuration.area=/opt/IBM/W
    ebSphere/AppServer/profiles/AppSrv01/configuration -Djava.awt.headless=true -Dos
    gi.framework.extensions=com.ibm.cds -Xshareclasses:name=webspherev61_%g,grou
    ...

    Perhaps STAFProc is being started too early in the bootup process on your machine?

     
  • Bryan Osenbach

    Bryan Osenbach - 2009-01-17
    • status: open --> closed
     
  • Bryan Osenbach

    Bryan Osenbach - 2009-01-17

    Debugged this further and found the difference. It wasn't an issue of sequencing but a difference in the init.d ENV on SLES. The major difference is COLUMNS=80 vs COLUMNS=194 when comparing "staf local process start shell command set stderrtostdout returnstdout wait" to "set". To easily work around for this case, I updated "ps -ef" to "ps -efww".

    Thanks for helping out

     
  • Sharon Lucas

    Sharon Lucas - 2009-01-20
    • assigned_to: nobody --> slucas
    • status: closed --> closed-works-for-me
     

Log in to post a comment.