cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

Access to server-logs

JensN.
14-Alexandrite

Access to server-logs

Hi @all,

for debugging trigger scripts i need access to the server.log. I know of two ways to get this access:

- some kind of access to the filesystem, where the server.log is located. Either direct or as a share.

- via admin-client

The first way is not possible in my company, direct access to server-filesystems are generally prohibited or at least limited to a very small group of admins. The second way is possible, but very uncomfortable. At the admin-client i always see the last 500 lines of the log, and our admin doesnt want to increase this number, because he wants to avoid some heap-size-problems. 500 lines is not enough in most cases, but even if i could persuade the admin to increase this to 2000 lines or so, i doubt that this will be always enough.

Anybody has knowledge of another way to get access to the log-files?

Thanks, Jens   

ACCEPTED SOLUTION

Accepted Solutions
LLawton
16-Pearl
(To:JensN.)

Hello Jens,

This is my idea: have a script on the server that is scheduled to periodically copy the server log file to some location under your public_html folder.

Then you can get the file via http.

If you're not allowed to have a script on the server or a scheduled job, you can probably do that via an Integrity trigger. This way you don't even need physical access to the server.

I don't know of any diag or similar CLI command for that, maybe PTC can tell us? In 10.9 there seem to be more subcommands under "integrity". If the admin gui can get the log, you'd think there's a command for that and it would be the better route.

Come to think of it, there may be yet another solution: a jsp page on the server that gets the server log and lets you view or save it.

View solution in original post

8 REPLIES 8
LLawton
16-Pearl
(To:JensN.)

Hello Jens,

This is my idea: have a script on the server that is scheduled to periodically copy the server log file to some location under your public_html folder.

Then you can get the file via http.

If you're not allowed to have a script on the server or a scheduled job, you can probably do that via an Integrity trigger. This way you don't even need physical access to the server.

I don't know of any diag or similar CLI command for that, maybe PTC can tell us? In 10.9 there seem to be more subcommands under "integrity". If the admin gui can get the log, you'd think there's a command for that and it would be the better route.

Come to think of it, there may be yet another solution: a jsp page on the server that gets the server log and lets you view or save it.

JensN.
14-Alexandrite
(To:LLawton)

Hi Laurent,

really great ideas. I've already talked to my admin that he should consider if he could copy the logfile to the public_html folder (or maybe this would work with a symlink?)...

Thank you very much!

Jens

jsummers
11-Garnet
(To:JensN.)

If you have the Admin Client and look under Server Diagnostics - Server Log

If you are not getting enough information you can change the logging to be higher

I think you misread the question, it has nothing to do with the level of details.

The question was how to get the full (or almost full) file if you don't have physical access to the server.

Hello Jens-Uwe Nixdorf‌,

This is a little heavy handed, but you can collect a server support package, and then drill down to the logs directory within the support package archive.  It should have the last 5 server.log files by default.

Regards,

Kael


Kind Regards,
Kael Lizak

Senior Technical Support Engineer
PTC Integrity Lifecycle Manager
khoppe
15-Moonstone
(To:KaelLizak)

Hello Kael,

are there possibilities to get more logfiles included.

Does exist an option to include all existing logfiles?

Regards,

Klaus

Hi Klaus Hoppe‌,

Use the following at your own risk!  I haven't actually tried it out!

 

Check CS121515 for the general idea.  I think the property you want to modify for server.log files is the constraint value in the <file> element containing log*/server*.log, so that increasing the constraint to 10 would get the last 10 log files.

Be careful modifying this file:

  1. If you make a typo somewhere, it will break generating server support packages completely.
  2. If you add significant amounts of data to what is to be collected, it could significantly increase load on the server (I believe at the OS level), and/or take substantially longer to generate the support package.  Notably, we reduced some of the information upgraded in the ILM 10 line to speed up generating server support packages and to make them smaller.

Regards,
Kael


Kind Regards,
Kael Lizak

Senior Technical Support Engineer
PTC Integrity Lifecycle Manager
JensN.
14-Alexandrite
(To:JensN.)

Hi,

thanks to Laurent Lawton‌ i got a (temporarily) solution. Its not perfect, but it works. Our admin put in a cron-job, which is copying the log and its five latest predecessors into the public_html-directory, so i could get access over the webbrowser. Unfortunately the webserver doesnt work with symlinks, so we have to copy the files. If it would work with symlinks we could have always the actual log, in our case we have a copy every five minutes.

This solution is temporarily because in our company the users must not have access to logs with any personlized data. Only very few admins are permitted to have access to such files, and they have to accept a special NDA. If someone get "accidental" access to the URL, where i can see the logfile, we get in trouble.

Kael Lizak‌: Thanks for your idea, but we also doesnt have the permittance to collect support packages from the server.

cheers, Jens

Announcements


Top Tags