Loading ...
Sorry, an error occurred while loading the content.

Re: question regarding distribution agent

Expand Messages
  • James Blanding
    I was thinking about the suspend/resume commands. I tried them out in our QA environment, PT 8.42.09. Placing the DSTQ queue in Suspend status ( suspend -q
    Message 1 of 9 , Mar 15, 2004
    • 0 Attachment
      I was thinking about the suspend/resume commands. I tried them out in
      our QA environment, PT 8.42.09. Placing the DSTQ queue in Suspend
      status ('suspend -q DSTQ' in tmadmin) caused the new process to
      effectively become stuck in "Posting" status in Process Monitor. The
      'printservice' command in tmadmin does list a service named
      "PostReport", which has a status of "SUSP":

      After resuming the DSTQ queue ('resume -q DSTQ'), the process remained
      in "Posting" status for several minutes, and then it finally got
      around to posting its files. There was 10 minutes between the time
      the process ran and the time it posted its reports. Perhaps it checks
      every so often to see if the PostReport service is available again.

      Obviously suspending the Distribution Agent in this way will prevent
      *all* processes run on that Process Scheduler from posting their files
      to the Report Repository. Maybe that's not what you're looking for...

      Also, using 'shutdown' instead of 'suspend' seemed to produce
      identical results. Not sure if there's any advantage to either method.

      --James

      --- In psftdba@yahoogroups.com, "David Kurtz" <david.kurtz@g...> wrote:
      > You can unadvertise a tuxedo service in tmadmin. However, if the
      service is
      > not available anywhere it doesn't queue up, you get an error message. I
      > don't think that the distribution agent responds to a service
      request. I
      > think it polls one of the PS_CDM tables (from memory PS_CDM_LIST).
      >
      > The process scheduler and distribution agents are now Tuxedo server
      > processes. You could write a tmadmin script to connect to the bulletin
      > board of the process scheduler domain and shutdown or startup the
      specific
      > agent process. But that will shut down the whole agent.
      >
      > You might be able to manipulate the status on the relavent tables to
      control
      > when the files are posted, but I have never looked into this.
      >
      > _________________________
      > David Kurtz
      > Go-Faster Consultancy Ltd.
      > tel: +44 (0)7771 760660
      > fax: +44 (0)7092 348865
      > mailto:david.kurtz@g...
      > web: www.go-faster.co.uk
      > PeopleSoft DBA Forum: http://groups.yahoo.com/group/psftdba
      >
      > -----Original Message-----
      > From: James Blanding [mailto:stoneandkobi@y...]
      > Sent: 11 March 2004 18:57
      > To: psftdba@yahoogroups.com
      > Subject: PeopleSoft DBA Forum Re: question regarding distribution agent
      >
      >
      > What tools release are you on?
      >
      > In 8.4, there is a page/panel that allows you to define operation
      > times for each Process Scheduler, but I believe it applies to the
      > entire Process Scheduler as opposed to just the Distribution Agent.
      >
      > However, BEA's documentation for Tuxedo suggests there is a way to
      > suspend a particular service using the tmadmin command. If that
      > function worked, you could probably write a script (at the operating
      > system level) to call the appropriate command(s) as needed. This
      > would not likely be supported by PSoft though.
      >
      > All the Tuxedo docs are available on BEA's website:
      http://edocs.bea.com/
      >
      > HTH,
      >
      > --James
      >
      > --- In psftdba@yahoogroups.com, Joan Hsieh <joan.hsieh@t...> wrote:
      > > Hi,
      > >
      > > I came up a question, is there anyway to hold the distribution node
      > > agent for one hour or so to deleted the output report from the log
      > > directory and then move it to distribution repository creating
      directory
      > > (usually with date as dir. name)over there with all number as
      > > subdirectory ? The reason is developer need some time to email the
      > > output before it get deleted, once it move to repository, it is
      > > difficult to determine which output is which.
      > >
      > > Thanks,
      > >
      > > Joan
      >
      >
      >
      >
      >
      > The PeopleSoft DBA Forum is managed by Go-Faster Consultancy Ltd.
      > http://www.go-faster.co.uk
      > Yahoo! Groups Links
    • Henry Poras
      James, I don t have an available test environment at the moment so I can t check this out myself. I looked at the BEA docs and have a couple of questions.
      Message 2 of 9 , Mar 16, 2004
      • 0 Attachment
        James,

        I don't have an available test environment at the moment so I can't
        check this out myself. I looked at the BEA docs and have a couple of
        questions. According to the documentation, 'suspend -q' will suspend
        all services advertised on the queue. "When a service is suspended,
        the offering server will no longer be selected as a candidate server
        for that service...Queued requests for the suspended service are
        processed until the queue is drained."

        This sounds like reports that are already on the queue will be
        Posted, while newly generated reports won't be queued.

        Is that what you see?

        Of course if new reports can't be queued in DSTQ they are not
        necessarily lost, they may just pile up in another server queue.
        Don't know. Also, what would happen if a service called from the DSTQ
        queue does some stuff and then puts the transaction back in the DSTQ
        queue? The queue is drained, but can't be accessed again until
        unsuspended. As I said, I have no way to check this out at the
        moment. Just curious.

        Henry

        --- In psftdba@yahoogroups.com, "James Blanding" <stoneandkobi@y...>
        wrote:
        > I was thinking about the suspend/resume commands. I tried them out
        in
        > our QA environment, PT 8.42.09. Placing the DSTQ queue in Suspend
        > status ('suspend -q DSTQ' in tmadmin) caused the new process to
        > effectively become stuck in "Posting" status in Process Monitor.
        The
        > 'printservice' command in tmadmin does list a service named
        > "PostReport", which has a status of "SUSP":
        >
        > After resuming the DSTQ queue ('resume -q DSTQ'), the process
        remained
        > in "Posting" status for several minutes, and then it finally got
        > around to posting its files. There was 10 minutes between the time
        > the process ran and the time it posted its reports. Perhaps it
        checks
        > every so often to see if the PostReport service is available again.
        >
        > Obviously suspending the Distribution Agent in this way will prevent
        > *all* processes run on that Process Scheduler from posting their
        files
        > to the Report Repository. Maybe that's not what you're looking
        for...
        >
        > Also, using 'shutdown' instead of 'suspend' seemed to produce
        > identical results. Not sure if there's any advantage to either
        method.
        >
        > --James
        >
        > --- In psftdba@yahoogroups.com, "David Kurtz" <david.kurtz@g...>
        wrote:
        > > You can unadvertise a tuxedo service in tmadmin. However, if the
        > service is
        > > not available anywhere it doesn't queue up, you get an error
        message. I
        > > don't think that the distribution agent responds to a service
        > request. I
        > > think it polls one of the PS_CDM tables (from memory PS_CDM_LIST).
        > >
        > > The process scheduler and distribution agents are now Tuxedo
        server
        > > processes. You could write a tmadmin script to connect to the
        bulletin
        > > board of the process scheduler domain and shutdown or startup the
        > specific
        > > agent process. But that will shut down the whole agent.
        > >
        > > You might be able to manipulate the status on the relavent tables
        to
        > control
        > > when the files are posted, but I have never looked into this.
        > >
        > > _________________________
        > > David Kurtz
        > > Go-Faster Consultancy Ltd.
        > > tel: +44 (0)7771 760660
        > > fax: +44 (0)7092 348865
        > > mailto:david.kurtz@g...
        > > web: www.go-faster.co.uk
        > > PeopleSoft DBA Forum: http://groups.yahoo.com/group/psftdba
        > >
        > > -----Original Message-----
        > > From: James Blanding [mailto:stoneandkobi@y...]
        > > Sent: 11 March 2004 18:57
        > > To: psftdba@yahoogroups.com
        > > Subject: PeopleSoft DBA Forum Re: question regarding distribution
        agent
        > >
        > >
        > > What tools release are you on?
        > >
        > > In 8.4, there is a page/panel that allows you to define operation
        > > times for each Process Scheduler, but I believe it applies to the
        > > entire Process Scheduler as opposed to just the Distribution
        Agent.
        > >
        > > However, BEA's documentation for Tuxedo suggests there is a way to
        > > suspend a particular service using the tmadmin command. If that
        > > function worked, you could probably write a script (at the
        operating
        > > system level) to call the appropriate command(s) as needed. This
        > > would not likely be supported by PSoft though.
        > >
        > > All the Tuxedo docs are available on BEA's website:
        > http://edocs.bea.com/
        > >
        > > HTH,
        > >
        > > --James
        > >
        > > --- In psftdba@yahoogroups.com, Joan Hsieh <joan.hsieh@t...>
        wrote:
        > > > Hi,
        > > >
        > > > I came up a question, is there anyway to hold the distribution
        node
        > > > agent for one hour or so to deleted the output report from the
        log
        > > > directory and then move it to distribution repository creating
        > directory
        > > > (usually with date as dir. name)over there with all number as
        > > > subdirectory ? The reason is developer need some time to email
        the
        > > > output before it get deleted, once it move to repository, it is
        > > > difficult to determine which output is which.
        > > >
        > > > Thanks,
        > > >
        > > > Joan
        > >
        > >
        > >
        > >
        > >
        > > The PeopleSoft DBA Forum is managed by Go-Faster Consultancy Ltd.
        > > http://www.go-faster.co.uk
        > > Yahoo! Groups Links
      • Joan Hsieh
        Thanks all, I don t have an test environment either to test that out. But I am curious to know how to make it automated and not manually run each time in the
        Message 3 of 9 , Mar 16, 2004
        • 0 Attachment
          Thanks all, I don't have an test environment either to test that out.
          But I am curious to know how to make it automated and not manually run
          each time in the command?

          Joan

          Henry Poras wrote:
          >
          > James,
          >
          > I don't have an available test environment at the moment so I can't
          > check this out myself. I looked at the BEA docs and have a couple of
          > questions. According to the documentation, 'suspend -q' will suspend
          > all services advertised on the queue. "When a service is suspended,
          > the offering server will no longer be selected as a candidate server
          > for that service...Queued requests for the suspended service are
          > processed until the queue is drained."
          >
          > This sounds like reports that are already on the queue will be
          > Posted, while newly generated reports won't be queued.
          >
          > Is that what you see?
          >
          > Of course if new reports can't be queued in DSTQ they are not
          > necessarily lost, they may just pile up in another server queue.
          > Don't know. Also, what would happen if a service called from the DSTQ
          > queue does some stuff and then puts the transaction back in the DSTQ
          > queue? The queue is drained, but can't be accessed again until
          > unsuspended. As I said, I have no way to check this out at the
          > moment. Just curious.
          >
          > Henry
          >
          > --- In psftdba@yahoogroups.com, "James Blanding" <stoneandkobi@y...>
          > wrote:
          > > I was thinking about the suspend/resume commands. I tried them out
          > in
          > > our QA environment, PT 8.42.09. Placing the DSTQ queue in Suspend
          > > status ('suspend -q DSTQ' in tmadmin) caused the new process to
          > > effectively become stuck in "Posting" status in Process Monitor.
          > The
          > > 'printservice' command in tmadmin does list a service named
          > > "PostReport", which has a status of "SUSP":
          > >
          > > After resuming the DSTQ queue ('resume -q DSTQ'), the process
          > remained
          > > in "Posting" status for several minutes, and then it finally got
          > > around to posting its files. There was 10 minutes between the time
          > > the process ran and the time it posted its reports. Perhaps it
          > checks
          > > every so often to see if the PostReport service is available again.
          > >
          > > Obviously suspending the Distribution Agent in this way will prevent
          > > *all* processes run on that Process Scheduler from posting their
          > files
          > > to the Report Repository. Maybe that's not what you're looking
          > for...
          > >
          > > Also, using 'shutdown' instead of 'suspend' seemed to produce
          > > identical results. Not sure if there's any advantage to either
          > method.
          > >
          > > --James
          > >
          > > --- In psftdba@yahoogroups.com, "David Kurtz" <david.kurtz@g...>
          > wrote:
          > > > You can unadvertise a tuxedo service in tmadmin. However, if the
          > > service is
          > > > not available anywhere it doesn't queue up, you get an error
          > message. I
          > > > don't think that the distribution agent responds to a service
          > > request. I
          > > > think it polls one of the PS_CDM tables (from memory PS_CDM_LIST).
          > > >
          > > > The process scheduler and distribution agents are now Tuxedo
          > server
          > > > processes. You could write a tmadmin script to connect to the
          > bulletin
          > > > board of the process scheduler domain and shutdown or startup the
          > > specific
          > > > agent process. But that will shut down the whole agent.
          > > >
          > > > You might be able to manipulate the status on the relavent tables
          > to
          > > control
          > > > when the files are posted, but I have never looked into this.
          > > >
          > > > _________________________
          > > > David Kurtz
          > > > Go-Faster Consultancy Ltd.
          > > > tel: +44 (0)7771 760660
          > > > fax: +44 (0)7092 348865
          > > > mailto:david.kurtz@g...
          > > > web: www.go-faster.co.uk
          > > > PeopleSoft DBA Forum: http://groups.yahoo.com/group/psftdba
          > > >
          > > > -----Original Message-----
          > > > From: James Blanding [mailto:stoneandkobi@y...]
          > > > Sent: 11 March 2004 18:57
          > > > To: psftdba@yahoogroups.com
          > > > Subject: PeopleSoft DBA Forum Re: question regarding distribution
          > agent
          > > >
          > > >
          > > > What tools release are you on?
          > > >
          > > > In 8.4, there is a page/panel that allows you to define operation
          > > > times for each Process Scheduler, but I believe it applies to the
          > > > entire Process Scheduler as opposed to just the Distribution
          > Agent.
          > > >
          > > > However, BEA's documentation for Tuxedo suggests there is a way to
          > > > suspend a particular service using the tmadmin command. If that
          > > > function worked, you could probably write a script (at the
          > operating
          > > > system level) to call the appropriate command(s) as needed. This
          > > > would not likely be supported by PSoft though.
          > > >
          > > > All the Tuxedo docs are available on BEA's website:
          > > http://edocs.bea.com/
          > > >
          > > > HTH,
          > > >
          > > > --James
          > > >
          > > > --- In psftdba@yahoogroups.com, Joan Hsieh <joan.hsieh@t...>
          > wrote:
          > > > > Hi,
          > > > >
          > > > > I came up a question, is there anyway to hold the distribution
          > node
          > > > > agent for one hour or so to deleted the output report from the
          > log
          > > > > directory and then move it to distribution repository creating
          > > directory
          > > > > (usually with date as dir. name)over there with all number as
          > > > > subdirectory ? The reason is developer need some time to email
          > the
          > > > > output before it get deleted, once it move to repository, it is
          > > > > difficult to determine which output is which.
          > > > >
          > > > > Thanks,
          > > > >
          > > > > Joan
          > > >
          > > >
          > > >
          > > >
          > > >
          > > > The PeopleSoft DBA Forum is managed by Go-Faster Consultancy Ltd.
          > > > http://www.go-faster.co.uk
          > > > Yahoo! Groups Links
          >
          >
          > The PeopleSoft DBA Forum is managed by Go-Faster Consultancy Ltd. http://www.go-faster.co.uk
          > Yahoo! Groups Links
          >
          >
          >
          >
        • James Blanding
          Hi Henry... ... Well, new content is definitely not posted while the Distribution Agent s queue is suspended. It might be a little more difficult to see what
          Message 4 of 9 , Mar 22, 2004
          • 0 Attachment
            Hi Henry...

            --- In psftdba@yahoogroups.com, "Henry Poras" <hporas@c...> wrote:
            > James,
            >
            > I don't have an available test environment at the moment so I can't
            > check this out myself. I looked at the BEA docs and have a couple of
            > questions. According to the documentation, 'suspend -q' will suspend
            > all services advertised on the queue. "When a service is suspended,
            > the offering server will no longer be selected as a candidate server
            > for that service...Queued requests for the suspended service are
            > processed until the queue is drained."
            >
            > This sounds like reports that are already on the queue will be
            > Posted, while newly generated reports won't be queued.
            >
            > Is that what you see?

            Well, new content is definitely not posted while the Distribution
            Agent's queue is suspended. It might be a little more difficult to
            see what happens to things that are already in the queue, since it
            doesn't generally seem to take very long for the Distribution Agent to
            actually upload a file. You'd need some pretty good timing to test it
            out...

            >
            > Of course if new reports can't be queued in DSTQ they are not
            > necessarily lost, they may just pile up in another server queue.

            Hmm...I would think (hope) that once the PostRequest service was no
            longer available (due to the suspension of its queue), no other
            service would be handed its requests. Hard to say, though, since I
            can't look at the actual Process Scheduler code...surely they are
            calling the service by name...

            > Don't know. Also, what would happen if a service called from the DSTQ
            > queue does some stuff and then puts the transaction back in the DSTQ
            > queue? The queue is drained, but can't be accessed again until
            > unsuspended. As I said, I have no way to check this out at the
            > moment. Just curious.

            So that would be like the Distribution Agent goes to post a file, and
            then as a result of that action, it decides on its own that it needs
            to post a second file (like an error log of its own)? Not sure
            whether that sort of thing happens. If it did I supose the second
            file would have nowhere to go like you say...

            >
            > Henry
            >
            [...]

            There are certainly some potential gotchas as you point out. I guess
            that's why they probably wouldn't support messing with tmadmin in this
            manner. Oh well! :)

            --James
          • James Blanding
            Well, if you wanted the Distribution Agent to be unavailable during a regular time period, you could just write the appropriate commands into a pair of shell
            Message 5 of 9 , Mar 22, 2004
            • 0 Attachment
              Well, if you wanted the Distribution Agent to be unavailable during a
              regular time period, you could just write the appropriate commands
              into a pair of shell scripts that would suspend and resume (or stop
              and start) the queue. Then you would schedule those scripts to
              execute using your operating system's periodic job scheduler (cron for
              UNIX, at for Win*). If you wanted it to only be unavailable when you
              run a certain process, that would be more difficult...

              Don't forget though that when Distribution Agent unavailble, it will
              affect *all* processes for that Process Scheduler, not just the
              process you want.

              --James

              --- In psftdba@yahoogroups.com, Joan Hsieh <joan.hsieh@t...> wrote:
              > Thanks all, I don't have an test environment either to test that out.
              > But I am curious to know how to make it automated and not manually run
              > each time in the command?
              >
              > Joan
              >
              [...]
            • David Kurtz
              I had a go at testing this on PT8.44. It seems that the distribution agent now responds to the PostReport service issued by the process scheduler. This has to
              Message 6 of 9 , Mar 23, 2004
              • 0 Attachment
                I had a go at testing this on PT8.44. It seems that the distribution agent
                now responds to the PostReport service issued by the process scheduler.
                This has to be a change since 8.1 where it was optional to run the process
                scheduler under Tuxedo, and so presumably the distribution server polled the
                PS_CDM_LIST table.

                You can run tmadmin for the process scheduler with the following script.

                set TUXCONFIG=D:\ps\hr88\appserv\prcs\HR88\PSTUXCFG
                set TUXDIR=d:\ps\bea\tuxedo8.1
                %TUXDIR%\bin\tmadmin

                So here you can see the distribution agent has executed a postreport
                service - the only service it is advertising.

                psc
                Service Name Routine Name Prog Name Grp Name ID Machine # Done Status
                ------------ ------------ --------- -------- -- ------- ------ ------
                InitiateReq+ InitiateReq+ PSPRCSRV.+ BASE 101 GO-FASTER+ 0 AVAIL
                PostReport PostReport PSDSTSRV.+ BASE 103 GO-FASTER+ 0 AVAIL
                <--- nothing happended so far
                CnclAeProg1+ CancelAeProg PSAESRV.e+ AESRV 110 GO-FASTER+ 0 AVAIL
                ChkAeStatus+ CheckAeStat+ PSAESRV.e+ AESRV 110 GO-FASTER+ 0 AVAIL
                RunAeAsync1+ RunAeAsync PSAESRV.e+ AESRV 110 GO-FASTER+ 0 AVAIL

                >
                psc
                Service Name Routine Name Prog Name Grp Name ID Machine # Done Status
                ------------ ------------ --------- -------- -- ------- ------ ------
                InitiateReq+ InitiateReq+ PSPRCSRV.+ BASE 101 GO-FASTER+ 0 AVAIL
                PostReport PostReport PSDSTSRV.+ BASE 103 GO-FASTER+ 1 AVAIL
                <--- now it has executed 1 service
                CnclAeProg1+ CancelAeProg PSAESRV.e+ AESRV 110 GO-FASTER+ 0 AVAIL
                ChkAeStatus+ CheckAeStat+ PSAESRV.e+ AESRV 110 GO-FASTER+ 0 AVAIL
                RunAeAsync1+ RunAeAsync PSAESRV.e+ AESRV 110 GO-FASTER+ 0 AVAIL




                So you can suspend a queue or the service.

                suspend (susp) {-q qaddress | -g groupname | -i srvid | -s service | -I
                interface} ...

                > susp -s PostReport
                Service PostReport suspended on 1 queue.

                > psc
                Service Name Routine Name Prog Name Grp Name ID Machine # Done Status
                ------------ ------------ --------- -------- -- ------- ------ ------
                InitiateReq+ InitiateReq+ PSPRCSRV.+ BASE 101 GO-FASTER+ 0 AVAIL
                PostReport PostReport PSDSTSRV.+ BASE 103 GO-FASTER+ 1 SUSP
                <--- and here it is suspended
                CnclAeProg1+ CancelAeProg PSAESRV.e+ AESRV 110 GO-FASTER+ 0 AVAIL
                ChkAeStatus+ CheckAeStat+ PSAESRV.e+ AESRV 110 GO-FASTER+ 0 AVAIL
                RunAeAsync1+ RunAeAsync PSAESRV.e+ AESRV 110 GO-FASTER+ 0 AVAIL

                There is no doubt that while the service is suspend the distribution server
                does not post anything for anyone. So you can use this to stop the server,
                but the effect is global. Is that what is wanted here? I can think of
                other ways to put a delay in - which is where this thread started.

                Having now run an SQR report. The processes status is now success and
                distribution status is posting, and there is nothing on any of the tuxedo
                queues.

                You can resume the service later like this:

                > res -s PostReport
                Service PostReport resumed (un-suspended) on 1 queue.

                > psc
                Service Name Routine Name Prog Name Grp Name ID Machine # Done Status
                ------------ ------------ --------- -------- -- ------- ------ ------
                InitiateReq+ InitiateReq+ PSPRCSRV.+ BASE 101 GO-FASTER+ 0 AVAIL
                PostReport PostReport PSDSTSRV.+ BASE 103 GO-FASTER+ 1 AVAIL
                <--- service available again
                CnclAeProg1+ CancelAeProg PSAESRV.e+ AESRV 110 GO-FASTER+ 0 AVAIL
                ChkAeStatus+ CheckAeStat+ PSAESRV.e+ AESRV 110 GO-FASTER+ 0 AVAIL
                RunAeAsync1+ RunAeAsync PSAESRV.e+ AESRV 110 GO-FASTER+ 0 AVAIL

                The process posts successfully. In my first test it was a full 6m30s after
                resuming the service before the report posted, however, the second time it
                posted almost immediately after I resumed the service.

                The process scheduler reports that the service was not available in the
                SCHDLR log:
                PSPRCSRV.956 [03/22/04 20:00:47](1) (NET.334): Tuxedo cannot find the
                service PostReport. Make sure the application server advertising this
                service is booted.

                While the service is suspended the process scheduler generates an error
                every heartbeat. So it must be the process scheduler that is polling the
                database and generating the post requests whenever there is something to
                post.



                Conclusion: suspending the service will pause the distribution agent and
                resuming the service will cause it to carry on processing, but it will
                affect everybody who uses that process scheduler.



                _________________________
                David Kurtz
                Go-Faster Consultancy Ltd.
                tel: +44 (0)7771 760660
                fax: +44 (0)7092 348865
                mailto:david.kurtz@...
                web: www.go-faster.co.uk
                PeopleSoft DBA Forum: http://groups.yahoo.com/group/psftdba
              Your message has been successfully submitted and would be delivered to recipients shortly.