How to use new cluster  'cl' commands from c/c++ code

Hi All
I need to invoke cluster commands from c/c++ code and parse the output to retrieve neccessary fields e.g status to be used in program.
e.g
#cluster status
I need to capture output and use it in c/c++ code.
Does any one have tried to use new cluster 'cl' commands from c/c++ code??
Thanks
Pandit

The output of the cl* commands is for human consumption and as such (as most administrative commands) the output is not considered stable, so it could change with a Patch, etc.
Instead you should use the cluster api to retreive the information you need.
The Sun Cluster Data Services Developer's Guide for Solaris OS (http://docs.sun.com/app/docs/doc/819-2972?a=expand) describes the various possibilities, including the C API.
Read especially http://docs.sun.com/app/docs/doc/819-2972/6n57ngitf?a=view for more details as which functions are available via the libdsdev. Each function has a specific manpage outlining the lib and includes needed as well es which information it offers.
In your example, you can use scha_resource_get() (3HA) in order to retrieve the status of a specific resource (http://docs.sun.com/app/docs/doc/819-3055/6n5a6lhnl?a=view).
Greets
Thorsten

Similar Messages

  • How to execute solaris lpd printing command from java code

    hi folk,
    I want to print a post script file on a network printer (my java code will receive the Printer's IP Address and the filename ) , i'm using the solaris lpd printing command :
    lpadmin -p banana_ps -o protocol=bsd,dest=IP -v /dev/null
    -m netstandard -T PS -I postscript
    my question is how execute this command from the java code :)
    i really appreciate ur advices

    Hi,
    See RunTime.getRuntime ().exec (...).
    Hope that help,
    Jack

  • How to use the DLLs which created from c++ in Java?

    And How to use the DLLs which created from JNI in C++?

    Huh?
    Are you asking how to do JNI - you should read the tutorial.
    Are you asking how to load it - then use System.loadLibrary()
    Are you asking what to do with the output from javah - put it in a C file and write some code, compile it into a dll.

  • How to Maintain the MM Master Data from one company code to other co code

    Hi Experts,
    Can any one pls tell me how to Maintain the MM Master Data from one company code to other co code.
    Presently we created New plants,New Purchase Orgs under different company code.
    1) Material Master data
    2) Vendor MAster data
    3) PIR
    4) Source List
    Is there any standard Transactions...??
    Please reply.
    Brgds,
    KK

    Hi
    Check out the link -
    http://wiki.sdn.sap.com/wiki/display/ABAP/StepstocreateasimpleLSMWusingbatchinput+recording
    lsmw for data migration for  xk01 transaction
    http://www.sap-img.com/general/lsmw-steps-for-data-migration.htm
    Regards
    Anand

  • How to use at last/ at end of in this code

    Hi,
    i want to do sum for each and every line item of the delivery quantity and compare it with final purchase order quantity if it is equal do not display in the output.(how to use at last/at end of ) in this code,
    below code wat i have ritten is only comparing first record with final purchase order quantity and displaying the output, but i want sum of every line item and compare with final quantity(purchase order quantity)
    if possible try modify this code
    clear:wa_final,wa_kopoo,wa_likpp1.
        loop at it_kopoo into wa_kopoo.
          move wa_kopoo-ebeln to wa_final-ebeln.
          move wa_kopoo-ebelp to wa_final-ebelp.
          move wa_kopoo-matnr to wa_final-matnr.
          move wa_kopoo-txz01 to wa_final-txz01.
          move wa_kopoo-menge to wa_final-menge.
          move wa_kopoo-meins to wa_final-meins.
          move wa_kopoo-werks to wa_final-werks.
          move wa_kopoo-matkl to wa_final-matkl.
          move wa_kopoo-reswk to wa_final-reswk.
          move wa_kopoo-aedat to wa_final-aedat.
          move wa_kopoo-ekgrp to wa_final-ekgrp.
          move wa_kopoo-EINDT to wa_final-EINDT.
        read table it_likpp1 into wa_likpp1 with key vgbel = wa_final-ebeln
                                                     vgpos = wa_final-ebelp.
          if sy-subrc eq 0.
            if wa_final-menge > wa_likpp1-LFIMG.
            else.
              continue.
            endif.
          endif.
          append wa_final to it_final.
          clear:wa_final,wa_kopoo,wa_likpp1.
        endloop.
      endif.

    Hi,
    Try this:
    define one more internal table it_final1 similar to i_final .
    CLEAR:wa_final,wa_kopoo,wa_likpp1.
    SORT it_kopoo BY ebeln ebelp.
    LOOP AT it_kopoo INTO wa_kopoo.
      move-corresponding wa_kopoo to wa_final.
      COLLECT wa_final INTO it_final1.
      CLEAR: wa_kopoo, wa_final.
    ENDLOOP.
    sort it_final1 by ebeln ebelp.
    LOOP AT it_final1 INTO wa_final.
      READ TABLE it_likpp1 INTO wa_likpp1 WITH KEY vgbel = wa_final-ebeln
                                                   vgpos = wa_final-ebelp.
      IF sy-subrc EQ 0.
        IF wa_final-menge NE wa_likpp1-lfimg.
          APPEND wa_final TO it_final.
        ENDIF.
      ENDIF.
    ENDLOOP.
    Regards,
    Subramanian

  • How do I pass an error status from my java code back to the Program Job Ser

    How do I pass an error status from my java code back to the Program Job Server?
    I have a jar program object that reports a scheduled status of "Success" even if the java code errors out.

    Exceptions thrown from the program object are ignored by the program job server.
    You need to configure the Program Object, then stream out a special string sequence to the stdout of the Program Object, to set the scheduled instance status to Failed.
    Look up SAP KBase  1201804 - How to programmatically set the status of a Program object to "Failed"
    Sincerely,
    Ted Ueda

  • Windows 2008 Cluster question on using a new cluster drive source from shrinking existing disk

    I have a two node Windows 2008 R2 enterprise SP1 cluster. It has a basic cluster setup of one (Q:)quorum disk and data disk (E:) which is 2.7tb is size. This cluster is connected to a shared Dell Disk array.
    My question is can I safely shrink the 2.7tb drive down and carve out a disk size of 500gb from the same disk and use for a new cluster disk resource. We want to install Globalscape SFTP software on this new disk for use as a cluster resource.
    Will this work without crashing the cluster.
    Thanks,
    Gonzolean

    Hi ,
    Thank you for posting your issue in the forum.
    I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.
    Thank you for your understanding and support.
    Best Regards,
    Andy Qi
    Andy Qi
    TechNet Community Support

  • HOW TO USE FUNCTION Deletion of Requests from the Change Log IN PRCSES CHAN

    Respected all
    i used Deletion of Requests from PSA from the prcess chain and found good results, now i have only one request at the psa and thus i am doing good space utililisation. but when i am using Deletion of Requests from the Change Log i am not getting any changes in the request of dso. kindly let me know how to use this 2nd function.
    thanks
    abhay

    Hi Mahodaya,
    As per SAp standards its good to delete the requestes that are no longer needed for the delta update and no longer used ffor inti from the change log table and the data is loaded already in to DSO.
    Goto RSPC
    Click on create New PC -> enter the PC name n long descp
    Next we need to define the start process for the PC.Maintain the start variant process.save n come back.
    for deletion of change log we have option in the Other BW Processes -> deletion of requestes from change log
    Once u select the option we get a dialoge box here we need to create the variant for the process enter the process variant n long descp. cick ok.
    Next in the maintenance screen for the deleting the request from change log table will appear.
    Enter the selection patterns to which the requestes should be deleted from the change log.
    In the maintenance screen, select one or more Data Store objects for which requests are to be deleted from the relevant change log tables under Data Store Object column and select theInfo Area of the corresponding Data Store Objects under Info Area
    If you select the first check box exclude selction pattern, this means that del of requests from change log table will be ignored.
    or
    We can delete the requests which are Older than N-number of days (or) date in the above screen. For this one, enter the number of days (or) date in the filed Older than .
    OR
    If we want to select the requests with a certain status then we can also do in the above screen. We can select the following status indicators from the above screen.
    Delete Successfully Updated Requests Only -This status will delete only requests which
    are successfully updated into corresponding Data Store objects.
    Delete Incorrect Requests that were not Updated - This status will delete only incorrect requests which are not successfully updated into the corresponding Data Store Objects.
    Delete Activation Requests only, No Load requests- This status will delete only the activation requests (requests that begin with ODSR_... ). No load requests are deleted.

  • How to use new patch updates in track

    Hi All,
    I am a developer working in NWDI. We have everything in place and working fine upto now.
    SAP has release a patch for the software component i am using in a track. Basis guys have updated the track and they confirmed the patch is updated successfully.
    Now when ever i rebuild my DC, the changes are not effected as per the new patch. Please let me how I will be able to use new patch updates in my DC(In NWDS I can see the old source code only, I did all SYNC's and refresh but didnt worked, even NWDI is restarted)
    How I can confirm that the patch is updated to track successfully, from a developer point of view.
    I have access to CMS and CBS.
    Regards,
    Sateesh Chandra

    Did you update your configuration in the studio?
    --MLS

  • How to use the repository; uploading reports from DEV to PROD...

    Hello...
    I'm fairly new to CR-XIr2 (SP3) but have worked with Crystal Reports since v6.0.  I'm trying to figure out how to create a dynamic parameter list that someone can select an item from, which will get sent as an input parameter to the SQL Server 2005 stored proc that populates the report.  I'm also trying to figure out if there's an easy way to copy reports from a DEV environment into PROD.  We have BOE.
    Basically, I would like to find out resources online or in books on how to use the BOE repository for dynamic and/or cascading parameters (i.e. pulling a list of text values & their associated IDs from a lookup table that won't be used in the report), images (i.e. corporate logo), etc..  What complicates things for us is that IT is now requiring us to use a DEV environmentit was really easy when we had unlimited access in PROD!  We also need to put together a process where reports & other repository objects that are copied from DEV to PROD access the correct db, etc.  (Crystal Report in DEV accesses DEV db/repository/etc.when copied to PROD it accesses PROD db/repository/etc.)
    Anyway, I'm just looking for info on where to begin--whether it be a book, a BO/SAP knowledge base article, in-class training from a specific company, etc.  Thanks!

    Hey Markian,
    Can you let me know the process you have followed to migrate from Dev to Prod.
    We can migrate all the reports and objects and database fields through migrate wizard where you can import all the objects, reports and database fields and users to production enterprise.
    Just follow the above scenario and let us know if you are facing any error.
    Try  publish the reports using import wizard and run it in the crystal designer.
    Regards,
    Naveen.

  • How to build a cluster array dynamically from another cluster array?

    I'm working on a problem where I seem to be getting lost in a sea of
    possibilities, none of which strikes me as optimum. Here's what I need to do.
    I've got an input array of clusters (ARR1). Each cluster contains the
    following components: an integer (INT1), a ring variable (RING1), a boolean
    (BOOL1) and a cluster which itself is simply a bunch of ring variables
    (CLUST1) Now, I need to transform that into a set of clusters (CLUST3) each of
    which contains an array of characters (CHARARY2), a copy of the ring variable
    (RING2), a copy of the boolean variable (BOOL2) and a copy of the cluster
    (CLUST2).
    To build the CLUST3, I need to find all elements within ARR1 that have the
    same unique combination of RING1 and BOOL1, and if BOOL1 is True, then RING1
    in addition, build an array of all the INT1 values corresponding to each
    unique combination above converted to character, and then bundle this array
    plus the unique combination of the other variables into a new cluster. In
    general I could have several such clusters.
    So if I had the following array to start with:
    Index INT1 RING1 BOOL1 CLUST1
    0 3 1 F {Values1}
    1 2 1 T {Values2}
    2 4 0 F {Values1}
    3 6 0 F {Values3}
    4 1 2 T {Values2}
    5 4 2 T {Values2}
    6 3 0 T {Values3}
    7 4 2 T {Values3}
    I should end up with the following clusters:
    CHARARY2 RING2 BOOL1 CLUST1
    "3" 1 F Don't care
    "2" 1 T {Values2}
    "4","6" 0 F Don't care
    "1","4" 2 T {Values2}
    "3" 0 T {Values3}
    "4" 2 T {Values3}
    What methods would you suggest for accomplishing this easily and efficiently?
    Alex Rast
    [email protected]
    [email protected]

    Tedious but not conceptually difficult.
    ARR1 goes into a for loop, auto indexed on the FOR loop. The for loop has a
    shift register which will be used to build the output array. Nested within
    the for loop is another for loop, which the shift register array goes into,
    again auto indexed, along with the element that has been auto-indexed from
    ARR1. This for loop has a shift register, initialised with a boolean "true".
    The inner loop compares the current element of ARR1 with the output array
    and if an element in the output array is already present which matches the
    input by your criteria, then the boolean register is set false; otherwise it
    is left alone.
    After the nested FOR loop you have a case fed from the boolean shift
    register; if the boolean is true, the new element is unique and should be
    added to the array. If it is false then a previous element has been found
    making the present one redundant, and the array should be passed through
    without adding the element.
    In the true case, you simply unbundle the original element into its
    components and build the new element, using "build array".
    Notes for if the above is easy for you;
    1) if handling lots of data then pre-initialise the shift register of your
    outer loop with the same number of elements as your input array. Use
    "Replace Array Subset" instead of "Build Array" to insert the current
    element into the pre-allocated memory rather than having to create a new
    array and copy all the current data across, which is what "Build Array" is
    doing. Use "Array Subset" at the end to obtain a new array containing just
    the elements you've used, removing the unused ones at the end.
    2) Again for large datasets- the use of a while loop instead of the inner
    for loop is more efficient since you can halt the while loop as soon as a
    duplicate is found. With the described approach you have to go through the
    whole array even if the first element turns out to be a duplicate- much
    wasted computer time.
    Alex Rast wrote in message
    news:[email protected]...
    > I'm working on a problem where I seem to be getting lost in a sea of
    > possibilities, none of which strikes me as optimum. Here's what I need to
    do.
    >
    > I've got an input array of clusters (ARR1). Each cluster contains the
    > following components: an integer (INT1), a ring variable (RING1), a
    boolean
    > (BOOL1) and a cluster which itself is simply a bunch of ring variables
    > (CLUST1) Now, I need to transform that into a set of clusters (CLUST3)
    each of
    > which contains an array of characters (CHARARY2), a copy of the ring
    variable
    > (RING2), a copy of the boolean variable (BOOL2) and a copy of the cluster
    > (CLUST2).
    >
    > To build the CLUST3, I need to find all elements within ARR1 that have the
    > same unique combination of RING1 and BOOL1, and if BOOL1 is True, then
    RING1
    > in addition, build an array of all the INT1 values corresponding to each
    > unique combination above converted to character, and then bundle this
    array
    > plus the unique combination of the other variables into a new cluster. In
    > general I could have several such clusters.
    >
    > So if I had the following array to start with:
    >
    > Index INT1 RING1 BOOL1 CLUST1
    > ---------------------------------------------------
    > 0 3 1 F {Values1}
    > 1 2 1 T {Values2}
    > 2 4 0 F {Values1}
    > 3 6 0 F {Values3}
    > 4 1 2 T {Values2}
    > 5 4 2 T {Values2}
    > 6 3 0 T {Values3}
    > 7 4 2 T {Values3}
    >
    > I should end up with the following clusters:
    >
    > CHARARY2 RING2 BOOL1 CLUST1
    > -----------------------------------------------------
    > "3" 1 F Don't care
    > "2" 1 T {Values2}
    > "4","6" 0 F Don't care
    > "1","4" 2 T {Values2}
    > "3" 0 T {Values3}
    > "4" 2 T {Values3}
    >
    > What methods would you suggest for accomplishing this easily and
    efficiently?
    >
    > Alex Rast
    > [email protected]
    > [email protected]

  • How to use new page in smartforms

    hello friends,
                       i am using a smartform in which i have created a new page(page 2) ,in my page1 i have made next page as page2 ,but in page2 i cant make next page as page2 bocz page2 does not have main window,so in page2 i have made next page as page1 only.
    im not gettin any errors,but only page1 is been displayed,no page2 is displayed,can any1 pls tell me how to use an additional page in a smartform

    hi Siddhesh,
    there is simple method to do so.
    1. Your first page say 'PAGE_1' 'with main window is ready. This page points  
        to say 'PAGE_2' as next page. till here its ok.
    2. Now on second page i.e 'PAGE_2'  do the following.
            a. Copy main windown from 'PAGE_1' ( select node 'PAGE_1 -> right click -
                 -->copy ')
            b. Paste the same main window in 'PAGE_2' ( select node 'PAGE_2' -> right
                click -> paste).
            c. Set next page for 'PAGE_2' as 'PAGE_2'. (SAP will allow this)..
    Thats it u r done.... save activate and test... now your main window on page 1 is filled .. it will display content on page 2 and then on page 3 which is of type page 2...because for page 2 we have set next page as page 2..
    Hope this helps you..
    Let us know if u have any problem...
    Enjoy SAP.
    Pankaj Singh.

  • How to use -open option at command prompt

    Can someone update me with how to use -open option while launching javaws from command prompt. Sun documnetation (http://java.sun.com/javase/6/docs/technotes/tools/share/javaws.html#runoptions) is not very clear.
    I am trying to do something like this
    javaws -open prop1 firstName prop2 lastName http://myapp.jnlp
    However the above does not work. It says incorrect argument firstName.
    Cheers
    Amit

    The syntax as present in JWS documentation
    javaws [run-options] <jnlp>
    [run-options] Command-line run-options. run-options may be in any order. For a discussion of the various run-options, see RUN-OPTIONS below.
    <jnlp> This can be either the path of, or the Uniform Resource Locater (URL) of the JNLP (Java Network Launching Protocol) file.

  • How to use back to my mac from iOS?

    I have enabled back to my mac on my macbook running ML and have enabled the same for my user ID in the airport express router to which the macbook pro is connected.
    i would like t know how i can access the shared folder from my ios devices while
    within the wifi network
    outside the wifi network over the ios devices 3g internet.
    tried a lot to figure it out since many months now.
    Neerav

    Just some additional info.  For basic back to my mac to work you need a router (any brand) that supports UPNP or NAT-PMP - or an apple airport router device (Airport Extreme, Time Capsule or Airport Express) (which must be configured as your primary router - and not in "bridge" mode).  You need at least two Macs - one in your house - and one as the remote device.  You need to set up your iCloud id on both Macs and enable Back to My Mac in iCloud preferences - using the same icloud id for both Macs.  You also need to ensure that you have enabled at least "Screen Sharing" in the sharing preferences of both Macs - and optionally enable File Sharing.  You will see the Mac in the other Mac's shared pane - in Finder - both locally and remotely.
    If you are using an Apple router (airport extreme, express or time capsule) - the icloud id's that you enter on airport device (via airport utility) - are only for the purpose of remote sharing of drives and printers attached to that airport device - and are not related to the back to my mac functionality.  If you don't need to remote share the printers or drives directly attached to the airport device (via USB) - then you do not need to enter any iCloud id's on the airport device itself.
    For example - you have a time capsule set up as a router.  You have 3 people in your house that want to remotely access files on the Time Capsule's drive(s).  You would enter your iCloud id, along with the iCloud id's of other household members.  You would then all be able to independently share the time capsule drive remotely.
    With an Airport Express router - you would only be able to share a USB printer attached to the Airport Express.
    As for iPad - there may be 3rd party apps that would mimic the Back to My Mac functionality - but to the best of my knowledge there is no Apple-provided Back to My Mac app for the iPad.

  • How to use sda6810 to receive data from a rs485 channel?

    I want to use sda6810 to anlyze data from a rs485 bus. So I use Labview to progame the sda6810 with the drivers.Firstly,I intilite the card,then I cofigued an channel to send data from a buffer,and configued another channel to receive data from the first chanel . But unfortunatly the data I received was not equal to the data I sended.And there are not any error messages indicated in Labview
    And when I try to use the GP channel,I found it worked properly.please tell me how I can solve the problem?

    I really apreciate your help.You told me that
    I should use the exameples which shipped with sda driver firstly. I do used them,and it worked correctly.So I think the connections was being setup properly.And I
    used labview to progame the rs485 channel
    . It do received something .But it was incorrect.
    I would be grateful if you could send me an
    example writted by labview,or you could tell
    me you e-mail address.
    Here is my code .
    Attachments:
    youyou2.zip ‏110 KB

Maybe you are looking for

  • Verizon edge

    I signed a contract May 2014 at this time I didn't know about the verizon edge plan or offered it I found out about it the other day when a family member came over and mentioned it to me  and told me all about it and how less expensive it is I'm want

  • Screen getting skuffed up

    I got a white Nano the day they came out and I love it. But the little screen is getting so scratched up that I'm afraid in a year or so it will be blurry. I don't have anything else in my front left pocket where I keep it, except the ear buds. I did

  • MDMP & Unicode: splitting data load according to the source codepage

    Hi, does anybody of you implemeted this solution from SAP descriped in HowTo-Guide "SAP BW Unicode with an MDMP Source System"? We have an MDMP source system (4.6C) and a Unicode BW (Netweaver 2004s). I have maintained the RFC connection in BW (no lo

  • Video Structure..How to get Frame i? help...

    standard video coding made by a Group of Picture(GOP), GOP it self made by few kind of frame/picture. Frame i, Frame p, Frame B, dan Frame D. Frame i is a frame that decode without any reference to another picture, this is the first frame in GOP.All

  • Premiere Pro CS5 Compatibility with Sony DSR-25 Deck

    I have recently upgraded my computer to support cs5.  I have a PNY Nvidia Quadro 2000 graphics card, 8 gb ram, an Intel Xeon 5150 processor and Windows 7 Professional 64-bit.  My issue comes with running this system connected via firewire to a Sony D