6 Replies Latest reply on Mar 6, 2016 2:28 PM by xtraspecialj

    DISPLAY ACTUAL MEMORY IN SWQL STUDIO

    mraxa

      Hi Guys;

              When i am running the query to display Total Memory, Available Memory and Memory used then the values shown are numbers followed by E + 10. I know i need to do casting however what will the exact code for display.

       

      image.jpg

        • Re: DISPLAY ACTUAL MEMORY IN SWQL STUDIO
          mraxa

          No one can resolve this problem ?

            • Re: DISPLAY ACTUAL MEMORY IN SWQL STUDIO
              xtraspecialj

              I don't think SWQL supports CAST.  It has special functions like TOSTRING and stuff like that.  I don't think there is a SWQL Function for what you are talking about (but I'm not sure).  My question would be why you need to display it in the SWQL Studio?  That type of conversion would be better suited for the presentation layer.  For example, if you use that query in a Custom Table, you can then use the formatting features in the Edit Table section to display it the way you wish. Or, if right-click the results in SWQL Studio you can either Copy-Paste it into an Excel file, or Save Results As a CSV and format it in Excel to your hearts desire.  That's the only solutions I would have for you.

                • Re: DISPLAY ACTUAL MEMORY IN SWQL STUDIO
                  mraxa

                  Thank you for your reply. Actually I need to display this table on my Solarwinds SAM Page. So any advice how to do it beside SWQL studio ?

                    • Re: DISPLAY ACTUAL MEMORY IN SWQL STUDIO
                      xtraspecialj

                      I'm sorry, what does displaying it on your SolarWinds SAM Page have to do with how it displays in SWQL Studio?  Those are two different things...  SWQL Studio is just a useful tool for working with SWQL queries.  I use it to create queries that I then copy and paste into Powershell scripts, Custom Tables, Custom Charts, and Custom Query resources.  If you want to display this data on a view you can use some of the resources I just mentioned.  Put a Custom Table (this would be your best bet since you'll need to play with the formatting of that number field) onto the view, configure the data source of the table to use a custom SWQL query, paste in your query from the SWQL Studio, then edit the table and the formatting to your liking.  Should be pretty straightforward and simple.  I do it all the time.

                       

                      Having said all of that, the data you are querying doesn't need to be done via a custom SWQL query.  You can easily just use a Custom Table, choose "Advanced", choose "Nodes" as the object type, and use the GUI.  It would be much better to do it this way since you won't need to SELECT DetailsUrl and StatusIcon and ChildStatusIcon and VendorIcon to be able to make data clickable and have Status or Vendor Icons show up in your table.  That data you are querying does not require a custom SWQL query in any way shape or form and doing it that way is creating more work for you than necessary.  I only use custom SWQL queries when I am not able to get the data using the GUI.  It is always better to use the GUI when possible.  ALWAYS.

                      1 of 1 people found this helpful
                        • Re: DISPLAY ACTUAL MEMORY IN SWQL STUDIO
                          mraxa

                          Actually, I am running the query in swql studio in order to create a table with custom query resource.

                           

                          What I need is that to create a custom table with a Nodename, IP Address, Memory Used, Memory Available, Memory Utilized in a single table with high memory utilization nodes on the top. So i tried to do the same with custom query resource and using swql studio for writing the query but i stuck.

                           

                          I hope custom table which you are recommending will resolve my problem.

                           

                           

                          Thanx

                            • Re: DISPLAY ACTUAL MEMORY IN SWQL STUDIO
                              xtraspecialj

                              Yes, it will, and like I said, no need to use custom SWQL.  Just do a normal Custom Table, choose Advanced, and do everything through the GUI. It'll be much simpler than using a SWQL query and you'll have far more options. SWQL queries are only needed for complex queries, not something so simplistic like this.

                              1 of 1 people found this helpful