Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Load Server Specs in to QVW

Just a quick question.  Does anyone know if it is possible to load server specs into a qv document?

Just so I can do a side by side comparison of servers, and not just qv servers.  It will also speed up having to do it manually to all of our servers.

1 Solution

Accepted Solutions
Not applicable
Author

Sorry it took me so long to write back, my ID was bugged out and I couldnt log in until today.

So I was able to create the files I needed to read in the server specs.

My doc is not yet complete but I can give you a run down how to create this and will attach what I have so far (working).

My Scenario:  I wanted to create a QVW for my team at work to show us the server specs across all of our applications.  That way we could see which servers we can decommission and maybe move one of our apps to a more powerful server.

First thing, I created an inline statement that represents all the servers I wanted to report on. **NOTE** You must have rights to fully log in to the box. (I.E. view the desktop).

Servers:

LOAD * INLINE [

    Server

    SERVER1

    SERVER2

    SERVER3

];

Then I created a variable to read the number of rows from the previous table.

Let SERVER_COUNT = NoOfRows('Servers');

Next, I created a FOR loop to write out each csv file I create from the cmd line script to get all the remote server information from the Inline table.

FOR I = 0 to $(SERVER_COUNT) - 1;

          Let vServer = Peek('Server', $(I), 'Servers');

                    Execute cmd.exe /C systeminfo /s $(vServer) /FO CSV > C:\Servers\$(vServer).csv;

Then you just read in the CSV file like you would any other.  **NOTE** The way the cmd line writes out to a csv file, you must say "Header Size is 1 line" and comme dilimiter, or else the data wont show in the preview window.

TABLE:

LOAD [Host Name],

     [OS Name],

     [OS Version],

     [OS Manufacturer],

     [OS Configuration],

     [OS Build Type],

     [Registered Owner],

     [Registered Organization],

     [Product ID],

     [Original Install Date],

     [System Up Time],

     [System Manufacturer],

     [System Model],

     [System type],

     [Processor(s)],

     [BIOS Version],

     [Windows Directory],

     [System Directory],

     [Boot Device],

     [System Locale],

     [Input Locale],

     [Time Zone],

     [Total Physical Memory],

     [Available Physical Memory],

     [Virtual Memory: Max Size],

     [Virtual Memory: Available],

     [Virtual Memory: In Use],

     [Page File Location(s)],

     Domain,

     [Logon Server],

     [Hotfix(s)],

     [NetWork Card(s)]

FROM

C:\Servers\$(vServer).csv

(txt, codepage is 1252, embedded labels, delimiter is ',', msq, header is 1 lines);

Next

Drop Table Servers;

View solution in original post

2 Replies
danielrozental
Master II
Master II

Here's something you can try

Run an exec command that does a "msinfo32 /nfo C:\TEMP\SYSSUM.NFO /categories +systemsummary"

Then read the .NFO file for all the information.

Would be great if you're willing to share the QVW afterwards.

Not applicable
Author

Sorry it took me so long to write back, my ID was bugged out and I couldnt log in until today.

So I was able to create the files I needed to read in the server specs.

My doc is not yet complete but I can give you a run down how to create this and will attach what I have so far (working).

My Scenario:  I wanted to create a QVW for my team at work to show us the server specs across all of our applications.  That way we could see which servers we can decommission and maybe move one of our apps to a more powerful server.

First thing, I created an inline statement that represents all the servers I wanted to report on. **NOTE** You must have rights to fully log in to the box. (I.E. view the desktop).

Servers:

LOAD * INLINE [

    Server

    SERVER1

    SERVER2

    SERVER3

];

Then I created a variable to read the number of rows from the previous table.

Let SERVER_COUNT = NoOfRows('Servers');

Next, I created a FOR loop to write out each csv file I create from the cmd line script to get all the remote server information from the Inline table.

FOR I = 0 to $(SERVER_COUNT) - 1;

          Let vServer = Peek('Server', $(I), 'Servers');

                    Execute cmd.exe /C systeminfo /s $(vServer) /FO CSV > C:\Servers\$(vServer).csv;

Then you just read in the CSV file like you would any other.  **NOTE** The way the cmd line writes out to a csv file, you must say "Header Size is 1 line" and comme dilimiter, or else the data wont show in the preview window.

TABLE:

LOAD [Host Name],

     [OS Name],

     [OS Version],

     [OS Manufacturer],

     [OS Configuration],

     [OS Build Type],

     [Registered Owner],

     [Registered Organization],

     [Product ID],

     [Original Install Date],

     [System Up Time],

     [System Manufacturer],

     [System Model],

     [System type],

     [Processor(s)],

     [BIOS Version],

     [Windows Directory],

     [System Directory],

     [Boot Device],

     [System Locale],

     [Input Locale],

     [Time Zone],

     [Total Physical Memory],

     [Available Physical Memory],

     [Virtual Memory: Max Size],

     [Virtual Memory: Available],

     [Virtual Memory: In Use],

     [Page File Location(s)],

     Domain,

     [Logon Server],

     [Hotfix(s)],

     [NetWork Card(s)]

FROM

C:\Servers\$(vServer).csv

(txt, codepage is 1252, embedded labels, delimiter is ',', msq, header is 1 lines);

Next

Drop Table Servers;