Hi,
Hope this will helpful for you,
I just tried with httpd to check out only service and PID,
# echo -e "Service PID\n" `lsof -i :80 | tail -n1 | awk '{print $1" "$2}'`
Service PID
httpd 4981
Regards,
Ranjithkumar.T
On Wed, Jan 29, 2014 at 6:16 PM, hari prasadh <[email protected]>wrote:
> In python
> >>> import os
> >>> os.popen("ps -ef |grep jboss").read()
> 'root 24452 24425 0 17:34 pts/0 00:00:00 sh
> /root/jboss-as-7.1.1.Final/bi\nroot 24593 24592 0 17:34 pts/0
> 00:00:00 sh -c ps -ef |grep jboss\nroot 24595 24593 0 17:34 pts/0
> 00:00:00 grep jboss\n'
>
> if i ran the command in console
>
> [root@10 bin]# ps -ef |grep jboss
> root 24452 24425 0 17:34 pts/0 00:00:00 sh
> /root/jboss-as-7.1.1.Final/bin/standalone.sh -Djboss.bind.address=0.0.0.0
> -Djboss.bind.address.management=0.0.0.0
> *root 24499 24452 0 17:34 pts/0 00:00:13 java -D[Standalone]
> -server -XX:+UseCompressedOops -XX:+TieredCompilation -Xms64m -Xmx512m
> -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true
> -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000
> -Dsun.rmi.dgc.server.gcInterval=3600000
> -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true
> -Djboss.server.default.config=standalone.xml
> -Xloggc:/root/jboss-as-7.1.1.Final/standalone/log/gc.log
> -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -Dmaster.enable=true
>
> -Dorg.jboss.boot.log.file=/root/jboss-as-7.1.1.Final/standalone/log/boot.log
>
> -Dlogging.configuration=file:/root/jboss-as-7.1.1.Final/standalone/configuration/logging.properties
> -jar /root/jboss-as-7.1.1.Final/jboss-modules.jar -mp
> /root/jboss-as-7.1.1.Final/modules -jaxpmodule javax.xml.jaxp-provider
> org.jboss.as.standalone -Djboss.home.dir=/root/jboss-as-7.1.1.Final
> -Djboss.bind.address=0.0.0.0 -Djboss.bind.address.management=0.0.0.0*
> root 24677 24425 0 18:08 pts/0 00:00:00 grep jboss
>
>
> i was not able to get the process and its id.i dont know what iam missing
> there.
> can someone help me out.
>
> --
> Thanks & Regards,
> HariPrasadh
> _______________________________________________
> ILUGC Mailing List:
> http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
> ILUGC Mailing List Guidelines:
> http://ilugc.in/mailinglist-guidelines
>
--
Regards,
Ranjithkumar.T
( +91-9994106436 )
_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
ILUGC Mailing List Guidelines:
http://ilugc.in/mailinglist-guidelines