Hello,
Could someone help me extract SASApp - Workspace Server information in an output dataset/file?
I have already tried PROC IOMOPERATE with sasadm@saspw connection profile. Blog: PROC IOMOPERATE
It gives information for all the active PIDs and users in a dataset (Information is available in SAS MC).
What I need further is - when clicking on an active PID, the "Properties" information of the specific user, which is available under the Clients tab (need "Hostname" to be specific). The HostName, available from PROC IOMOPERATE, differs from the Host Name present under the Properties (The Properties Host Name tells about the remote desktop information). I need this information to create a stored process which will capture information for all the active PIDs, and active users and then from which machine the user is connected to.
Thank you in advance!
Best Regards
You wouldn't normally be able to find this type of dynamic run-time information in metadata but it is available from PROC IOMOPERATE using the list clients features - see https://support.sas.com/documentation/cdl/en/biasag/62612/HTML/default/viewer.htm#n20033intelplatfor...
I took the sample code by @ChrisHemedinger in his blog post linked above and tweaked it to add an allclients table that contains the 3x columns provided by list clients: client (userid), peer (workstation IP address and port) and entertime.
I posted the sample code in a gist at https://gist.github.com/paulhomes/029f77032e809e2a1d8ee7a13fc52c14
What information are you looking. Perhaps these two will help
https://blogs.sas.com/content/sasdummy/2016/02/20/proc-iomoperate-custom-task/
https://blogs.sas.com/content/sasdummy/2016/02/15/using-proc-iomoperate/
I don't know any way to extract the information using code. While using the old "metabrowse" in the display manager (classic sas programming tool) i wasn't able to find anything useful.
Maybe @PaulHomes or @MichelleHomes have an idea.
You wouldn't normally be able to find this type of dynamic run-time information in metadata but it is available from PROC IOMOPERATE using the list clients features - see https://support.sas.com/documentation/cdl/en/biasag/62612/HTML/default/viewer.htm#n20033intelplatfor...
I took the sample code by @ChrisHemedinger in his blog post linked above and tweaked it to add an allclients table that contains the 3x columns provided by list clients: client (userid), peer (workstation IP address and port) and entertime.
I posted the sample code in a gist at https://gist.github.com/paulhomes/029f77032e809e2a1d8ee7a13fc52c14
In my case I got back client IP addresses so if you want DNS names then maybe loop over them and do a dig or nslookup command on the IP address to get a hostname if available. I can't tell from your screenshot whether you were seeing IP addresses or hostnames in SAS Management Console - I see IP addresses in mine - exactly what I see in the ALLCLIENTS table. I would use a command like "dig +short -x 10.1.2.3" to get a hostname for the 10.1.2.3 IP address.
Hello,
Sorry for the late update.
The solution with the list allclient works as it gives me the relevant IP address. But there is a minor issue.
It captures information for all clients but misses one client every time. The message I received in the log file is as follows:
NOTE: The LIST ATTRIBUTES command completed.
NOTE: Compression was disabled for data set WORK.CLIENTSxxx because compression overhead would increase the size of the data set.
NOTE: The data set WORK.CLIENTSxxx has 0 observations and 3 variables.
NOTE: The LIST CLIENTS command completed.
So because of this null dataset, if the active sessions from the "list attrs" is n then I am getting n-1 results from list clients.
I am working to find out why this is happening, but if you have any idea, can you please help?
Thank you!
An empty clients table means that server has no clients at that time. Typically this would be a server that might live for a while after the last client disconnects. You will get this for things like the SAS Stored Process Server and SAS Pooled Workspace Server. I just replicated your scenario by having a single active workspace server session and validating the SAS Stored Process server in SAS Management Console (to ensure a server process was started). My PIDs table had 2 rows for the 2 servers (workspace and stored process) and the clients table had only 1 row for the currently connected workspace server client - the stored process server had no clients.
I suspect you are seeing something similar.
Hello again,
finally, I was able to test the completed solution.
The generated report uses "allclients" and tells the information up to the "clients" level.
For Host DNS under the "client properties" level, using "dig +short -x IP" works to get a hostname for the active IP address.
Thank you very much for all the help also addressing my other doubt regarding missing entries.
The SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment.
SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.
Find more tutorials on the SAS Users YouTube channel.