Determining service existence

I'm currently writing a module for Cfengine to enable and disable services via SMF. However, a particular service isn't necessarily installed on every system (e.g. we don't install CDE on servers so services like "cde-login" won't exist). Is there a recommended way to test for the existence of a service prior to manipulating it?
I'm currently using "svcprop -q <service>" and testing the exit status, but I'm not sure this is robust since a non-zero exit code could occur on other fatal errors.
Cheers,
Ade

Thanks, but what I actually need is the ability in a script to ask "does service instance foo exist?" and get a yes or no answer, preferably via a robust exit code. svcprop would appear to give me yes or no/error. I'd rather do this without receiving unwanted messages on stderr ("pattern 'foo' doesn't match any instances") or grepping the output of a list command.
Ade

Similar Messages

  • Determining service name and operation name in handler

    Hello.
    Is there a way to determine the name of the web service and the name of operation being invoked from inside the JAX-RPC handler class?
    By the name of the web service I mean the name that was used in its deployment descriptor file.
    With axis, I was able to determine service name using 'MessageContext.getTargetService()' and 'MessageContext.getOperation()' .
    are there similar ones in weblogic?

    Using Weblogic v8.1 I was also able to get the port and operation via DefaultMessageContext. However, this no longer works on WebLogic v9.0.
    Any idea how to do this in v9? I think I have the Operation Name by using another undocumented API:
    weblogic.wsee.ws.server.OperationName (it's a property in the MessageContext). There's also an EndpointReference class that has 'portName' and 'serviceName' but for my server these are always null??
    Any ideas?

  • How to determine Service Tax in sales order

    Dear Guru's
    What all the configuration setting that are required for determine the Service Tax in the sales order for service Item we are using Tax procedure for India u2013 TAXINN.
    Regards,
    Bhanu

    Following SAP Notes to be referred for Service Tax:
    1.     778976 u2013 Service Tax and Ecess on Service Tax
    2.     1032265 - SEcess on Service Tax
    Regards
    AK

  • Determining service level offer for delivery date based on customer/materi

    Hi,
    we operate R/3 4.7 enterprise and are looking at a new requirement to present a service level offer at time of sales order input va01, drvin by customer number or group and the material number... For example customer 123456 orders two materials, ABC, ZXC... ABC has a proposed delivery date of today +2 while ZXC has +5 days, this would populate the "first date" ETDAT and then if not available schedule lines would be based on ATP scope of check. To further explain a second customer 654321 orders the same two materials, ABC and ZXC but this customer has a service level of today +4 days for ABC and +10 days for ZXC... I do not recollect in my experience such functionality in standard sap, perhaps with CRM? OR ABAP user exit?
    Appreciate your thoughts and direction, perhaps siome one has developed a similar scenario or knows with greater experience that the solution is not in standard R3 4.7...
    Thanks and look forward to your thoughts...
    Craig

    Hi,
    When u creates sales order, system reserve material in c u r case
    ABC = Today + 2 days
    xyz = today + 5 days
    Now another order come for same material then system automatically gives u next date if material is not availabe
    ABC = Today + 4 days
    XYZ = Today + 10 days
    But if u have stock then this will not give u further dates,it will confirm as early as possible.
    Kapil

  • Determine Service Name in SQL+

    I am trying to connect to a different database, on a different server. From what I understand, I need to know the service name. And the service name is made up of databasename.domain.
    I can log into both databases in SQL+...but all I have to enter is the ID, Password, and Database. How can I figure out the domain/service name of the database using SQL+?

    google tom kyte for this and he might have a solution for your need.
    ben

  • [SOLVED] Determine the existence of REGEXP_LIKE in current Oracle version

    Hi,
    My customers can potentially use any version of Oracle, from 9i and up. I'd like to find out if REGEXP_LIKE exists in the version that I'm on, dynamically. It was introduced in 10g.
    This will enable me to tailor my SQL query, which will or will not use REGEXP_LIKE.
    Does anyone know of a query that'll tell me if REGEXP_LIKE is implemented?
    Thanks,
    Chris.

    Or in worst case (if above doesn't work for some reason), just run it:
    declare
       e   exception;
       pragma exception_init (e, -904);
    begin
       execute immediate 'select regexp_substr(1,1,1) from dual';
       do_some_stuff ();
    exception
       when e
       then
          do_some_stuff_when regexp_does_not_exist ();
    end;

  • Service ORG determination based on partner function

    Hi
    Pls let me know - How to tell from the config which partner function from a transaction say case or complaint, is being used to determine the service ORG unit at the header level of the transaction?
    Also
    Suppose I have 2 partner functions
    1. A - std partner function - rule = "User"
    2. B - custom partner function - rule = "User"
    Which one will the system use?
    Thanks

    Hi,
    You need to define Partner Determination Procedure (PDP) where u r partner function should have 004USER as access sequence, then u can use "User orgunit" rule in org detemination rule to determine service ORG unit at the header level of the transaction.
    If u have define more than one partner function as user in u r transaction system will set the same user in both place on the basis of u r PDP.
    Hope it'll help u.
    Regards,
    Dipesh.
    Edited by: DD's on Nov 11, 2008 6:27 AM

  • Service Category determination for Service Tax report

    Hi All,
    We have applied the SP18 at our client's place in which a new node of Service Tax has been introduced in IMG under Logistics. We would like to configure the Service Category under it.
    Suppose the access sequence is maintained as (any suitable) :
    Vendor + GL Acc + Tax code + Serv. Catg.
    GL Acc + Tax code + Serv. Catg.
    Vendor + Tax code + Serv. Catg.
    Tax code + Serv. Catg.
    We would like to know what is the significance of GL Acct. here. If anyone has used this configuration, kindly help us to understand.
    Also, suppose the existing service tax codes are Plant dependant then how do we map this scenario for determining Service Tax Category.
    Thanks & Regards,
    JND

    Hi Manfred,
    I don't know about "Ship-to arty" use in contract determination. AFAIK Sold2-Party, Sales and Service Organization, status of the Service Contract (released), Start and End date and the object list are responsible for the Contract determination. Hence if I'm not wrong a sold2-party must be provided.
    There is the CRM_SERVICE_CONTRACT Badi and what we did in our process is to use the Event framework to ensure a contract redetermination after change of the sold2-party. Take a look at CRM_SEARCH_SERV_CONTRACTS_EC for ideas in that direction.
    Regards,
    Hendrik

  • Service Requests Open 5 days?/Service Requests Open and Closed Today

    Help!
    How would I determine service requests open greater then 5 days, I use the # of Open SR's but cannot seem to get a date to work.
    Also what is the best way to count the SR's open and closed on the same day?
    Thanks in advance.

    You need to include a TIMESTAMPDIFF function in your filter... something to the effect of
    TIMESTAMPDIFF(SQL_TSI_DAY,"Service Request"."Create Date",CURRENT_DATE) > 5
    Double check the column reference.
    Mike L

  • Error when adding BI XMLA service as a web service in Visual Studio

    I have Visual Studio 2003 and I am trying to add the XMLA web service via a URL using Add Web reference.
    Visual Studio is able to locate the service and methods but I also  get the following error message. Can anyone help with this issue. Thanks in advance for your assistance.
    message in left panel indicates it found the methods
    "MsXmlAnalysis" Description
    Methods
    Discover ( RequestType As string ,  Restrictions As ,  Properties As )
    Execute ( Command As ,  Properties As PropertiesType )
    actual error message in right panel
    There was an error downloading 'http://bid01.citus.sharp.com:8000/sap/bw/xml/soap/xmla?sap-client=100'.
    The request failed with the error message:
    Moved Temporarily !DOCTYPE html PUBLIC"-//W3C//DTD HTML 4.01Transitional//EN"

    Hi,
    Thanks for posting here.
    Upgrading Web and Business Databases
    Upgrading Web or Business databases to a new service tier/performance level does not take the database offline. The database will continue to work through the upgrade operation. At the time of the actual transition to the new performance level temporary
    dropping of the connections to the database can happen for a very small duration (typically measured in seconds). If an application has transient fault handling for connection terminations then it is sufficient to protect against dropped connections at the
    end of the upgrade.
    Upgrading a Web or Business database to a new service tier involves the following steps:
    Determine service tier based on feature capability
    Determine an acceptable performance level based on historical resource usage
    Why does existing performance for my Web or Business database map to the higher Premium levels?
    Tuning your workload to fit a lower performance level
    Upgrade to the new service tier/performance level
    Monitor the upgrade to the new service tier/performance level
    Monitor the database after the upgrade
    Refer:
    http://azure.microsoft.com/en-us/documentation/articles/sql-database-upgrade-new-service-tiers/
    https://msdn.microsoft.com/en-us/library/azure/dn741336.aspx
    Hope this helps you.
    Girish Prajwal

  • Excise report ER1 and Service Tax report SC-3

    Dear Gurus,
    I want to know the following things from the transaction code J2IER1 and J2IC
    In transaction code J2IER1, their is one radio button, Details of other payments made. What does it stands for?
    In transaction code J2IC, what are the prerequisite for Service Tax SC-3 return.
    Waiting for your valuable reply.
    Thanks & regards,
    Vinayak Vaidya

    The J2IER1 - Other Payments Made tab is there only for the format sake.  This only complies to the legal requirement of ER1 return.  However, no values are filled into this column in SAP from anywhere.  This section is essentially meant for filling up the details of payments other than the Excise remittances (like penalties, interest etc.) for the Excise Department.  If you have paid any, you can take a print out of this format when you generate ER1 from SAP and fill the details manually.
    As for ST-3 returns, it is still not available in a fullfledged manner.  You can refer the following note.
    Note 1393534 - Service Category determination & Service tax returns (ST3)
    This is essentially to support the Annual Return submission process for Service Tax.
    Ravi.

  • Service tax report

    HI
    is there any report for Service tax, how much i ve paid to vendor, how much i have collected from customer...............how much difference i have to pay goverment.
    2. i want to see opening , debit, credit, closing balance of service tax.
    Regard
    Nabil

    HI
    check following link and sap note also
    [SAP Note 1393534 - Service Category determination & Service tax returns (ST3)]
    SAP Note 1391485 - Outbound Excise Invoice enhancements
    for Service Tax(ST)
    [http://wiki.sdn.sap.com/wiki/display/SI/ServiceTaxCreditandUtilization.]
    Regards
    Kailas Ugale

  • Error activating logical port for service group

    Hi,
    I reconfigured the Starter Services because I changed the backend.
    It all worked fine, but in SOAMANAGER it throws an error when trying to activate logical ports for service group /IWCNT/BPC_SERVICE_GROUP (error is thrown for all 4 service groups he wants to activate)
    Configuration of proxy '/IWCNT/CO_BPC_CONT_BYID_QR_OB' failed
        Failed to create logical port for local shortcut.
             Service group '/IWCNT/BPC_SERVICE_GROUP' is not assigned to the own business system.
                Failed to create a logical port using Service Registry.
                    Use profile name = 'SAPLOGONPROFILE' version = '4'
                          Failed to create a logical port for inbound interfaceCustomerERPRelationshipContactPersonByIDAndContact'            'http://sap.com/xi/APPL/SE/Global'
                                 UDDI error: No Primary Services Registry maintained in this System.
    I checked:
    1. The provider system name
    2. WSIL works fine
    3. The profiles used are the same
    If i take a deeper look at the service groups there where no logical ports created.
    Thank you
    Regards
    Pit

    Hi Alex,
    I followed the steps mentioned in the guide (3.3.2) but it didn´t work at all.
    The services uses all the same profile. The profile is importet in the SCL.
    When I process the pending tasks this massages shown up:
      Failed to create a logical port using WSIL (This step is red)
      Use profile name = 'SAPLOGONPROFILE' version = '4'  (This step is OK = green)
      Target WSIL type SAP_6.40  (This step is OK = green)
      Failed to create a logical port for inbound interface 'CustomerERPRelationshipContactPersonUpdateRequestC' 'http://sap.com/xi/APPL/Global2'  (This step is red)
       Could not determine service using WSIL query  (This step is red)
    Is it normal that on the SCL, in the Business Scenario Configuration there are no entries in the Service Definitions for the Duet_Starter_Service_All scenario.
    Regards

  • View of organizational unit in Service request

    Hi everyone,
    In our service request, we are trying to visualise all the organizational unit (of the organization model) of a BP.
    We achieve to see the direct service group where the BP is assigned but we are trying to see more of the link to the organizational model.
    For example : our organizational model looks like this:
    For user AJAUSSAUD1, I can see the direct link to PSE Equiment in my service request (this is determined in the partner schema determination)
    However, we would like to be able to see MC1 (here 3 level above) in the service request.
    We are using service organization as function and all the organizational unit are determined as service organization as we are using it to authorizations access.
    Does anyone know if there is a way to see the link with all the organizational unit of a user in a service request?
    Would it be with the attribute available in the ppoma-crm, but how to add the field and make them available in the service request view?
    Thank you,
    Regards,
    Anaïs

    Hello Anais,
    As far as I know, there is no standard way to view an organizational hierarchy in a service request. You will need to do some developments. There are two options -
    1. If you want the 3 org levels to be stored in data base table for future reference and reporting
    You can add 3 fields in ORGMAN sub object using AET. This will add the fields to table CRMD_ORGMAN. After org determination has happened in your service request, you can use BAdi - CRM_ORGMAN_BADI, methd - CRM_ORGMAN_MERGE to fill values of these 3 org levels. You have to recursively use functions or query table HRP1001 to get the parent of determined service org and then its parent and so on.
    Remember once these 3 fields are added at database level, they are available for all transaction types of one order. These fields can be made available to BW queues also at time of adding them.
    2. If you do not want the 3 org levels to be stored in data base table
    This would mean you only want these fields for display to end user.
    Add 3 model nodes in the web ui component. In the getter method of 1st field, add select query or call function to get parent of determined service org. Similarly for other 2 fields.
    Hope this will help. Maybe you also get some different suggestion from other guys.
    Regards,
    Niraj

  • No Ranges for Org Determination

    Hi Gurus,
    I have to configured Org Structure in CRM. There is no integration of CRM with ECC is required. Therefore i have defined simple Org Structure in CRM.
    Now, i want to assign specific no ranges to my Org Units w/out any specific partner number. How i can customize it .
    Please guide.

    Dear Arden,
    Thanks fr reply
    i have configured and tested for Sales Organization Determination Successfully. But i hve following concerns in which i required guidance:
    1. For Service Org Determination i use Service Org in Functional Tab and Partner No as Attributes. Even in Transaction Type Configuration i use Org.Profile Data which has created on Service Scenario. But when i am going to create particular Transactions it is automatically determine Service Org but given an  error of Sales Org, DC and DIV determination. Why ?
    2. How Marketing Org can be determined. Determination of Marketing org is necessary or not.
    3. How Interaction Center can be cater into Org.Structure.
    Thanks

Maybe you are looking for