View Only
  • 1.  TECH TIP: HLoginMon utility (Realtime Harvest Login Monitor - now with hdbgctrl interface and email alerts)

    Posted Jul 10, 2015 05:38 PM

    Problem: User uses hgetusg commandline utility to get a listing of current logged in users ("-cu" option)

    but it is hard to read and understand and it is not sortable.


    Solution: I have created a simple 32bit windows application called HLoginMon (Login Monitor in

    Real Time). This field developed utility is provided as is and is designed to use the Harvest administrator

    credentials to connect to the broker and query it for the current logged in user information. This

    information is then presented to the user in a simple dialog with a listbox and the information is

    immediately sorted by date/time of the login. It will list the:

    |    PID (process ID)   |  User ID   |   Machine Name (the user logged in from)  |    Date/Time of login    |


    An Snapshot Export button is provided to capture a snapshot of the login list as it is currently and save

    it to a .csv file into the directory that HLoginMon is installed to (C:\HLoginMon [by default]). This .csv file

    can then be emailed to managers and they can open it in Excel.


    The login information is displayed in real time when the utility queries the Broker in interval of the

    seconds that is entered in the "Settings" dialog. The interval should not be entered in less than 5



    The utility is intended for Harvest administrators only since it requires their credentials.


    Runtime Example (r-click on a machine name column to open the hdbgctrl dialog, the machine name

    can be blank or populated depending on the logging scenario you choose - refer to the User's Guide):


    Provided is the zip file that contains a single self - extracting install executable. It will install the

    VS2008 redistributable runtime components that the program requires, and will then install the utility to "c:\HLoginMon" (default) and place a single icon on the desktop. You can uninstall the utility via the 

    normal method of opening windows control panel and using the uninstall applet.


    Requirements:  This windows utility requires Harvest R12.5 or above full client (32bit or 64bit) to be

    installed. It is intended for the Harvest administrator usage and requires the administrator credentials

    to setup the utility to access the Broker.


    ADDENDUM  17 AUG 2015 - Added a new version of HLoginMon that presents all the logged in users

    in a Matrix view. This is helpful for customers that may have a very large number of concurrent logged

    in SCM clients without having to scroll in the List view.

    The HLoginMonMatrixView zip file is attached below. This utility will install by default to

    "c:\HLoginMon". You can uninstall this utility via the uninstall applet in the control panel.


    ADDENDUM 07 APR 2016 - V2.00 Added hdbgctrl interface (refer to the User's Guide on how to use)


    ADDENDUM 24 OCT 2016 - V2.01 Modified installer to work with Windows 10 (32 or 64bit), added stale record identification and checkbox to filter out stale records. Since Harvest is a tier 3 application, there has been instances where the client has dropped connection to the broker (possibly by rebooting) and the Broker still contains their previous login record which has become "stale" (not active). This version identifies these stale records in the matrix view as pale color. You can use Edit->Settings to set the checkbox that will filter out these stale records from view and only display the current date records.


    ADDENDUM 25 OCT 2016 - V2.01a Modified to better filter out the matrix record that performs the

    hgetusg process, now uses process ID instead of datetime stamp.


    ADDENDUM 31 OCT 2016 - V2.01b Minor correction of stale record display was off by currentdate +1,

    this has been corrected.


    ADDENDUM 08 NOV 2016 - V2.01c Modified the installer to install with VS2010 vcredist_x86 which is

    more complete and stable than VS2008 vcredist_x86.


    ADDENDUM 02 DEC 2016 - V3.00 Added Email Alerts feature to send email to designated recipients

    (even smartphone accounts) for when a set number of contiguous Broker connection failures are

    detected. This may indicate the Broker is down and needs to be investigated.


    ADDENDUM 30 JAN 2017 - V4.00 Added Email Broadcast features for situations like "Broker going down" broadcast message as well as you can right-click on an individual login record to send an email message to the individual.


    ADDENDUM 01 NOV 2017 - V4.01 Added "HDbgCtrl..." to the system menu since it was not intuitive to R-click on

    a blank userid or machinename column to open the dialog with blank userid and machinename to perform all client

    logging. Log Level has been expanded to 1 ~ 5. Other small interface fixes added as well.

    System Menu HDbgCtrl interface


  • 2.  Re: TUE TIP: Introducing HloginMon utility V1.0.0.2 (Realtime Harvest Login Monitor)

    Posted Jul 18, 2015 12:30 PM



    Thank you, DaveCarmack, for this useful utility.


    Best regards,

    Ricardo Bernardino

  • 3.  Re: TUE TIP: Introducing HloginMon utility V1.0.0.2 (Realtime Harvest Login Monitor)

    Posted Jul 20, 2015 09:05 AM

    Hello Dave,


    Thanks a lot!


    It could give Harvest a better view from customers and users!


    Best regards!



    Tania Moreno

    Senior Consultant


    Caracas, Venezuela

  • 4.  Re: TUE TIP: Introducing HloginMon utility V1.0.0.2 (Realtime Harvest Login Monitor)

    Posted Jul 23, 2015 12:02 PM

    Thanks Dave for providing nice utility.




  • 5.  Re: TECH TIP: HLoginMon utility (Realtime Harvest Login Monitor - now with hdbgctrl interface)

    Posted May 08, 2017 04:40 PM

    Hi, Please help by clarifying the following...


    We're runnig HLoginMon and it shows stale session up to 1 year ago (around 200 stale sessions). It is possible to close this sessions?, What inconvenience could cause having so many stale sessions?


    Thanks for your comments.



  • 6.  Re: TECH TIP: HLoginMon utility (Realtime Harvest Login Monitor - now with hdbgctrl interface)

    Posted May 09, 2017 08:00 AM



    The log in sessions are maintained in a memory map in the Harvest broker program, they could possibly also

    tie up an hserver process. So, Harvest log in stale sessions is not really a good thing in companies where the

    protocol is expected for the employees to log out of Harvest at the close of their work days.


    The HLoginMon utility does not have the capability to kill or drop a stale session, the only method of

    cleaning up stale log ins is by stopping and restarting the broker.


    An enhancement request to expand husrmgr to provide the ability to kill broker stale login sessions

    has been published on the Harvest public community forum – I recommend you review this enhancement

    and vote it up. If this expanded commandline is provided then HLoginMon can use it to kill stale login

    sessions directly from the GUI.


    The husrmgr enhancement is here:




    Dave Carmack

    Principal Support Engineer

    CA Technical Support

    214-473-1711 (11711 internal)