Skip to main content
replaced http://unix.stackexchange.com/ with https://unix.stackexchange.com/
Source Link

I wrote a custom Java server. I am running it using Upstart (/etc/init/myservice.config) where I launch java -jar myservice.jar.

The java process uses System.out.println to write log messages of all kinds.

I want to be able to connect to it from a remote ssh session and view the output.

UPDATE: I want to do this without the hassle of creating, rotating, managing log files.

I've looked at a number of posts, including: How to view the output of a running process in another bash session?How to view the output of a running process in another bash session?

I've tried cat and tail -f /proc/<procid>/fd/0 /proc/<procid>/fd/1 /proc/<procid>/fd/2 — all are blank output.

All this is as root

I know there are more things to try, but I'm suspicious since the fd's are blank (or at least for me).

Im running Ubunutu Server 14.04 LTS, Oracle Java 8

Update: Looking to try screen, but I see its not exactly meant for this... How do I start a screen session using an upstart job with a non privileged user?How do I start a screen session using an upstart job with a non privileged user?

I wrote a custom Java server. I am running it using Upstart (/etc/init/myservice.config) where I launch java -jar myservice.jar.

The java process uses System.out.println to write log messages of all kinds.

I want to be able to connect to it from a remote ssh session and view the output.

UPDATE: I want to do this without the hassle of creating, rotating, managing log files.

I've looked at a number of posts, including: How to view the output of a running process in another bash session?

I've tried cat and tail -f /proc/<procid>/fd/0 /proc/<procid>/fd/1 /proc/<procid>/fd/2 — all are blank output.

All this is as root

I know there are more things to try, but I'm suspicious since the fd's are blank (or at least for me).

Im running Ubunutu Server 14.04 LTS, Oracle Java 8

Update: Looking to try screen, but I see its not exactly meant for this... How do I start a screen session using an upstart job with a non privileged user?

I wrote a custom Java server. I am running it using Upstart (/etc/init/myservice.config) where I launch java -jar myservice.jar.

The java process uses System.out.println to write log messages of all kinds.

I want to be able to connect to it from a remote ssh session and view the output.

UPDATE: I want to do this without the hassle of creating, rotating, managing log files.

I've looked at a number of posts, including: How to view the output of a running process in another bash session?

I've tried cat and tail -f /proc/<procid>/fd/0 /proc/<procid>/fd/1 /proc/<procid>/fd/2 — all are blank output.

All this is as root

I know there are more things to try, but I'm suspicious since the fd's are blank (or at least for me).

Im running Ubunutu Server 14.04 LTS, Oracle Java 8

Update: Looking to try screen, but I see its not exactly meant for this... How do I start a screen session using an upstart job with a non privileged user?

adding more detail to the question and desired outcome
Source Link
Nick
  • 129
  • 5

View console output from an Upstart job without logfiles

I wrote a custom Java server. I am running it using Upstart (/etc/init/myservice.config) where I launch java -jar myservice.jar.

The java process uses System.out.println to write log messages of all kinds.

I want to be able to connect to it from a remote ssh session and view the output.

UPDATE: I want to do this without the hassle of creating, rotating, managing log files.

I've looked at a number of posts, including: How to view the output of a running process in another bash session?

I've tried cat and tail -f /proc/<procid>/fd/0 /proc/<procid>/fd/1 /proc/<procid>/fd/2 — all are blank output.

All this is as root

I know there are more things to try, but I'm suspicious since the fd's are blank (or at least for me).

Im running Ubunutu Server 14.04 LTS, Oracle Java 8

Update: Looking to try screen, but I see its not exactly meant for this... How do I start a screen session using an upstart job with a non privileged user?

View console output from an Upstart job

I wrote a custom Java server. I am running it using Upstart (/etc/init/myservice.config) where I launch java -jar myservice.jar.

The java process uses System.out.println to write log messages of all kinds.

I want to be able to connect to it from a remote ssh session and view the output.

I've looked at a number of posts, including: How to view the output of a running process in another bash session?

I've tried cat and tail -f /proc/<procid>/fd/0 /proc/<procid>/fd/1 /proc/<procid>/fd/2 — all are blank output.

All this is as root

I know there are more things to try, but I'm suspicious since the fd's are blank (or at least for me).

Im running Ubunutu Server 14.04 LTS, Oracle Java 8

Update: Looking to try screen, but I see its not exactly meant for this... How do I start a screen session using an upstart job with a non privileged user?

View console output from an Upstart job without logfiles

I wrote a custom Java server. I am running it using Upstart (/etc/init/myservice.config) where I launch java -jar myservice.jar.

The java process uses System.out.println to write log messages of all kinds.

I want to be able to connect to it from a remote ssh session and view the output.

UPDATE: I want to do this without the hassle of creating, rotating, managing log files.

I've looked at a number of posts, including: How to view the output of a running process in another bash session?

I've tried cat and tail -f /proc/<procid>/fd/0 /proc/<procid>/fd/1 /proc/<procid>/fd/2 — all are blank output.

All this is as root

I know there are more things to try, but I'm suspicious since the fd's are blank (or at least for me).

Im running Ubunutu Server 14.04 LTS, Oracle Java 8

Update: Looking to try screen, but I see its not exactly meant for this... How do I start a screen session using an upstart job with a non privileged user?

edited tags
Source Link
Gilles 'SO- stop being evil'
  • 865.3k
  • 205
  • 1.8k
  • 2.3k

How to view View console output from a background java processan Upstart job

I havewrote a custom javaJava server that I wrote that. I am running it using upstartUpstart (/etc/init/myservice.config/etc/init/myservice.config) where iI launch java -jar myservicejava -jar myservice.jar.jar

The java process uses System.out.printlnSystem.out.println to write log messages of all kinds.

I want to be able to connect to it from a remote ssh session and view the output.

I've looked at a number of posts, including: How to view the output of a running process in another bash session?

I've tried cat & tail -f /proc//fd/0 /proc//fd/1 /proc//fd/2cat and -tail -f /proc/<procid>/fd/0 /proc/<procid>/fd/1 /proc/<procid>/fd/2 all are blank output.

All this is as root

I know there are more things to try, but I'm suspicious since the fd's are blank (or at least for me).

Im running Ubunutu Server 14.04 LTS, Oracle Java 8

Update: Looking to try screen, but I see its not exactly meant for this... How do I start a screen session using an upstart job with a non privileged user?

How to view console output from a background java process

I have a custom java server that I wrote that I am running using upstart (/etc/init/myservice.config) where i launch java -jar myservice.jar

The java process uses System.out.println to write log messages of all kinds.

I want to be able to connect to it from a remote ssh session and view the output.

I've looked at a number of posts, including: How to view the output of a running process in another bash session?

I've tried cat & tail -f /proc//fd/0 /proc//fd/1 /proc//fd/2 - all are blank output

All this is as root

I know there are more things to try, but I'm suspicious since the fd's are blank (or at least for me).

Im running Ubunutu Server 14.04 LTS, Oracle Java 8

Update: Looking to try screen, but I see its not exactly meant for this... How do I start a screen session using an upstart job with a non privileged user?

View console output from an Upstart job

I wrote a custom Java server. I am running it using Upstart (/etc/init/myservice.config) where I launch java -jar myservice.jar.

The java process uses System.out.println to write log messages of all kinds.

I want to be able to connect to it from a remote ssh session and view the output.

I've looked at a number of posts, including: How to view the output of a running process in another bash session?

I've tried cat and tail -f /proc/<procid>/fd/0 /proc/<procid>/fd/1 /proc/<procid>/fd/2 all are blank output.

All this is as root

I know there are more things to try, but I'm suspicious since the fd's are blank (or at least for me).

Im running Ubunutu Server 14.04 LTS, Oracle Java 8

Update: Looking to try screen, but I see its not exactly meant for this... How do I start a screen session using an upstart job with a non privileged user?

added more research
Source Link
Nick
  • 129
  • 5
Loading
Source Link
Nick
  • 129
  • 5
Loading