07-26-2023
boemskats
Lapis Lazuli | Level 10
Member since
04-26-2013
- 164 Posts
- 234 Likes Given
- 17 Solutions
- 130 Likes Received
About
Background in SAS Business Intelligence Consulting. Founder of Boemska Technology Solutions Ltd. (boemskats.com)
Enterprise architecture
Solution Design
Web Programming
-
Latest posts by boemskats
Subject Views Posted 3759 09-18-2020 02:39 PM 2864 02-28-2020 08:32 AM 3826 10-03-2019 10:01 AM 2178 05-10-2019 11:25 AM 867 04-27-2019 04:14 PM 6365 04-19-2019 10:31 AM 3311 04-16-2019 08:26 AM 2136 04-16-2019 07:53 AM 3559 03-14-2019 08:13 AM 3569 03-14-2019 07:37 AM -
Activity Feed for boemskats
- Got a Like for Re: Anyone interested in developping a VS Code extension for SAS language?. 02-12-2021 10:53 AM
- Liked A Giraffe Taught me Kubernetes! for Ali_Aiello. 10-26-2020 04:44 AM
- Liked How do I use Git with my SAS projects? Q&A and webinar recording for ChrisHemedinger. 09-30-2020 04:07 PM
- Posted Finding the Metadata owner of a Workspace session or SASWork directory on Linux on SAS Communities Library. 09-18-2020 02:39 PM
- Liked Azure Storage for SAS Architects for EdoardoRiva. 09-03-2020 06:27 AM
- Liked Overview of container technology: A quick introduction to all things containers for ShelleySessoms. 08-08-2020 07:50 PM
- Liked Re: Is it possible to limit xcmd to certain users? for ronan. 07-28-2020 03:32 AM
- Liked Connecting from SAS 9.4 to Azure Quickstart for FrederikV. 07-28-2020 02:39 AM
- Liked My first development with VA SDK using Node.js for XavierBizoux. 06-24-2020 10:08 AM
- Liked Directing CAS when to use its cache (or not) for RobCollum. 06-24-2020 10:08 AM
- Liked My favorite Administration papers from SAS Global Forum 2020 for cj_blake. 05-05-2020 11:34 AM
- Posted Re: Sample Script not storing/identifying the correct PID on Administration and Deployment. 02-28-2020 08:32 AM
- Got a Like for Re: SAS VIya 3.4 Preinstallation task is failing. 01-13-2020 01:22 AM
- Liked Re: stdin stdout for Tom. 10-26-2019 08:05 AM
- Got a Like for Re: ERROR SAS Web Infrastructure Platform. 10-16-2019 04:19 PM
- Got a Like for Re: ERROR SAS Web Infrastructure Platform. 10-11-2019 04:54 PM
- Got a Like for Re: Stopping a running scheduled job. 10-03-2019 10:30 PM
- Posted Re: Stopping a running scheduled job on Administration and Deployment. 10-03-2019 10:01 AM
- Liked SUGA webinar on October 8: ESM tool for SAS for ShelleySessoms. 10-03-2019 09:45 AM
- Liked Re: Object Spawner Major (page) Faults in the SAS Environment Manager for SimonDawson. 08-07-2019 01:52 PM
-
Posts I Liked
Subject Likes Author Latest Post 13 9 16 1 1 -
My Liked Posts
Subject Likes Posted 1 11-22-2018 03:16 PM 1 10-03-2019 10:01 AM 5 04-19-2019 10:31 AM 2 04-16-2019 08:26 AM 1 03-14-2019 07:37 AM -
My Library Contributions
Subject Likes Author Latest Post 7
09-18-2020
02:39 PM
7 Likes
Our customers are often surprised that ESM is able to reconcile token-authenticated Workspace sessions and SASWork directories with the Metadata username of their owner. At least on Linux, this information is fairly easy to get to and does not require our product at all. Here's one way it can be done.
Finding the Metadata owner of a Workspace session
When the Object Spawner spawns a Workspace session, it sets the name of the Metadata user that it belongs as an environment variable called METAUSER. The environment variables that were set when a Linux process was started can be accessed via the proc filesystem, by reading the /proc/$pid/environ file (the executing user needs appropriate permissions to do this). The entries in this file not in the most readable as they're separated by a null byte, so to pretty print the entries use one of the following:
strings /proc/[pid]/environ
or
xargs -n -0 < /proc/[pid]/environ
So, if you often find yourself in the situation where you have the PID of a Workspace session process and need to know who that process is owned by, add the following to your user's .bashrc (explainshell😞
# usage: pidtometa [pid]
function pidtometa() {
sudo strings /proc/${1}/environ | grep METAUSER | cut -d '=' -f 2
}
and you'll be able to use it like this:
$ pidtometa 3747
drjim@!*(generatedpassworddomain)*!
Easy.
Finding the Metadata owner of a SASWork or SASUtil directory
Building on the above, if you often find yourself needing to know who a particular SASWork or Util directory is owned by, also add this to the same .bashrc (explainshell😞
# usage: dirtometa [saswork or util directory]
function dirtometa() {
pidtometa $(( 16#$(echo "$(basename ${1})" | cut -d "_" -f 2 | cut -b 10-) ));
}
and you'll be able to use it like this:
$ dirtometa /data/saswork/SAS_workC02600001647_apps.boemskats.com/SAS_work3D2200001647_apps.boemskats.com
drjim@!*(generatedpassworddomain)*!
Note that for shared environments such as SAS GRID, these functions must be executed on the host that the process is running on, as the /proc info will be local to each host.
If the above helps, you may also want to check out worktop (where some of that dirtometa function code is borrowed from). Also, if you spend a lot of your time doing this kind of thing, you may want to check out Boemska ESM.
Nik
... View more
Labels:
02-28-2020
08:32 AM
Hey Juan,
The script syntax s correct, check it out:
nik at b5 in ~ on master*
$ nohup sleep 1234 > my.log 2>&1 &
[3] 1885780
nik at b5 in ~ on master*
$ pid=$!; echo $pid
1885780
$ strings /proc/$pid/cmdline
sleep
1234
I'd make sure that the script you're calling is the target command or execs into it, rather than forking to another pid, like some of the JVM scripts do. That might be your issue.
Nik
... View more
10-03-2019
10:01 AM
1 Like
Hi @Nigel_Pain
On Tuesday I'll be presenting a SUGA webinar showing our Enterprise Session Monitor for SAS. The functionality that lets users manage their own workloads, including batch jobs, has been there for a while - have a look here, around 3mins 30sec into the first video (the one titled What is ESM).
Or join the webinar Tuesday - those videos are a few years old now 🙂
Nik
... View more
05-10-2019
11:25 AM
Hi @DavidKess
If migrating to 9.4 isn't an option that's immediately available to you, we offer a commercial product that will considerably help you in managing the SAS DW that you inherited. Our website is in desperate need of an update, but you can have a look at some of the early core functionalities here.
The product has come a long way in terms of enabling the kind of batch analysis you're after. If you're interested feel free to drop me a line and I can send you some more info & maybe arrange for a demo.
Nik
... View more
04-27-2019
04:14 PM
I just came here from your LinkedIn post. Just to be clear - is the error you describe in your LI post as a 'gross arithmetical error' the loss of precision after the 12th decimal, in cases when there is not a format applied to the result? If so, this just looks like a floating point issue to me.
I'm just trying to understand whether I'm missing something obvious, as I'm not a statistician.
Nik
... View more
04-19-2019
10:31 AM
5 Likes
If someone was to pick this up I'd strongly recommend an implementation using Microsoft's Language Server Protocol. Would be a fair bit of work, but it would make that editor mode available to a range of other editors (vim obviously being the most important).
VSCode uses a MS javascript editor component called Monaco, as after all, VSCode is just a webapp that's been deployed in Electron. We have a mode for Ace (another javascript editor component) that is extremely similar, which we've used within an internal product called AppFactory for 2 or 3 years now.
Keep in mind that writing a mode for SAS is really hard, as SAS is not just one language - it's more like 4 or 5. Just ask @sspkmnd - he's been working on his SASLint project for SAS for a long time now (implemented in ANTLR v4, so he also has it compiling to a mode for Ace). I'll let Igor elaborate on the difficulties of an all-encompassing mode for SAS, but it's much harder than you'd assume, compared to almost all other languages. I'm sure the developers behind the SAS Studio editor will agree.
Nik
... View more
04-16-2019
08:26 AM
2 Likes
I've raised an issue here: https://github.com/Boemska/worktop/issues/6
I'll let you know / update this thread once it's implemented. Or someone else can have a go and send a PR 🙂
Nik
... View more
04-16-2019
07:53 AM
You may be caught out by this with the 18c client, so I'll leave it here: http://support.sas.com/kb/60/895.html
... View more
03-14-2019
08:13 AM
1 Like
@arunrami alternatively if you're after a commercially supported solution to this problem (which it sounds like you are), I recommend you check out datacontroller.io as suggested by Allan. Built with the same tech, but with a workflow + change approval process built in.
... View more
03-14-2019
07:37 AM
1 Like
@arunrami - if you read the deployment steps, it involves deploying the stored process and configuring the h54s macro location, and then copying the dist directory to htdocs after editing h54sconfig.json. You don't need to build anything.
If you've still got issues with deployment feel free to raise an issue on GitHub and I'll get someone to help you out 🙂
Nik
... View more
03-14-2019
06:27 AM
It doesn't require any configuration changes at all, just the deployment of an .spk file into Metadata, and unzipping a .zip file somewhere in your web server.
What specifically are you limited by? If you let me know I may be able to suggest an alternative.
Nik
... View more
03-12-2019
12:19 PM
Hey @arunrami have you had a look at the instructions here?
https://github.com/boemska/sas-hot-editor#how-do-i-deploy-it
... View more
02-27-2019
12:02 PM
Assuming this is relating to STPs deployed as Web Services to the SASBIWS webapp, and called via the REST interface as documented here?
... View more
02-14-2019
03:18 PM
1 Like
I'd assume that a workspace server (owned by the user you're authenticating as) is what's actually used for reading the filesystem-based files that store the STP code you're trying to package up, rather than a STP multibridge session (owned by ie. sassrv). This means that the identity you authenticate with for the export must have sufficient credentials registered to start up a workspace server session with the OS, similar to what it'd do in EG.
Are you authenticating with an @saspw account? If so, is it capable of spinning up a session at the operating system level?
... View more
12-06-2018
03:26 PM
Just found this message after @JRoman PM'd me to ask me the same thing - sorry.
Original message is here.
Nik
... View more