Results 1 to 4 of 4

Thread: Monitor

Hybrid View

  1. #1
    Dear Giuseppe,
    Thanks for your good and quick reply,
    this is the LS.bat:
    @echo off


    if "%OS%" == "Windows_NT" setlocal


    rem ================================================== ==================
    rem === CHECK THIS OUT
    rem ================================================== ==================
    rem JAVA_HOME must point to your Java Development Kit installation
    set JAVA_HOME=C:\Program Files\Java\jdk1.8.0_05\jre


    rem ================================================== =====================
    rem === CHECK THIS OUT
    rem ================================================== =====================
    rem JAVA_OPTS should contain any Java Virtual Machine options. Here are some tips:
    rem 1) Always use the "-server" option.
    rem 2) Give more RAM to the server process, especially with heavy traffic, by specifying a min and max "heap"
    rem E.g.: If you have 4 GB and the box is dedicated to Lightstreamer, you might set 1 GB min heap and 3 GB max
    rem heap with these options: "-Xms1G -Xmx3G"
    rem 3) Choose a better "garbage collector" if you want to reduce latency. An option that often gives good results is:
    rem "-XX:+UseConcMarkSweepGC". Only if you are using a very recent version of Java 7, you might prefer to try:
    rem "-XX:+UseG1GC". Many other tuning options are available (please see Oracle docs).
    set JAVA_OPTS=-server


    rem --------------------------------------------------------------------


    echo Java environment:
    echo JAVA_HOME = %JAVA_HOME%
    echo JAVA_OPTS = %JAVA_OPTS%
    echo.


    rem LS_HOME takes the current directory of LS.bat and goes up two dirs
    set LS_HOME=%~dp0..\..\


    echo Lightstreamer Server directory:
    echo LS_HOME = %LS_HOME%
    echo.


    if ""%1"" == ""run"" goto doStart
    if ""%1"" == ""silent"" goto doStart
    if ""%1"" == ""background"" goto doStart
    if ""%1"" == ""stop"" goto doStop
    if ""%1"" == ""restart"" goto doStop


    echo Usage: LS.bat ( command )
    echo commands:
    echo run Start Lightstreamer Server in the current window
    echo background Start Lightstreamer Server in a separate window
    echo stop Stop Lightstreamer Server
    echo restart Stop Lightstreamer Server and start a new instance in a separate window
    goto end


    rem Main class


    :doStart
    echo Starting Lightstreamer Server...
    echo Please check logs for detailed information.
    set class=com.lightstreamer.LS
    goto doLaunch


    :doStop
    echo Stopping Lightstreamer Server...
    set class=com.lightstreamer.LS_Stop
    goto doLaunch


    :doLaunch


    rem Configuration file
    set args="%LS_HOME%\conf\lightstreamer_conf.xml"


    rem Classpath
    set cpath="%LS_HOME%\lib\lightstreamer.jar";"%LS_HOME% \lib\ls-adapter-interface.jar";"%LS_HOME%\lib\ls-monitor.jar";"%LS_HOME%\lib\*"


    rem Launch command
    set command="%JAVA_HOME%\bin\java.exe" %JAVA_OPTS% -cp %cpath% %class% %args%
    set minimal_command="%JAVA_HOME%\bin\java.exe" -cp %cpath% %class% %args%


    if ""%1"" == ""run"" goto doForeground
    if ""%1"" == ""silent"" goto doSilent
    if ""%1"" == ""background"" goto doBackground
    if ""%1"" == ""stop"" goto doStop
    if ""%1"" == ""restart"" goto doSubcall


    :doSubcall
    rem call command and wait
    call %command%
    %0 background
    goto end


    :doForeground
    rem leave control to command
    %command%
    goto end


    :doSilent
    rem rerun after output redirection (for run as a service)
    set output="%LS_HOME%\logs\LS.out"
    %0 run 1>> %output% 2>&1
    goto end


    :doStop
    rem leave control to command
    %minimal_command%
    goto end


    :doBackground
    rem call command in a separate window and leave
    if not "%OS%" == "Windows_NT" goto noTitle
    start "Lightstreamer Server" %command%
    goto end
    :noTitle
    start %command%
    goto end


    :end
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	monitor 2.jpg 
Views:	709 
Size:	47.0 KB 
ID:	162  

  2. #2
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    716
    Hi Ahmed,

    Thank you for provide us with the launch script in use.

    I note that you have left the factory settings for the java options. I was afraid that the low value of free heap was due to a too low value set for -Xmx; but then was probably due to internal strategies of the JVM for memory allocation. The current Momitor shows values more appropriate.

    Anyway, you could consider to set larger values for -Xms and -Xmx according to the amount of total physical memory available in your system. Please refer here for the Java default values.

    Regards,
    Giuseppe

 

 

Similar Threads

  1. Log data (on server & monitor)
    By Heritage in forum General
    Replies: 1
    Last Post: April 9th, 2010, 10:12 AM
  2. Lightstreamer Monitor Console
    By phan_lam in forum General
    Replies: 6
    Last Post: February 5th, 2010, 09:01 AM
  3. User and password for access to monitor
    By webfg in forum General
    Replies: 1
    Last Post: April 6th, 2009, 12:29 PM
  4. How to Monitor LS Server
    By indrajit in forum General
    Replies: 8
    Last Post: February 25th, 2008, 11:21 AM
  5. Monitor Console Adapter
    By JMolina in forum Adapter SDKs
    Replies: 1
    Last Post: October 5th, 2007, 09:03 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT +1. The time now is 06:35 PM.