DX NetOps

  • 1.  How can I get SS status using command line tools on Linux?

    Posted Sep 27, 2016 09:54 AM

    How can I get SS status using command line tools on Linux?

     

    The SCP has status information as described below. How do I get the same information from the command line over a simple SSH session without X11?

    SpectroSERVER Status

    Last update August 22, 2014

    The Status field in the CA Spectrum Control Panel indicates the status of the SpectroSERVER with text and color.

    • Starting: yellow
      This field changes to Running (green) after the start-up period expires.
    • Stopping: yellow
      This field changes to Inactive (blue) after the server has shut down.
    • Running: green
      This field indicates a normal running state.
    • Terminated: red
      This condition is abnormal and indicates an error.
    • Inactive: blue
      This field indicates that server shutdown is complete.


  • 2.  Re: How can I get SS status using command line tools on Linux?
    Best Answer

    Broadcom Employee
    Posted Sep 27, 2016 10:54 AM

    From the command line, you can check the process status of the SpectroSERVER:

     

    [spectrum@speclinux ~]$ ps -eaf | grep Spectro | grep -v grep
    spectrum  3089  2329 65 10:37 ?        00:00:04 /usr/Spectrum/SS/SpectroSERVER

     

    You can also see if the server is starting, running, stopping, or stopped by tailing the $SPECROOT/SS/VNM.OUT file:

     

    [spectrum@speclinux ~]$ tail -f /usr/Spectrum/SS/VNM.OUT


    Sep 27 10:37:48 : Please wait. SpectroSERVER
         is loading landscape 0x400000 at precedence 10...

     

           Number of models loaded      : 172  

     

    Sep 27 10:38:02 : /usr/Spectrum/SS/SpectroSERVER
         is now ready on port 0xbeef...

     

    I don't have many models on my little test system here but you'll see the number of models loading increase as it loads, so that would correspond to the starting (yellow).  When you see "is now ready on port 0xbeef...", that's when the Control Panel indicator would go from yellow to green.

     

    Similarly, when the server is stopping:


    Sep 27 10:41:33 : SpectroSERVER has received shut down signal - scheduling shut down
    Sep 27 10:41:33 : /usr/Spectrum/SS/SpectroSERVER is shutting down...
    Sep 27 10:41:34 : Closing all client connections...
    Sep 27 10:41:34 : Stopping CORBA communication...
    Sep 27 10:41:36 : Stopping /usr/Spectrum/SS/SpectroSERVER activity...

     

    -----  NOTE  --------------------------------------------------------------
    CA Technologies recommends that the SpectroSERVER be
    allowed to complete the shutdown process.
    Database corruption may result if the SpectroSERVER is prematurely stopped.
    -------------------------------------------------------------  NOTE  ------

     

    Sep 27 10:41:36 :     waiting for model activates to complete...
    Sep 27 10:41:36 :     waiting for model destroys to complete...
    Sep 27 10:41:36 : Closing /usr/Spectrum/SS/SpectroSERVER database...
    Sep 27 10:41:36 : /usr/Spectrum/SS/SpectroSERVER has successfully shut down.

     

    The period between the "SpectroSERVER has received shut down signal - scheduling shut down" and "SpectroSERVER has successfully shut down." would line up with when the Control Panel should show stopping/yellow.  Once you see the "has successfully shut down" message and don't see the SpectroSERVER process running, that would correspond to the inactive/blue state:

     

    [spectrum@speclinux ~]$ ps -eaf | grep Spectro | grep -v grep
    [spectrum@speclinux ~]$

     

    As far as terminated/red, you would typically see an error message in the VNM.OUT file and the SpectroSERVER process wouldn't be running.  If there is no error message, then if the SpectroSERVER process isn't running (use the ps commands from before) and you don't see "SpectroSERVER has successfully shut down." at the end of your VNM.OUT file, that would also indicate that the server has terminated and would show red in the Control Panel.

     

    Hope that helps.

     

    -Rob



  • 3.  Re: How can I get SS status using command line tools on Linux?

    Posted Sep 27, 2016 11:31 AM

    There is also the REST API or VNM shell you can use once you know the Spectrum process is running. Sometimes the process could be running, but it could be hung so you might want to look at querying the SpectroSERVER. You can look at using VNM shell if you want to do it more directly:

     

    cd /opt/spectrum/vnmsh

    ./connect

    ./show attributes mh=0x400000

     

    This will show attributes or fail if the server is down/unavailable/hung.

     

    You can then look at some of the attributes, e.g.:

     

    [specuser@server vnmsh]$ ./show attributes attr=0x11da6 mh=0x400000
    Id Name Iid Value
    0x11da6 PercentInitialized 100

     

    This shows for example how far the initialisation is after starting up. (usually goes from 0 to 100 at startup).

     

    There might be some other attributes you can use (./show attributes mh=0x40000 will list them all!!).

     

    Alternatively you can query a one click server using the REST API which will test that one clicks are also working!

     

    You can get some pretty cool stats from the VNM model attributes!


    Regards,

     

    Frank



  • 4.  Re: How can I get SS status using command line tools on Linux?

    Posted Sep 27, 2016 11:35 AM

    Thanks, Frank