- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
My organization has recently moved to a new Linux Server, and I've found that when I submit a SAS job through the terminal (I suppose this means in "batch" mode), I cannot access the logs produced by that job until it is complete. I do not have this problem when I use "Background Submit" in SAS Studio - there I can view the logs and monitor the progress of the program while it runs. I'm not sure if this is relevant, but I got into the habit in the previous UNIX environment of using the option:
-logparm "write=immediate"
so that I would be able to monitor progress as the log was written, but that does not seem to help with this issue.
If it's helpful, the SAS version is 9.4. and the SAS Studio release is 3.82 Enterprise Edition. Both ultimately connect to the same server so I'm confused about why they seem to work quite differently, but that should probably be a separate question entirely.
The main question is if there's a way to submit a SAS job via the terminal and view the log from that job before the program is finished running.
Note that I have seen that there's an option to "rollover" the log, but I really don't want to produce hundreds of separate logs, I would just like one that I can monitor while it runs.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
What message do you get? Please describe what happens. You should be able to see the log.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Different UNIX, but still UNIX: on our AIX server I maintained a dataset of running and finished jobs, and created a report page from it which contained links to the log files (the report was updated every time a job started or finished). We were always able to view logs of jobs in progress by updating the page in the browser.
How do you view the log file?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I have tried several different approaches to view the log: opening it up with gedit, using "cat" "head" "tail" and "more" commands in the terminal, making a copy of the log to a different directory, etc. All failed, saying I didn't have permission to view/access the log (but I'm confident that I do have permission, and this is no longer a problem once the program is finished running).
One possibly important detail is that the drive to which these logs are being written is a weird hybrid drive that is, as I understand it, actually a Windows drive, but set up to be accessed from both Linux and Windows servers. This has created identified problems with SAS in other regards (such as assigning "libnames"), and our whole organization is still on a learning curve trying to figure out the transition to this new system. But I searched for this issue quite a bit before posting, and others have described similar limitations, but I didn't see any clean solutions.
One further update: a colleague told me that he was able to work around this issue by using -altlog and writing to a Linux-native drive. So that seems to be a decent solution, at least for the moment (though I wouldn't be able to write the main log there, as my understanding is that it is meant to be for temporary files only). But if anyone has other suggestions, I'd be interested to hear.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
If this is a Windows drive and you can access it from your PC using Windows Explorer then try viewing with Windows Notepad. i use this all the time in Windows SAS installations to view SAS batch logs while the jobs are still running. If it still fails then I can only assume it is something peculiar relating to linux.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@SASKiwi Yep, I have tried this, doesn't work. It could be that the issue is that it's a SAS UNIX installation, but the drive where the file is stored is a Windows directory. Unfortunately, that is how the system is set up, so it could be that the only workaround is the one I mentioned above using "altlog."
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Windows is notoriously bad with regards to keeping files unnecessarily open.
Set up file shares on Linux servers with samba where needed.
But if you already log in to the SAS server with SSH, you don't need a share at all, and can keep the log files on storage used exclusively by Linux. Accessing these from other platforms can be done with samba or webdav.