Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Linux : view output of already running processes in linux

Posted on 2014-01-28
4
Medium Priority
?
979 Views
Last Modified: 2014-01-28
I am running a SOME shell scripts in the background that prints some progress information to the stdout ie terminal. ($ nohup perl script001.pl &)

As all these scripts takes few days to get completed  I will have to logout. This loses the output to the terminal. Is there anyway to regain the progress output for any specific process when i log back in?

I know i could pipe the output to a file, but I don't really want to do that.

Any ideas on this would be greatly appreciated

I hope you clearly  understood question, prior you give me the answer
0
Comment
Question by:mac_g
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 8

Accepted Solution

by:
Surrano earned 1600 total points
ID: 39814614
1. Use nohup. It will make sure the process keeps running even after the user session has ended.

2. Use screen and enable screen logging.

3. If you have already started then spy on file descriptors, e.g. for PID=1234:
tail -f /proc/1234/fd/1

Open in new window

0
 

Author Comment

by:mac_g
ID: 39814652
it is pefect ...

working good  ...

what is fd,1 ... in the above command ??
0
 
LVL 8

Expert Comment

by:Surrano
ID: 39814709
fd is "file descriptors" and 1 is the standard output.
0 is standard input, 2 is standard error. The rest are arbitrary file descriptors opened by the process.
0
 

Author Comment

by:mac_g
ID: 39814716
thanks for your help ...
0

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question