Lettura Grep

di il
2 risposte

Lettura Grep

Ciao a tutti, scusate la domanda banale ma mi sto avvicinando ora a linux e non ho molto chiara la lettura dell'output del Grep.

sto cercando un determinato servizio su una macchina rh, utilizzando il comando ps -ef|grep "nome"

ma l'output che ricevo, cosa dovrebbe dirmi? come capisco se e' in esecuzione o meno?

[esr@rh ~]$ ps -ef|grep bof
was 23482 1 0 Jul16 ? 00:26:25 /was/product/was855nd/AppServer/java/bin/java -Declipse.security -Dwas.status.socket=39696 -Dosgi.install.area=/was/product/was855nd/AppServer -Dosgi.configuration.area=/was/product/was855nd/profiles/Custom02/servers/was_bof_man2/configuration -Djava.awt.headless=true -Dosgi.framework.extensions=com.ibm.cds,com.ibm.ws.eclipse.adaptors -Xshareclasses:name=webspherev85_1.6_64_%g,nonFatal -Xbootclasspath/p:/was/product/was855nd/AppServer/java/jre/lib/ibmorb.jar -classpath /was/product/was855nd/profiles/Custom02/properties:/was/product/was855nd/AppServer/properties:/was/product/was855nd/AppServer/lib/startup.jar:/was/product/was855nd/AppServer/lib/bootstrap.jar:/was/product/was855nd/AppServer/lib/jsf-nls.jar:/was/product/was855nd/AppServer/lib/lmproxy.jar:/was/product/was855nd/AppServer/lib/urlprotocols.jar:/was/product/was855nd/AppServer/deploytool/itp/batchboot.jar:/was/product/was855nd/AppServer/deploytool/itp/batch2.jar:/was/product/was855nd/AppServer/java/lib/tools.jar -Dibm.websphere.internalClassAccessMode=allow -Xms50m -Xmx256m -Xcompressedrefs -Xscmaxaot4M -Xscmx90M -Dws.ext.dirs=/was/product/was855nd/AppServer/java/lib:/was/product/was855nd/profiles/Custom02/classes:/was/product/was855nd/AppServer/classes:/was/product/was855nd/AppServer/lib:/was/product/was855nd/AppServer/installedChannels:/was/product/was855nd/AppServer/lib/ext:/was/product/was855nd/AppServer/web/help:/was/product/was855nd/AppServer/deploytool/itp/plugins/com.ibm.etools.ejbdeploy/runtime -Dderby.system.home=/was/product/was855nd/AppServer/derby -Dcom.ibm.itp.location=/was/product/was855nd/AppServer/bin -Djava.util.logging.configureByServer=true -Duser.install.root=/was/product/was855nd/profiles/Custom02 -Djava.ext.dirs=/was/product/was855nd/AppServer/tivoli/tam:/was/product/was855nd/AppServer/java/jre/lib/ext -Djavax.management.builder.initial=com.ibm.ws.management.PlatformMBeanServerBuilder -Dpython.cachedir=/was/product/was855nd/profiles/Custom02/temp/cachedir -Dwas.install.root=/was/product/was855nd/AppServer -Djava.util.logging.manager=com.ibm.ws.bootstrap.WsLogManager -Dserver.root=/was/product/was855nd/profiles/Custom02 -Dcom.ibm.security.jgss.debug=off -Dcom.ibm.security.krb5.Krb5Debug=off -Djava.library.path=/was/product/was855nd/AppServer/lib/native/linux/x86_64/:/was/product/was855nd/AppServer/lib/native/linux/x86_64/:/was/product/was855nd/AppServer/java/jre/lib/amd64/compressedrefs:/was/product/was855nd/AppServer/java/jre/lib/amd64:/was/product/was855nd/AppServer/lib/native/linux/x86_64/:/was/product/was855nd/AppServer/bin:/was/product/was855nd/AppServer/nulldllsdir:/usr/lib: -Djava.endorsed.dirs=/was/product/was855nd/AppServer/endorsed_apis:/was/product/was855nd/AppServer/java/jre/lib/endorsed -Djava.security.auth.login.config=/was/product/was855nd/profiles/Custom02/properties/wsjaas.conf -Djava.security.policy=/was/product/was855nd/profiles/Custom02/properties/server.policy com.ibm.wsspi.bootstrap.WSPreLauncher -nosplash -application com.ibm.ws.bootstrap.WSLauncher com.ibm.ws.runtime.WsServer /was/product/was855nd/profiles/Custom02/config cdprh64Cell01 cdprh65Node01 was_bof_man2
esr 31713 28630 0 08:24 pts/0 00:00:00 grep --color=auto bof

2 Risposte

  • Re: Lettura Grep

    Quando grep trova una corrispondenza ti stampa tutta la riga che la contiene.
    Il grep ha correttamente trovato "bof" in due linee dell'output di ps: in quella giaculatoria java (al fondo c'è "was_bof_man2") e nella riga del comando grep stesso.
    Poi, se quello sia il servizio "bof" che cerchi...
  • Re: Lettura Grep

    Grazie!
Devi accedere o registrarti per scrivere nel forum
2 risposte