BookmarkSubscribeRSS Feed
siddhu1
Quartz | Level 8

Hi

 

I want to find the list of active users and the connection time-in and out using SAS Environment manager.
But in our environmment the Report center is currently unavailable, as the Service Architecture has not been initialized. So unable to see the reports related to APM and ACM.
Is there any other way we can get the list of active users, using the SAS Environment manager.

 

Thanks & Regards,
Siddhu1

6 REPLIES 6
gwootton
SAS Super FREQ
No, that is not a function of SAS Environment Manager. The SAS Web Administration Console (/SASAdmin) has a list of users and their last login time, though this is limited to users who have logged in to the web interfaces. The report center ETLs pull this information from the Metadata Server logs which you could do manually using this program:

https://github.com/greg-wootton/sas-programs/blob/main/Server%20Administration/metadata_log_parser.s...
--
Greg Wootton | Principal Systems Technical Support Engineer
Nigel_Pain
Lapis Lazuli | Level 10

Not Environment Manager, but if you have Windows servers then the attached Powershell script produces a current list of users (you'll need to change the extension to .ps1). I schedule it to run every 15 minutes on our compute server, and I can then load the resulting CSV files into SAS and process them. It can't tell when a user disconnects but I can estimate that to some time in the 15 minutes before their process disappears. Alternatively, you may be able to parse the Object Spawner log. I've not tried that.

 

siddhu1
Quartz | Level 8

Thanks Pain for the reply and will be checking this.

acfarrer
Quartz | Level 8

@Nigel_Pain Using our local sas Admin account, I tried your excellent PowerShell script as Administrator. Seeing the full cmdline including SERVERCOMPONENT/A5FRC3I9.AY000005 is great for identifying the Logical server.

 

Results from Get-Process -Name sas -IncludeUserName are much more limited but better than nothing.

 

How do you view your results? I am trying to design something suitable for SysAdmins on the desktop of Windows Data Center 2019. For SAS users, I can create a Stored Process. PowerShell GUI looks promising for RDP users. 

 

 

Nigel_Pain
Lapis Lazuli | Level 10

I'm glad it's useful.

 

As you say, Get-Process is quite limiting. Get-WmiObject is useful for getting the owner, parent and command line, although having identified how to do this last one I don't think I actually use it. I should really think about replacing Get-WmiObject with the newer Get-CimInstance but sometimes life's too short, and it works!

I use a SAS program to join this data with parsed object spawner logs and data from our business directory database. This gives me data sets with full organisational information which I can use for monitoring purposes and also for recharging our licence costs. Nobody else uses it!

But given that the results of the Powershell are in the CSV files, other tools could be used for processing them fairly easily (not as nicely as SAS, I would contend 😉).

Have to say, I love Powershell! I was brought kicking and screaming from a Solaris environment when it was decided to move our SAS servers to Windows about 10 years ago. I'd been scratching my head trying to work out how to replace a whole load of shell scripts with Windows .bat files (not possible!) But then someone suggested I look at Powershell and the rest, as they say, is history.

acfarrer
Quartz | Level 8

I am encouraged by your endorsement of PowerShell. I have dabbled for years but it is hard to replace 20 years of shell scripts.

Regarding gathering usage metrics, I have found that management are rarely interested until there is an issue - review of licensing costs or some other product they have been convinced is cheaper. Lately, it has been cloud cost estimates.

 

One day before I retire, I am hoping there will be in person user group meetings to discuss this stuff.

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

Get Started with SAS Information Catalog in SAS Viya

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.

Discussion stats
  • 6 replies
  • 2559 views
  • 1 like
  • 4 in conversation