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

Hello Experts,

 

I am trying to reach the lsb.events log and lsb.acct log to understand the information being written into it so that I can use an automated script to extract the information.

 

I have referred the online documentation against both these log files:

https://www.ibm.com/support/knowledgecenter/en/SSWRJV_10.1.0/lsf_config_ref/lsb.acct.5.html

 

I am trying to understand where does LSF store the date value in the record. I am able to identify the timestamp but not the date.

 

Below is a sample record for your reference of LSB.ACCT

"JOB_FINISH" "10.1" 1601151045 523 503 33554434 1 1601151044 0 0 1601151045 "sas" "normal" "" "" "" "abc.demo.sas.com" "/opt/sasinside" "" "" "" "1601151044.523" 0 1 "xyz.demo.sas.com" 32 60.0 "" "abc.sas" 0.003999 0.009998 1660 0 -1 0 0 1042 0 0 0 8 -1 0 0 0 11 2 -1 "" "default" 32512 1 "" "" 0 0 0 "" "" "" "" 0 "" 0 "" -1 "/sas" "" "" "" -1 "" "" 1040 "" 1601151045 "" "" 3 1041 "jfincache" 1032 "0" 1033 "0" 0 -1 0 0 "select[type == local] order[r15s:pg] " "" -1 "" -1 0 "" 0 0 "" 0 "/opt/sasinside" 0 "" 0.000000 0.00 0.00 0.00 0.00 1 "xyz.demo.sas.com" -1 0 0 0

 

Reference record of LSB.EVENTS

"JOB_NEW" "10.1" 1601151044 523 503 33554434 1 1601151044 0 0 -65535 0 0 "sas" -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 "" 60.00 2 "normal" "" "abc.demo.sas.com" "/opt/sasinside" "" "" "" "" "/home/sas" "1601151044.523" 0 "" "" "" "abc.sas" 0 "" "default" 1 "X86_64" "" "" "" "" 1040 0 "" "" "" -1 -1 -1 0 "" "" -1 "" 0 -1 "" "" 1 1041 "jfincache" 0 0 "" -1 "" -1 "" "/opt/sasinside" "" "" "" 0 -1 0 "" "" 0

 

 

Thanks in advance,

Ankit.

1 ACCEPTED SOLUTION

Accepted Solutions
ankitd
Obsidian | Level 7

Thanks @doug_sas  and @kdebruhl for your valuable inputs, unfortunately owing to client security policies we do not have a direct access to the SAS environment and receive only the LSF files for analysis.

 

Have finally managed to decrypt the date time in a user readable format by using the below Linux command

date -u -d @dateinteger (present in the LSF file)

 

View solution in original post

3 REPLIES 3
doug_sas
SAS Employee

Rather than try to decode their records, I would just write a C program that uses their LS & LSB API.

The API is described here: https://www.ibm.com/support/knowledgecenter/SSWRJV_10.1.0/api_reference/index.html

The lsb_geteventrec() and ls_getacctrec() APIs will get the information you are looking for.

kdebruhl
SAS Employee

@doug_sas has a good idea.  (People still use C?  Just kidding of course... Perl is my go-to!)


We use the 'jhist' command and parse that output with SAS.  

https://support.sas.com/rnd/scalability/platform/PSS9.1/lsf9.1.3_command_ref.pdf

 

I'd say the code is still not trivial, but perhaps easier than parsing the log files directly.

FWIW, those numbers look like Unix timestamps to me (1601151044).

 

ankitd
Obsidian | Level 7

Thanks @doug_sas  and @kdebruhl for your valuable inputs, unfortunately owing to client security policies we do not have a direct access to the SAS environment and receive only the LSF files for analysis.

 

Have finally managed to decrypt the date time in a user readable format by using the below Linux command

date -u -d @dateinteger (present in the LSF file)

 

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
  • 3 replies
  • 1534 views
  • 1 like
  • 3 in conversation