BookmarkSubscribeRSS Feed
k4minou
Obsidian | Level 7

Hello everyone,

 

This video is nice Session Management in SAS® Viya™: Detecting Idle or Runaway Sessions - SAS Video Portal but it's all manual

 

And in my opinion, it's better to achive this with some automations.

 

Is there a way to do it with sas-admin CLI or with some REST API endpoint ?

 

Thank you for reading

 

6 REPLIES 6
gwootton
SAS Super FREQ
You could probably identify and terminate idle sessions with the CAS REST API, detailed here:

https://developer.sas.com/apis/cas/rest/current/apidoc.html

I'm not sure if you'd be able to look at resource consumption using the API though.
--
Greg Wootton | Principal Systems Technical Support Engineer
k4minou
Obsidian | Level 7

Thank you for your time ^^

 

I already check the apidoc, there is nothing relevant.

 

About the CLI, there is a possibility to list the iddle/active sessions. And by saying that, I realise that I was not clear

 

In gridmon, I see a lot of orphans process that last for severals days. This is mainly due to lost connexions (I believe that dev bugs lead also to that but the users/dev just dont want to wait and time to time, they just leave their web application viya...)

 

The problem is I want to kill those listed process in gridmon (automatically, not manually).

 

I should take a look at the OS process, maybe... The question is if there is a way by OS side, how to be sure that I hit the good process listed by gridmon ? =}

 

Gridmon is nice but too limited, there is no way to search a process of a specific user, or list all the process by conditions etc etc... It just list and we have to parse stuff manually... My source : SAS Help Center: SAS Cloud Analytic Services: How To (gridmon.sh),

 

Even the record function is kinda useless...

 

For now the best alternatives to flush all those trashy process listed in gridmon is a clean/restart of viya but it's still a frustration to me...

 

Thx for reading ^^

SASKiwi
PROC Star

Interesting challenge. We had a similar issue in our SAS 9.4 installation. We found that stopping and restarting server services every day was the best solution for us. As well as getting rid of orphan SAS processes it also enables the CLEANWORK utility to work successfully to delete SAS WORK folders.

 

We also do a monthly server reboot and that also helps minimise orphan server processes.

gwootton
SAS Super FREQ
The REST API can do these things.
The endpoint /cas/sessions can be queried to list sessions. This response includes idle time for each session.
You can use /cas/sessions/session_id with the DELETE method to terminate the session.
--
Greg Wootton | Principal Systems Technical Support Engineer
joeFurbee
Community Manager

Hi @k4minou,

Have you been able to try the two APIs suggested by @gwootton?


Join us for SAS Community Trivia
SAS Bowl XL, SAS Innovate 2024 Recap
Wednesday, May 15, 2024, at 10 a.m. ET | #SASBowl

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
  • 911 views
  • 0 likes
  • 4 in conversation