BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Marco_Eandis
Fluorite | Level 6

Because of several issues with SAS VA Auditing (table audit_visualanalytics has not been updated for months, despite va.AuditingEnabled=true) , I finally found a checklist, which was very helpful: "http://support.sas.com/kb/60/182.html#Checklist"

 

With #6 of this checklist I found that sasadm did not have a session in the pooled workspace server

 

In this checklist at #6 It says:

For releases 7.1 and 7.2, the pooled workspace server session for auditing is still active.  There are several ways to check this. For example, you can review the object spawner logs, or you can perform the following steps in SAS Management Console:

 

Because I want to automate some checks, I would like to know how I can identify from the object spawner log that the session for sasadm@saspw is active or not? As I have already spent some time in investigating and don't want to re-invent the wheel, I would like to know if someone knows how to retrieve this information (Linux / SAS 9.4 M2).

 

Thanks in advance for your help

Marco

1 ACCEPTED SOLUTION

Accepted Solutions
JuanS_OCS
Azurite | Level 17

Hello @Marco_Eandis,

 

you have a few ways to do what I think you need, I will list them below.

But I think it would be much better if you check and install available hotfixes (or maintenances, or both), to properly solve all of those problems. There are several that are related to the audit tables.

 

1- Re-active option: to parse the Obj Spawner log -  it should appear the user and if the session was created or terminated. Challenge: identify and keep track of the right session you look for.

 

2-  Pro-active option: you could add some additional logic to the autoexec of the pooled workspace server (autoexec_usermods) that, if user is sasadm, and the PID Y, it can write to a log or table. Challenge: you won't know when the session terminates. For that purpose, you would need an additional script to read this table and check the status of the process with PID Y, to know when that session terminates.

 

Regards,

Juan

 

View solution in original post

6 REPLIES 6
JuanS_OCS
Azurite | Level 17

Hello @Marco_Eandis,

 

you have a few ways to do what I think you need, I will list them below.

But I think it would be much better if you check and install available hotfixes (or maintenances, or both), to properly solve all of those problems. There are several that are related to the audit tables.

 

1- Re-active option: to parse the Obj Spawner log -  it should appear the user and if the session was created or terminated. Challenge: identify and keep track of the right session you look for.

 

2-  Pro-active option: you could add some additional logic to the autoexec of the pooled workspace server (autoexec_usermods) that, if user is sasadm, and the PID Y, it can write to a log or table. Challenge: you won't know when the session terminates. For that purpose, you would need an additional script to read this table and check the status of the process with PID Y, to know when that session terminates.

 

Regards,

Juan

 

Marco_Eandis
Fluorite | Level 6

Hi Juan,

 

thanks for your reply. First of all: the issues we had were mainly cause by different encoding. In the past there has been a change from UTF-8 to Lantin1, but the data was not converted. After solving that issue it appeared that there were duplicate records in hq_metric_data, easy to solve. I will certainly check out if there are hotfixes available, but I don't think we have any issue on that side.

 

As I need a daily check, option 1 is not suitable. Option 2 looks exactly what I need. However I need some time to implement it and because I am off next week I cannot do it this week. Too much to do in a short time 🙂 . I will mark your answer as the solution.

 

Thanks for your help (it was great meeting you at Generali some time ago!)

 

Best Regards

Marco

JuanS_OCS
Azurite | Level 17

Oh, you are *that* Marco. Very nice to meet you here as well !

 

Hard to find time for everything, big truth. For now, hope you can enjoy of your time off. 🙂

 

Please let me know how it goes when you give it a try!

 

Best regards,

Juan

Marco_Eandis
Fluorite | Level 6

There's only 1 like me 🙂

 

First of all I will try to get the output fixed the right way, the rest is easy to fix. As soon as I've got it working (or encounter problems) I will post my solution here, so it might help others.

 

Cheers

Marco

Marco_Eandis
Fluorite | Level 6

In 1 environment we have the sasadm session disappearing within an hour after starting up the environment. In my search for the cause of this, I found the solution for the monitoring issue and finished the script today.

The steps to take are:

1. determine which ObjectSpawner log to check

2. determine the process id from this log

3. determine which PooledWSServer log to check

4. determine the portnumber from this script

5. monitor with netstat -oanp on the combination of port and process

6. send a mail when no longer running

 

This script will be implemented as last step in the start of the VA environment.

 

Feel free to contact me for more detailled information

 

Cheers 

Marco

Marco_Eandis
Fluorite | Level 6

Update: 

 

this morning I tested the script 'live' after a restart and found out the portnumber and process-Id are not related to eachother in the netstat command. The processid in the netstat command is a main process. So instead of using netstat, I've changed this into a two-step check with netstat on the port and ps for the process.

 

 

Cheerzzzz

Marco

 

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
  • 1560 views
  • 2 likes
  • 2 in conversation