ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Logging user sign-on

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Logging user sign-on

    Does anyone know of a good way to track user signon/signoff including when a user signed off by shutting down their session abnormally. I went through trial and error with STRWCH and it worked about 95% but the other 5% the watch jobs hung out there and never tripped. I went through round and round with IBM and never arrived at a solution. So, now I am approaching the problem from a different angle.

    Anyone know of a way to capture the data I need through a journaling process? I looked at DSPAUDJRNE and it really did not have what I need. I looked straight and QAUDJRN and QACGJRN and there was not much there. I did a dump of DSPLOG and there were just too many jobs and I am not sure which jobs to filter out.

    Thanks in advance...

  • #2
    Re: Logging user sign-on

    Hi rpgknight:

    This might start you in the right direction:


    Best of Luck
    GLS
    The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

    Comment


    • #3
      Re: Logging user sign-on

      Creating an exit point program was my next step.

      It looks like the WRKWCH programs work but fail enough that I don't get consistent results. IBM has looked over the code I created and they don't know why it is happening plus it is hard to get good job logs to see what it going on to make it fail. It looks like the watch programs are not passed the parms required and are not triggered and they hang out forever until something kills them off like a manual end or an IPL which is not good.

      As for exit point programs, I created one already that works like a charm when I run it interactively. I pass the device name and it logss the user, the job name, the job number, etc. and it works great. However, when I register this program nothing happens. I can't get the job to trigger the logging program I created.

      I have a history with exit point programs where I create them, they work, but they won't work once I register them which makes me want to stay away from them.

      Comment


      • #4
        Re: Logging user sign-on

        What exactly do you need to capture?
        You can get job start and end from QHST logs (CPF1124 and CPF1164) CPF1164 has the end code for the job, so you get to see if it is 0, 20 or 50 (the most common for interactive jobs)
        Greg Craill: "Life's hard - Get a helmet !!"

        Comment


        • #5
          Re: Logging user sign-on

          While the QHST has alot of this info, it isn't as easily usable by users. The purpose was to create a database where I could create a simple front end for managers to use. The database would consist of the time a person entered the system, on what system, some info on the user, and how the user ended their session (did they do a normal end or did they just shut off the session.)

          QHST does capture a CPF1164 but lots of jobs have a CPF1164 and then I'd have to check to see if the job was a session job or not, so I'd have to have a session database of some kind readily available to compare to the signoff message. I don't need to capture CPF1124 because it is easy enough to capture when a user signed on through the initial program call in the user profile. It would be nice of the CPF1164 captured the subsystem (QINTER), but it doesn't. A CPF5140 does not capture that much either.

          I talked to IBM about a simple way to capture when a user signed on or not and they admitted that they have no such facility in place. They admitted that QHST is not a clean solution for what I want. They told me I should suggest it to the LUG.

          The WRKWCH has some merit if I could get it to work close to 100%, which it doesn't. I am working on exit point programs and those don't seem to work, either.

          Comment


          • #6
            Re: Logging user sign-on

            For what you want to do you have to use the QHST logs or the the Audit Journal (QAUDJRN) and yes your gonna have to do some work on your end. Unless there is info you need that is not provided by them your wasting your time with other methods.

            Comment


            • #7
              Re: Logging user sign-on

              I considered QAUDJRN but the info I wanted did not exist in there. I thought about using exit points to write to a journal but so far exit points are not rocking. I may have to do some work with QHST to get this to work.

              Thanks...

              Comment


              • #8
                Re: Logging user sign-on

                What specifically are you actually looking for? Based upon what you have already posted everything you need can be obtained through the Audit Journal. I will repeat you will have to do some work regardless like summarizing the audit entries for a session and separating out which entries are for that session and which might be entries for submitted jobs by that session.

                Comment


                • #9
                  Re: Logging user sign-on

                  Look at changing system value QINACTMSGQ to a message queue you create for this purpose. Have a prestart jobn in sub-system QINTER (or QCTL etc) that monitors this message queue. As each user hits the timeout period it sends the message to the MSGQ, you can directly do your logging before terminating the session.

                  Will that capture the exceptions you are looking at in jobs being killed off?
                  Greg Craill: "Life's hard - Get a helmet !!"

                  Comment


                  • #10
                    Re: Logging user sign-on

                    We capture all jobs from QHST and build a combined database. We have a green screen report that we can check by user/jobname/date/type(B/I)/endcode>0 etc.

                    Is it necessary to know how a user killed his job? The i doesn't seem to care too much, ended is dead. trusty old i keeps on trucking ...
                    Greg Craill: "Life's hard - Get a helmet !!"

                    Comment


                    • #11
                      Re: Logging user sign-on

                      I have had this request from HR before. For some reason HR seems to think that signing on to the system is an indication of when someone has arrived for work. This is a false assumption because someone could arrive for work and get sidetracked right away with phone calls, someone popping their head into the office or whatever. I have done this different ways - the QHST file is one way; I have also used a signon program to call a program to create a log entry and modified SIGNOFF to call a program to create a log entry. What happens when someone forgets to sign off? I would question the "why" you are doing this, if it was like my previous requests from HR I would council against it because it is not accurate.

                      Comment


                      • #12
                        Re: Logging user sign-on

                        I agree with the canuck on this one. The WHY is probably more important than the HOW on this.
                        Greg Craill: "Life's hard - Get a helmet !!"

                        Comment


                        • #13
                          Re: Logging user sign-on

                          Just to dredge up on this thread, does anyone know any way to find the IP address of an interactive session AFTER the session has ended ?
                          Greg Craill: "Life's hard - Get a helmet !!"

                          Comment


                          • #14
                            Re: Logging user sign-on

                            you would have to log the ip -- device, job#, user into a table while job was active.

                            jamie
                            All my answers were extracted from the "Big Dummy's Guide to the As400"
                            and I take no responsibility for any of them.

                            www.code400.com

                            Comment

                            Working...
                            X